From 2b19e69b2e86be24d9e1bf14e29c3a4bcc010d70 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Sat, 7 Oct 2017 11:46:39 -0700 Subject: [PATCH] Added explicit support for BSPlineCurve to isHorizontal/isVertical. --- src/Mod/Path/PathScripts/PathGeom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathGeom.py b/src/Mod/Path/PathScripts/PathGeom.py index 3f4cc44b4c..a6ecd25049 100644 --- a/src/Mod/Path/PathScripts/PathGeom.py +++ b/src/Mod/Path/PathScripts/PathGeom.py @@ -152,7 +152,7 @@ class PathGeom: if obj.ShapeType == 'Edge': if type(obj.Curve) == Part.Line or type(obj.Curve) == Part.LineSegment: return cls.isVertical(obj.Vertexes[1].Point - obj.Vertexes[0].Point) - if type(obj.Curve) == Part.Circle or type(obj.Curve) == Part.Ellipse: + if type(obj.Curve) == Part.Circle or type(obj.Curve) == Part.Ellipse or type(obj.Curve) == Part.BSplineCurve: return cls.isHorizontal(obj.Curve.Axis) if type(obj.Curve) == Part.BezierCurve: # the current assumption is that a bezier curve is vertical if its end points are vertical @@ -181,7 +181,7 @@ class PathGeom: if obj.ShapeType == 'Edge': if type(obj.Curve) == Part.Line or type(obj.Curve) == Part.LineSegment: return cls.isHorizontal(obj.Vertexes[1].Point - obj.Vertexes[0].Point) - if type(obj.Curve) == Part.Circle or type(obj.Curve) == Part.Ellipse: + if type(obj.Curve) == Part.Circle or type(obj.Curve) == Part.Ellipse or type(obj.Curve) == Part.BSplineCurve: return cls.isVertical(obj.Curve.Axis) if type(obj.Curve) == Part.BezierCurve: return cls.isRoughly(obj.BoundBox.ZLength, 0)