AllwineDesigns / stl_cmd

stl_cmd - commands for binary STL file manipulation
Other
50 stars 9 forks source link

stl_boolean could accept expression rather than just two operands and an operation #4

Open jallwine opened 6 years ago

jallwine commented 6 years ago

stl_boolean could accept named variables as arguments (-a selector_or_filename -b selector_or_filename -c selector_or_filename) and then accept an expression for how to combine them (+ for union, - for difference and & for intersection, I would think all with equal precedence).

An example:

# with files
stl_boolean -a a.stl -b b.stl -c c.stl “a&b-c” # would intersect a and b then subtract c.

# with streams and selector syntax suggested in #1
stl_cube | stl_torus | stl_cone | stl_boolean -a @index[0] -b @index[1] -c @index[2] “a&b-c” # would intersect the cube and torus then subtract the cone.