From a34ada692dc460e46314adc3be2ca9b1137ea40c Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Mon, 6 Mar 2017 22:07:05 +0100 Subject: [PATCH] Sketcher: BSpline creation adapted to the more flexible python constructor --- src/Mod/Sketcher/Gui/CommandCreateGeo.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp index d8649ab1b1..660301167e 100644 --- a/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp +++ b/src/Mod/Sketcher/Gui/CommandCreateGeo.cpp @@ -4573,16 +4573,28 @@ public: //Gui::Command::openCommand("Add B-spline curve"); - //Add arc of parabola - Gui::Command::doCommand(Gui::Command::Doc, + /*Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.%s.addGeometry(Part.BSplineCurve" "(%s,%s)," "%s)", sketchgui->getObject()->getNameInDocument(), controlpoints.c_str(), ConstrMethod == 0 ?"False":"True", - geometryCreationMode==Construction?"True":"False"); + geometryCreationMode==Construction?"True":"False"); */ + + // {"poles", "mults", "knots", "periodic", "degree", "weights", "CheckRational", NULL}; + Gui::Command::doCommand(Gui::Command::Doc, + "App.ActiveDocument.%s.addGeometry(Part.BSplineCurve" + "(%s,None,None,%s,3,None,False)," + "%s)", + sketchgui->getObject()->getNameInDocument(), + controlpoints.c_str(), + ConstrMethod == 0 ?"False":"True", + geometryCreationMode==Construction?"True":"False"); + + + currentgeoid++; // Constraint pole circles to bspline.