aquamoco-cad/slider.py

26 lines
534 B
Python

import cadquery as cq
from cadquery import exporters
slider_length=700
slider_width=50
path='20-2040.dxf'
bar_l = (
cq.importers.importDXF(path)
.wires().toPending()
.extrude(slider_length)
.translate((0, -slider_width/2, 0))
)
bar_r = (
cq.importers.importDXF(path)
.wires().toPending()
.extrude(slider_length)
.translate((0, slider_width/2, 0))
)
# Render
show_object(bar_l, name='Left Bar', options={"color": (20, 20, 20)})
show_object(bar_r, name='Right Bar', options={"color": (20, 20, 20)})