CadQuery / CadQuery/cadquery

Documentation and behavior mismatch in Workplane.extrude

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

Description

[The documentation of Workplane.extrude](https://github.com/CadQuery/cadquery/blob/00fdd71d7d6bdab701467bd12920c58ce4d0b784/cadquery/cq.py#L3041) says that `until="next"` extrudes until the next face **orthogonal** to the wire normal, but the actual behavior seems to be different. In my experiment, an inclined face can be used as the target of `"next"`.

In my opinion, this behavior is useful, so the documentation should be fixed.

Test code:
```Python
import cadquery as cq
p = cq.Plane(origin=(0, 0, 10), normal=(0.3, 0, 1))
top_plate = cq.Workplane(p).box(20, 5, 1)
result = (
cq.Workplane()
.rect(10, 4)
.add(top_plate)
.extrude("next")
)
show_object(result)
```

Result:
![extrude-until-non-orthogonal-face](https://github.com/CadQuery/cadquery/assets/1825663/6426254f-6e6b-4e48-9c93-1f446e730832)

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.