From 857190a20aa0ad731feeaf4bbff1b3119baaa062 Mon Sep 17 00:00:00 2001 From: Ajinkya Dahale Date: Tue, 4 Nov 2025 21:25:21 +0530 Subject: [PATCH] Sketcher: Only transfer equality in specific cases in `trim` The transfer on should apply to (arcs of) conics. Fixes #25008. --- src/Mod/Sketcher/App/SketchObject.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index dc3aa1699d..11aa798366 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -3747,11 +3747,17 @@ bool SketchObject::deriveConstraintsForPieces(const int oldId, case Radius: case Diameter: case Equal: { - // Only transfer to one of them (arbitrarily chosen here as the first) - Constraint* trans = con->copy(); - trans->substituteIndex(oldId, newIds.front()); - newConstraints.push_back(trans); - break; + // Only transfer to one of them (arbitrarily chosen here as the first) and only if the + // curve is a conic or its arc + // TODO: Some equalities may be transferred, using something along the lines of + // `getDirectlyCoincidentPoints` + if (geo->isDerivedFrom() + || geo->isDerivedFrom()) { + Constraint* trans = con->copy(); + trans->substituteIndex(oldId, newIds.front()); + newConstraints.push_back(trans); + break; + } } default: // Release other constraints