diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index bc9148dd39..c88fde3c20 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -3578,6 +3578,8 @@ bool SketchObject::deriveConstraintsForPieces(const int oldId, conPos = con->SecondPos; } + bool newGeosLikelyNotCreated = std::ranges::find(newGeos, nullptr) != newGeos.end(); + bool transferToAll = false; switch (con->Type) { case Horizontal: @@ -3598,6 +3600,11 @@ bool SketchObject::deriveConstraintsForPieces(const int oldId, return false; } + // no use going forward if newGeos aren't ready + if (newGeosLikelyNotCreated) { + break; + } + // For now: just transfer to the first intersection // TODO: Actually check that there was perpendicularity earlier // TODO: Choose piece based on parameters ("values" of the constraint) @@ -3632,10 +3639,11 @@ bool SketchObject::deriveConstraintsForPieces(const int oldId, return true; } - if (conId == GeoEnum::GeoUndef) { + if (conId == GeoEnum::GeoUndef || newGeosLikelyNotCreated) { // nothing further to do return false; } + Base::Vector3d conPoint(getPoint(conId, conPos)); double conParam; auto* geoAsCurve = static_cast(geo);