How to compute the length of a Geom_Curve?

Hi all,

I want to divide a Geom_Curve to several segments, and every segment has the same length. How can I do this?
How to compute the length of a Geom_Curve?

Thanks in advance!

zhangzhigang824's picture

I find the answer in the forum.

Thanks for concern!

jelle's picture

Right, though using GCPnts_UniformAbscissa is probably easier.

From the docs:

GCPnts_UniformAbscissa Class Reference

This class allows to compute a uniform distribution of points
on a curve (ie the points will all be equally distant).

Public Member Functions

void * operator new (size_t, void *anAddress)
void * operator new (size_t size)
void operator delete (void *anAddress)
Standard_EXPORT GCPnts_UniformAbscissa ()
creation of a indefinite UniformAbscissa

Standard_EXPORT GCPnts_UniformAbscissa (Adaptor3d_Curve &C, const Standard_Real Abscissa, const Standard_Real Toler=-1)
Computes a uniform abscissa distribution of points on
the Curve . Parameter Toler is equal Precision::Confusion by default.
It Is used for more precise calculation of curve length

zhangzhigang824's picture

Hi jelle,

Thanks for your reply!
You are right! GCPnts_UniformAbscissa is more useful than GCPnts_AbscissaPoint.

Thanks for the reminder!