From dda56db7a59f1e49a34bd0d04197786013e5f2b2 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Thu, 6 Sep 2018 06:58:54 +0800 Subject: [PATCH] utils: relax hasCenter() Fixes #51 --- utils.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utils.py b/utils.py index b22202a..188e8f4 100644 --- a/utils.py +++ b/utils.py @@ -264,9 +264,11 @@ def isLinearEdge(obj): def isVertex(obj): return getElementShape(obj,Part.Vertex) is not None -def hasCenter(obj): - return isVertex(obj) or isCircularEdge(obj) or \ - isAxisOfPlane(obj) or isSphericalSurface(obj) +def hasCenter(_obj): + # Any shape has no center? + # return isVertex(obj) or isCircularEdge(obj) or \ + # isAxisOfPlane(obj) or isSphericalSurface(obj) + return True def isSphericalSurface(obj): face = getElementShape(obj,Part.Face)