Closed
Description
I have a model designed in cadquery that is made up of multiple 3d-printed parts, each defined in their own python function. I'd like an easy way to export each of these individual parts as stl files.
I want to do something like this:
# model.py
def part1():
return cq.Workplane("XY")...
def part2():
return cq.Workplane("XY")...
def part3():
return cq.Workplane("XY")...
# export just part1
cq-cli --codec stl --infile model.py --outfile part1.stl --expr "part1()"
# export all parts
for part in part1 part2 part3; do
cq-cli --codec stl --infile model.py --outfile "$part.stl" --expr "$part()"
done
Metadata
Metadata
Assignees
Labels
No labels