utils: relax hasCenter()

Fixes #51
This commit is contained in:
Zheng, Lei 2018-09-06 06:58:54 +08:00
parent fc8f2f1a47
commit dda56db7a5

View File

@ -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)