cadquery
cadquery copied to clipboard
Inverted normals when using shell and fillet
The following code with a negative shell works fine:
test = (
cq.Workplane("XY")
.box(10, 10, 10)
.faces(">Z")
.shell(-1, "intersection")
.edges("|Z")
.fillet(1)
)
show_object(test)
However, if we make the shell positive, the normals get inverted and we get "holes" in the shape
test = (
cq.Workplane("XY")
.box(10, 10, 10)
.faces(">Z")
.shell(1, "intersection") # <----- positive shell
.edges("|Z")
.fillet(1)
)
show_object(test)
It works fine without the fillet.
Version: 2.3.1_43_gad46448
I am unable to reproduce the visual error with the VTK-based show feature, but I can with CQ-editor (latest master). Also, when I export to STL with negative shell there are no mesh errors, but when I export to STL with positive shell, there are over 1500 errors that are auto-repaired.
VTK-based show:
CQ-editor:
STL Errors:
test.val().isValid() returns False. In general the shell function is not always reliable. You can using test.val().fix()