From 7a75405249f53e6398c1560a374e6c77d566342a Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Fri, 5 Dec 2025 08:17:30 +0100 Subject: [PATCH] Sketcher: Fix errors message when selecting circle seam point. (#25953) --- src/Mod/Sketcher/App/SketchObject.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Mod/Sketcher/App/SketchObject.cpp b/src/Mod/Sketcher/App/SketchObject.cpp index a134403d03..6eeac89950 100644 --- a/src/Mod/Sketcher/App/SketchObject.cpp +++ b/src/Mod/Sketcher/App/SketchObject.cpp @@ -11438,6 +11438,17 @@ Data::IndexedName SketchObject::checkSubName(const char *subname) const{ int posId = static_cast(PointPos::none); if ((iss >> sep >> posId) && sep == 'v') { int idx = getVertexIndexGeoPos(geoId, static_cast(posId)); + + // Outside edit-mode circles exposes the seam point but not the center, while in edit-mode we expose the center but not the seam. + // getVertexIndexGeoPos searching for a circle start point (g1v1 for example) (which happens outside of edit mode) will fail. + // see https://github.com/FreeCAD/FreeCAD/issues/25089 + // The following fix works because circles have always 1 vertex, whether in or out of edit mode. + if (idx < 0 && (static_cast(posId) == PointPos::start || static_cast(posId) == PointPos::end)) { + if (geo->is() || geo->is()) { + idx = getVertexIndexGeoPos(geoId, PointPos::mid); + } + } + if (idx < 0) { FC_ERR("invalid subname " << subname); return Data::IndexedName();