CadQuery / cadquery

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

Shell won't work if all but one faces are selected. #1495

Open sadr0b0t opened 10 months ago

sadr0b0t commented 10 months ago

Shell would build for 2 faces of extruded rect but wont build if leave only one face.

Its not much like a big practical problem, because I can draw thin rect instead of shell in this case, but I think it could work for consistency.

import cadquery as cq

res = (
    cq.Workplane("XY")
    .rect(4, 9)
    .extrude(3)
    #.faces(">Y or <X or >X or <Z") # ok
    #.faces(">Y or <X or >X or <Z or >Z") # fail
    .faces(">Y or <X or <Z or >Z") # ok
    .shell(-0.5)
)

show_object(res)

Снимок экрана от 2024-01-13 20-32-13 Снимок экрана от 2024-01-13 20-32-21 Снимок экрана от 2024-01-13 20-32-28

adam-urbanczyk commented 9 months ago

Fails at the CAD kernel level. Probably not a valid use of the underlying OCCT function.