cadquery
cadquery copied to clipboard
workplane() should allow from tag as parameter, providing enhanced workplaneFromTagged() functionality
workplane() should be enhanced to include an optional from parameter which would specify a tagged workplane be used rather than the TOS face. workplane() functionality, including offset, would be able to be applied to copies of tagged workplanes. workplaneFromTagged() should be deprecated.
.workplane(from="sometag", ...and all the other options...)
Example: A workplane is tagged.
.faces(">Z").workplane().tag("the_tag")
Later you have a need to offset another workplane from that one, but you can't refer to the tagged plane, instead you have to duplicate the selection. That's a possible source of error and also doesn't say "now I'll make a plane offset from this other one".
.faces(">Z").workplane(offset=-some_offset)
Wouldn't this be clearer?
.workplane(name="the_tag", offset=-some_offset)
I have looked at the code, but I don't claim to fully understand possible risks of this enhancement.
I would like this too, but it can easily be done by workplaneFromTagged("the_tag").workplane(offset=-some_offset) a single method would be friendly though.