Save information in IGES / STEP

Hello,

I'm developing a CAM project. After planning the processing paths, we need to save some information. E.g. the processing lines / faces we choose to plan.

So if there's any way like saving unique ID in IGES / STEP, and next time we open the file, we can get these processing lines / faces by these IDs?

ANY IDEA MAY BE VERY HAPPY. THINK YOU
Steven

ThePhiMa's picture

I have found a working solution for a similar case: I needed to fillet the correct edges when loading from a custom file.
What a found was that the edges/faces/etc. of a shape are always in the same order when iterating through a TopTools_IndexedMapOfShape.
Which means that you could simply save the internal index from that array and access the that exact edge/face/etc. while loading.
Here's a bit of code, maybe it can help you:
int edgeIndex = 12;
TopTools_IndexedMapOfShape listOfEdges;
TopExp::MapShapes(_topoShape.GetDSShape(), TopAbs_EDGE, listOfEdges);
const TopoDS_Edge& foundEdge = TopoDS::Edge(listOfEdges.FindKey(edgeIndex));