Computing curve length

To compute curve length, use the method Length of class AbscissaPoint from GCPnts.

This function is used only for initializing a framework to compute the length of a curve (or a series of curves).

The adapted curves are:

Adaptor_Curve2d for 2D curves

Adaptor_Curve for 3D curves.

The adapted curve is created in the following way:

Handle(Geom2d_Curve) mycurve = ... ;

Geom2dAdaptor_Curve C (mycurve) ;

Handle(Geom_Curve) mycurve = ... ;

GeomAdaptor_Curve C (mycurve) ;

The length of the curve is then computed using this curve object:

GCPnts_AbscissaPoint myAlgo () ;

Standard_Real L = myAlgo.Length( C ) ;