From 63a2855751d638bf27ed969dc60654bda2b54baf Mon Sep 17 00:00:00 2001 From: Ajinkya Dahale Date: Thu, 22 Dec 2022 15:01:14 +0530 Subject: [PATCH] [Sketcher] Disallow tangent-at-knot for non-line in solver This is already stopped in the GUI, but this is still possible by passing the curve IDs through the console. --- src/Mod/Sketcher/App/Sketch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 06547a6e2a..f079501703 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -1737,7 +1737,9 @@ int Sketch::addConstraint(const Constraint *constraint) auto linegeoid = checkGeoId(constraint->Second); - rtn = addTangentLineAtBSplineKnotConstraint(linegeoid, bsplinegeoid, knotgeoId); + if (Geoms[linegeoid].type == Line) + rtn = addTangentLineAtBSplineKnotConstraint( + linegeoid, bsplinegeoid, knotgeoId); } } }