Thu, 03/13/2003 - 14:34
Forums:
I need to be able to find the arc length of an edge. More specifically, I would like to be able to obtain the arc length of a curve between two parametric locations on the curve.
I expect the functionality exists. I am just having trouble finding it.
Fri, 03/14/2003 - 12:07
Hello,
Let's assume that your parameters are U1 and U2, and your curve is Handle(Geom_Curve) Curve ;
Handle(Geom_Curve) NewCurve = new Geom_TrimmedCurve( Curve, U1, U2 );
TopoDS_Edge NewEdge = BRepBuilderAPI_MakeEdge( NewCurve );
GProp_GProps System;
BRepGProp::LinearProperties( NewEdge, System);
Standard_Real Length = System.Mass();
I hope that this may help.
Erki.
Fri, 03/14/2003 - 13:51
That looks like it will work. Thanks for the help.
Rob