CadQuery / CadQuery/cadquery

workplane() should allow from tag as parameter, providing enhanced workplaneFromTagged() functionality

Open
#1,114 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

`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.
```python
.workplane(from="sometag", ...and all the other options...)
```
Example: A workplane is tagged.
```python
.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".
```python
.faces(">Z").workplane(offset=-some_offset)
```
Wouldn't this be clearer?
```python
.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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.