Added support for z-level selecction of circular shapes.

This commit is contained in:
Markus Lampert
2017-09-26 21:46:44 -07:00
parent 4f81e26ac6
commit e03c37ee4b

View File

@@ -654,12 +654,13 @@ class TaskPanelDepthsPage(TaskPanelPage):
def selectionZLevel(self, sel):
if len(sel) == 1 and len(sel[0].SubObjects) == 1:
sub = sel[0].SubObjects[0]
if 'Vertex' == sub.ShapeType:
return sub.Z
if 'Edge' == sub.ShapeType and PathGeom.isRoughly(sub.Vertexes[0].Z, sub.Vertexes[1].Z):
return sub.Vertexes[0].Z
if 'Face' == sub.ShapeType and PathGeom.isRoughly(sub.BoundBox.ZLength, 0):
return sub.BoundBox.ZMax
if PathGeom.isHorizontal(sub):
if 'Vertex' == sub.ShapeType:
return sub.Z
if 'Edge' == sub.ShapeType:
return sub.Vertexes[0].Z
if 'Face' == sub.ShapeType:
return sub.BoundBox.ZMax
return None
def updateSelection(self, obj, sel):