Tracking Edge after transformation

hi,

Please tell me how to track Edge before and after transformation:

gp_Trsf translation; translation.SetTranslation(vec);

BRepBuilderAPI_Transform transform(faceToMove, translation, false);

faceToMove = TopoDS::Face(transform.Shape());

I need to know Edge e1 number=1 before transformation, and I have to find them after the transformation.

Now this task cannot be performed because the order of Edges after transformation changes.

int GetEdgeNumbersInTranslatedFace(const TopoDS_Face originalFace, const TopoDS_Face translatedFace, const int edgeNo)

{

int i = 0;

for (TopExp_Explorer explorer(originalFace, TopAbs_EDGE); explorer.More(); explorer.Next())

{

i++;

const TopoDS_Edge originalEdge = TopoDS::Edge(explorer.Current());

TopExp_Explorer edgeExplorer(translatedFace, TopAbs_EDGE);

int j = 0;

for (; edgeExplorer.More(); edgeExplorer.Next())

{ const TopoDS_Edge edgeInTranslatedFace = TopoDS::Edge(edgeExplorer.Current());

j++;

if (edgeInTranslatedFace.IsSame(originalEdge))

{ return j; break; }

}

} }

I was thinking about saving the edge to the map for each Face, but that won't help either, because... we will have different edge lists before and after the transformation, but we don't know which edge before is equal to the edge after the transformation.

Breaking it down into Vertex won't help either, breaking it down into points is an even bigger mystery, because the points have changed completely. What's the best way to do this?

<img src='https://dev.opencascade.org/system/files/forum/Zrzut%20ekranu%202024-01-...' alt='Opis obrazu' />