From 06007c6bbed97b4d2c512b803cadca1f56ead486 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Fri, 3 Jan 2020 16:42:33 -0800 Subject: [PATCH] Fixed engraving support for generic b-spline curves --- src/Mod/Path/PathScripts/PathGeom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathGeom.py b/src/Mod/Path/PathScripts/PathGeom.py index 335f42fe8b..8cf7bff715 100644 --- a/src/Mod/Path/PathScripts/PathGeom.py +++ b/src/Mod/Path/PathScripts/PathGeom.py @@ -255,7 +255,7 @@ def cmdsForEdge(edge, flip = False, useHelixForBSpline = True, segm = 50, hSpeed p2 = edge.valueAt((edge.FirstParameter + edge.LastParameter)/2) p3 = pt - if (type(edge.Curve) == Part.Circle and isRoughly(edge.Curve.Axis.x, 0) and isRoughly(edge.Curve.Axis.y, 0)) or (useHelixForBSpline and type(edge.Curve) == Part.BSplineCurve): + if hasattr(edge.Curve, 'Axis') and ((type(edge.Curve) == Part.Circle and isRoughly(edge.Curve.Axis.x, 0) and isRoughly(edge.Curve.Axis.y, 0)) or (useHelixForBSpline and type(edge.Curve) == Part.BSplineCurve)): # This is an arc or a helix and it should be represented by a simple G2/G3 command if edge.Curve.Axis.z < 0: cmd = 'G2' if not flip else 'G3'