diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index f36f1e4d25..cb22c78d9e 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -58,6 +58,8 @@ #include "Sketch.h" #include "Constraint.h" +#include "GeometryFacade.h" + using namespace Sketcher; using namespace Base; using namespace Part; @@ -320,12 +322,13 @@ int Sketch::addGeometry(const Part::Geometry *geo, bool fixed) { if (geo->getTypeId() == GeomPoint::getClassTypeId()) { // add a point const GeomPoint *point = static_cast(geo); + auto pointf = GeometryFacade::getFacade(point); // create the definition struct for that geom - if( point->getConstruction() == false ) { - return addPoint(*point, fixed); + if( pointf->getInternalType() == InternalType::BSplineKnotPoint ) { + return addPoint(*point, true); } else { - return addPoint(*point, true); + return addPoint(*point, fixed); } } else if (geo->getTypeId() == GeomLineSegment::getClassTypeId()) { // add a line const GeomLineSegment *lineSeg = static_cast(geo); @@ -2898,8 +2901,9 @@ bool Sketch::updateGeometry() try { if (it->type == Point) { GeomPoint *point = static_cast(it->geo); + auto pointf = GeometryFacade::getFacade(point); - if(!point->getConstruction()) { + if(!(pointf->getInternalType() == InternalType::BSplineKnotPoint)) { point->setPoint(Vector3d(*Points[it->startPointId].x, *Points[it->startPointId].y, 0.0) @@ -3051,7 +3055,9 @@ bool Sketch::updateGeometry() if (Geoms[*it5].type == Point) { GeomPoint *point = static_cast(Geoms[*it5].geo); - if(point->getConstruction()) { + auto pointf = GeometryFacade::getFacade(point); + + if(pointf->getInternalType() == InternalType::BSplineKnotPoint) { point->setPoint(bsp->pointAtParameter(knots[index])); } }