diff --git a/.coverage b/.coverage index b9068da..2d312f0 100644 Binary files a/.coverage and b/.coverage differ diff --git a/cadquery/CQ.py b/cadquery/CQ.py index 20d190c..5ac4ceb 100644 --- a/cadquery/CQ.py +++ b/cadquery/CQ.py @@ -685,7 +685,8 @@ class CQ(object): endVec = Vector(axisEndPoint) def _rot(obj): - startPt = obj.Center() + # TODO: compute the weighted average instead of using the first solid + startPt = obj.Solids()[0].Center() endPt = startPt + endVec return obj.rotate(startPt, endPt, angleDegrees) diff --git a/cadquery/freecad_impl/shapes.py b/cadquery/freecad_impl/shapes.py index e0f2ecf..e710aac 100644 --- a/cadquery/freecad_impl/shapes.py +++ b/cadquery/freecad_impl/shapes.py @@ -185,10 +185,10 @@ class Shape(object): return BoundBox(self.wrapped.BoundBox) def Center(self): - try: - return Vector(self.wrapped.CenterOfMass) - except: - pass + # try: + return Vector(self.wrapped.CenterOfMass) + # except: + # pass def Closed(self): return self.wrapped.Closed