CadQuery / cadquery

A python parametric CAD scripting framework based on OCCT
https://cadquery.readthedocs.io
Other
3.15k stars 289 forks source link

Documentation and behavior mismatch in Workplane.extrude #1544

Open uchan-nos opened 6 months ago

uchan-nos commented 6 months ago

The documentation of Workplane.extrude 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:

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