I've probably done something wrong, I changed "def shell" in shapes.py
to set Intersection to True and it didn't make any difference for me. As for
SolidWorks, it was just a check to see if it was valid on other platorms, for
all I knew it was totally invalid.
I also needed to change increase the "Deviation" by 10x, to be at least "0.0001",
in 3DViewer preferences, otherwise cq-editor didn't finish within a few minutes.
As you can see in the screenshot I was using "Deviation=0.01" the these tests.
Here is the shapes.py diff:
(cq-dev4) wink@3900x:~/prgs/CadQuery/forks/cadquery (master)
$ git diff
diff --git a/cadquery/occ_impl/shapes.py b/cadquery/occ_impl/shapes.py
index c26889d..7f33f41 100644
--- a/cadquery/occ_impl/shapes.py
+++ b/cadquery/occ_impl/shapes.py
@@ -1677,20 +1677,23 @@ class Mixin3D(object):
occ_faces_list = TopTools_ListOfShape()
+ intersection=True
if faceList:
+ print(f'shapes.shell with faceList, Intersection={intersection}')
for f in faceList:
occ_faces_list.Append(f.wrapped)
shell_builder = BRepOffsetAPI_MakeThickSolid(
- self.wrapped, occ_faces_list, thickness, tolerance
+ self.wrapped, occ_faces_list, thickness, tolerance, Intersection=intersection
)
shell_builder.Build()
rv = shell_builder.Shape()
else: # if no faces provided a watertight solid will be constructed
+ print(f'shapes.shell NO faceList, Intersection={intersection}')
shell_builder = BRepOffsetAPI_MakeThickSolid(
- self.wrapped, occ_faces_list, thickness, tolerance
+ self.wrapped, occ_faces_list, thickness, tolerance, Intersection=intersection
)
shell_builder.Build()
Here is the output at the terminal:
(cq-dev4) wink@3900x:~/prgs/CadQuery/projects/shellellipse (master)
$ cq-editor shellellipse.py
Namespace(filename='shellellipse.py')
TKOpenGl | Type: Other | ID: 0 | Severity: Medium | Message:
OpenGl_Window::CreateWindow: window Visual is incomplete: no stencil buffer
Font_FontMgr, warning: unable to find font 'Courier' [regular]; 'Cantarell' [aspects: regular,bold] [paths: /usr/share/fonts/cantarell/Cantarell-Regular.otf;/usr/share/fonts/cantarell/Cantarell-Bold.otf] is used instead
shapes.shell with faceList, Intersection=True
(cq-dev4) wink@3900x:~/prgs/CadQuery/projects/shellellipse (master)
$ cq-editor shellellipse.py
Namespace(filename='shellellipse.py')
TKOpenGl | Type: Other | ID: 0 | Severity: Medium | Message:
OpenGl_Window::CreateWindow: window Visual is incomplete: no stencil buffer
Font_FontMgr, warning: unable to find font 'Courier' [regular]; 'Cantarell' [aspects: regular,bold] [paths: /usr/share/fonts/cantarell/Cantarell-Regular.otf;/usr/share/fonts/cantarell/Cantarell-Bold.otf] is used instead
shapes.shell with faceList, Intersection=False
And here a screen shot, it is the same whether I left the code unchanged or
set intersection to True or False: