Comparing edges

How can two edges be compared whether they are equal.
Using TopTools_IndexedDataMapOfShapeListOfShape failed in some cases

for example:
When a plane has a circular hole, its geometry is GeomAbs_Circle.
A free form surface is made inside this circular hole, its geometry becomes GeomAbs_BSplineCurve.

In this case the two edges are stored as different entries in the map.
How can I check their equality.

Thanks in advance,

Rakesh Lingam's picture

For more info I tried

IsPartner (const TopoDS_Shape &other) const
IsSame (const TopoDS_Shape &other) const
IsEqual (const TopoDS_Shape &other) const

none of these worked.


Timo Roth's picture

The TopoDS_Shape methods work on the level of topology. They enable to check whether two shapes share the same TShape object.

In your case there are different TShape objects and even the underlying geometrical objects are different. I don't know what's the best way to compare such edges.

For a better understanding of topology and geometry you could have a look at the posts about it on:

Laszlo Kudela's picture

Hello Rakesh,

I have the same problem. I really wonder if there is a nice and robust way to find out if two Geom_Curves are equal?

Have you found any solution to your problem?

Best regards,

Laszlo Kudela's picture

Have a look in this thread:

This seems to be a good solution, however I think it's quite expensive.