How to check the edges have the same TShape

Hi body,
There are two Edges as following,
TopoDS_Edge E1=BRepBuilderAPI_MakeEdge(c,0,0.4);
TopoDS_Edge E2=BRepBuilderAPI_MakeEdge(c,0.6,0.9);

I use the same curve and different limit to make the above edges. Who can tell me how to check the edges have the same curve?


Kang No_Weon's picture

Do your try

TopoDS_Shape::IsSame() ?

I found it occ Technical Documentation in $(OCCROOT)/doc/hlp/occ51.hlp by search.

angel's picture

Thanks to your reply, I ever try IsSame and IsPartner, but it doesn't work, I think the problem is I translate the one of edges.


Kang No_Weon's picture

I don't test above method..
There is more primitive method.
If two object are edge.
You can try coordinate of each verics.

TopoDS_Vertex vt1,vt2;
ShapeAnalysis::FindBounds(Edge, vt1,vt2);
gp_Pnt gp = BRep_Tool::Pnt(vt1);
Standard_Real x=gp.X();
Standard_Real y=gp.Y();
Standard_Real z=gp.Z();
cout << "First vertex is ---> " << x <<"\t" << y<<"\t"<< z< " << x <<"\t" << y<<"\t"<< z<