Same Geometry Different TopoDS_Edge

I have several TopoDS_Faces.
I want to group these TopoDS_Faces by their topo connectivity.
So I combine them into a whole TopoDS_Compound using BRep_Builder.
Then using TopTools_IndexedMapOfShape to store sub TopoDS_Shapes of the TopoDS_Compound,and get a indexed map by TopExp::MapShapes(compound, TopAbs_EDGE, mEdgeMap);,the mEdgeMap which is a TopTools_IndexedMapOfShape.
They could be merged together by their topo connectivity one by one and there is no problem in my opinion.
But problems do exist,because a look like shared edge which has same geometry is actually two different TopoDS_Shape judged by OCC API.
The file testCompound.brep I uploaded is the combined TopoDS_Compound.
One example is shown is the picture 屏幕截图 2024-05-07 140601.jpg,besides that there are more examples.
I want to ask is this a very normal fact even they have same geometry but still different TopoDS_Shape?
What's the difference between them?

gkv311 n's picture

Topological connectivity (sharing common Edges between Faces, etc.) should be encoded on Shape construction time - it is not something implicitly deduced from geometrical matching. Make sure you build your final Shape using shared Edges, Vertices, etc.

Jihui Cong's picture

Do you mean that I can not get topo connectivity by making several different faces into one single TopoDS_Compound?

gkv311 n's picture

Do you mean that I can not get topo connectivity by making several different faces into one single TopoDS_Compound?

TopoDS_Face's sharing common TopoDS_Edge's are logically expected to be put into TopoDS_Shell. But that's not the main point - you may put Faces with shared Edges into TopoDS_Compound as well. The question is, however, how you do this. Try sharing some code creating your Faces and Edges.