- theParams.push_back( par2 );
-
- par1 = par2;
- }
- // add for last
- int nbseg = ( nbsegs.size() > Params.Length() ) ? nbsegs[Params.Length()] : nbsegs[0];
- segmentSize = theLength - currAbscissa;
- eltSize = segmentSize/nbseg;
- GCPnts_UniformAbscissa Discret;
- if(theReverse)
- Discret.Initialize(theC3d, eltSize, par1, lp);
- else
- Discret.Initialize(theC3d, eltSize, lp, par1);
- 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, lp, par1, segmentSize, theC3d, tmpParams );
- tmpParams.reverse();
- }
- else {
- compensateError( eltSize, eltSize, par1, lp, segmentSize, theC3d, tmpParams );
- }
- list<double>::iterator itP = tmpParams.begin();
- for(; itP != tmpParams.end(); itP++) {
- theParams.push_back( *(itP) );