diff --git a/cadquery/cq.py b/cadquery/cq.py index d788d678a..799f8c2f9 100644 --- a/cadquery/cq.py +++ b/cadquery/cq.py @@ -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]) diff --git a/cadquery/occ_impl/shapes.py b/cadquery/occ_impl/shapes.py index 5484263f1..a1e486901 100644 --- a/cadquery/occ_impl/shapes.py +++ b/cadquery/occ_impl/shapes.py @@ -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() diff --git a/tests/test_cadquery.py b/tests/test_cadquery.py index b3ee1f88a..c031df366 100644 --- a/tests/test_cadquery.py +++ b/tests/test_cadquery.py @@ -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("