From 28fb7a8b0cb919a1a27ad3c0e1aae082febc0182 Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Wed, 8 May 2019 19:56:06 +0800 Subject: [PATCH] utils: handle infinite face --- utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils.py b/utils.py index e35a1dc..ce647d5 100644 --- a/utils.py +++ b/utils.py @@ -293,6 +293,8 @@ def getElementPos(obj): if face: surface = face.Surface if str(surface) == '': + if not face.countElement('Edge'): + return face.Placement.Base return face.BoundBox.Center # pos = surface.Position elif all( hasattr(surface,a) for a in ['Axis','Center','Radius'] ):