Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cadquery/cq.py
Original file line number Diff line number Diff line change
Expand Up @@ -2675,6 +2675,8 @@ def _combineWithBase(self, obj):
r = obj
if baseSolid is not None:
r = baseSolid.fuse(obj)
elif isinstance(obj, Compound):
r = obj.fuse()

return self.newObject([r])

Expand Down
7 changes: 6 additions & 1 deletion cadquery/occ_impl/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1997,7 +1997,12 @@ def fuse(self, *toFuse):
fuse_op = BRepAlgoAPI_Fuse()
# fuse_op.SetFuzzyValue(TOLERANCE)

rv = self._bool_op(self, toFuse, fuse_op)
args = tuple(self) + toFuse

if len(args) <= 1:
rv = self
else:
rv = self._bool_op(args[:1], args[1:], fuse_op)

# fuse_op.RefineEdges()
# fuse_op.FuseEdges()
Expand Down
2 changes: 2 additions & 0 deletions tests/test_cadquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2548,6 +2548,8 @@ def testExtrude(self):
# extrude symmetrically
s = Workplane("XY").circle(r).extrude(h, both=True)

self.assertTrue(len(s.val().Solids()) == 1)

top_face = s.faces(">Z")
bottom_face = s.faces("<Z")

Expand Down