For each elements in Sketch (line, arc), there is a Tag which is 'semi-persistent' survive editing of Sketch - See sketch.Geometry[index].Tag == Unique identification survive changes? Not sure @abdullah/@realthundar commented the Tag 'semi-persistent' is not made persistent in history.
Code: Select all
tag = fp.Geometry[index].Tag
Discussion of the several approaches - Topological naming tolerant
Maybe you can have a look at if anything would inspire - https://github.com/paullee0/FreeCAD_Ske ... hObject.py
e.g.
Code: Select all
def getEdgeTagIndex(self, fp, tag=None, index=None, useEdgeTagDictSyncFindIndex=False):