The end points of Edge and its curve are different.

Hi,

1.I use follow code to get the end points of edge,

//
gp_Pnt startPnt1 = BRep_Tool::Pnt(TopExp::FirstVertex(edge, Standard_True));
gp_Pnt endPnt1 = BRep_Tool::Pnt(TopExp::LastVertex (edge, Standard_True));

The result is,
startPnt1: {x=99.074021934389805 y=53.997534062546201 z=-45.442753877454102 }
endPnt1 : {x=99.161938199081803 y=30.441336111601998 z=-45.442753877454102 }
//

2.I also get these two points using follow code, but results are different.

//
gp_Pnt startPnt2,endPnt2;
Standard_Real param1,param2;
Handle(Geom_Curve) aGC = BRep_Tool::Curve(edge,param1,param2);
aGC->D0(param1,startPnt2);
aGC->D0(param2,endPnt2);

The result is,
startPnt2: {x=99.074200172086407 y=53.997534062546201 z=-45.442753877454102 }
endPnt2 : {x=99.162142073628928 y=30.441336872722957 z=-45.442753877454102 }
//

3.
I want the two results are same(many edges are right).
I thought two ways,
(1)After importing step, do some thing to make edges and their curves absolutely matched. How to to?
(2)Rebuild the edge or displace the curve.How to do?

note:
I want the edge only, dont care which face or wire it belongs to.
The edge is on a shape from attached step file.

Thank you, QPower

Attachments: 
QPower's picture

The attached is the step file.
Thank you, QPower

Attachments: