- par2 = APnt.Parameter();
- eltSize = segmentSize/nbseg;
- GCPnts_UniformAbscissa Discret(theC3d, eltSize, par1, par2);
- if(theReverse)
- Discret.Initialize(theC3d, eltSize, par2, par1);
- else
- Discret.Initialize(theC3d, eltSize, par1, par2);
- if ( !Discret.IsDone() )
- return error( "GCPnts_UniformAbscissa failed");
- int NbPoints = Discret.NbPoints();
- list<double> tmpParams;
- for(int i=2; i<NbPoints; i++) {
- double param = Discret.Parameter(i);
- tmpParams.push_back( param );
- }
- if (theReverse) {
- compensateError( eltSize, eltSize, par2, par1, segmentSize, theC3d, tmpParams );
- tmpParams.reverse();
- }
- else {
- compensateError( eltSize, eltSize, par1, par2, segmentSize, theC3d, tmpParams );
- }
- list<double>::iterator itP = tmpParams.begin();
- for(; itP != tmpParams.end(); itP++) {
- theParams.push_back( *(itP) );
- }
- theParams.push_back( par2 );
-
- par1 = par2;