Suppose I have a TopTools_IndexedMapOfShape m_FaceMap, and I want to divide them into a set of groups. Each group contains all the faces in m_FaceMap with the same geometry (both in geometric type and geometric equation). How could I do it? Many thanks in advance.
Discussion
2 archived replies
Posts are displayed in their archived order.
01Commenter-1
Hi Ming,
Frankly speaking, don’t see an issue here – just iterate and classify.
You might want to distribute into the map like:
to enable faster classification per surface type. Then compare a definition of a current surface with First()’s of every list. If it matches – append to that list, if not – init a new list and add it into the top list. To compare definitions of surfaces you might use:
Be aware that you will compare doubles, so this can be prone to accuracy problems in general case.
Good luck.
Commenter-1
02Commenter-2
Hi, Roman,
Thank you very much for your reply. What I am worried is that whetherif (aS1 == aS2) would work well. When I try it, I get the following error. Do you know the reason?
error: no match for 'operator==' in 'aS1 == aS2'
/opt/OpenCASCADE/include/Handle/Standard/Transient.hxx:115: error: candidates
are: int operator==(const Standard_Transient*, const
Handle_Standard_Transient&)