Two read of the same TopoDS_Shape

Hi,

I'm reading the same file twice, and comparing the two TopoDS_Shape, and they are different.
Is there a way to compare them? ( and grant they are equal )

Regards,

Tilman Leune's picture

Do you use the .IsEqual member? From the Documentation:

"Standard_EXPORT Standard_Boolean IsEqual (const TopoDS_Shape &other) const
Returns True if two shapes are equal, i.e. if they share the same TShape with the same Locations and Orientations."

I would expect that if you load a Shape twice, you will end up with to shapes of identical topology, but with two seperate instances of the underlying TShape.

You might try to explore the Shapes' Topologies, comparing them vertex-position by vertex-position
using a TopoEx_Explorer an a reasonable tolerance value.

tmacedo29's picture

Hi Tilman Leune,

Thank You for your Answer. Actually I tried to use IsEqual, but the problem is exactly what you mentioned. When I read twice files, I end up with two different TopoDS_TShape.
I'm using this method of comparing Vertex-position. But I would like to know if there's another away to compare them.

Thank You!
Regards,