Tue, 05/07/2024 - 09:11
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?
Tue, 05/07/2024 - 13:43
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.
Thu, 05/09/2024 - 08:53
Do you mean that I can not get topo connectivity by making several different faces into one single TopoDS_Compound?
Thu, 05/09/2024 - 10:00
TopoDS_Face
's sharing commonTopoDS_Edge
's are logically expected to be put intoTopoDS_Shell
. But that's not the main point - you may put Faces with shared Edges intoTopoDS_Compound
as well. The question is, however, how you do this. Try sharing some code creating your Faces and Edges.