Merge remote-tracking branch 'refs/remotes/upstream/master' into add-simplify

This commit is contained in:
hyOzd 2015-08-03 22:16:45 +03:00
commit c11cff1d2c
3 changed files with 3 additions and 5 deletions

BIN
.coverage

Binary file not shown.

View File

@ -684,7 +684,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)

View File

@ -185,10 +185,7 @@ class Shape(object):
return BoundBox(self.wrapped.BoundBox)
def Center(self):
try:
return Vector(self.wrapped.CenterOfMass)
except:
pass
return Vector(self.wrapped.CenterOfMass)
def Closed(self):
return self.wrapped.Closed