Skip to content

feature request: allow specifying an "expression" to render as a command-line argument #18

Closed
@justbuchanan

Description

@justbuchanan

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions