-static bool computeParamByFunc(Adaptor3d_Curve& C3d, double first, double last,
- double length, bool theReverse,
- int nbSeg, Function& func,
+static bool computeParamByFunc(Adaptor3d_Curve& C3d,
+ double first, double last, double length,
+ bool theReverse, int nbSeg, Function& func,
- if (!buildDistribution(func, 0.0, 1.0, nbSeg, x, 1E-4))
+ if ( !buildDistribution( func, 0.0, 1.0, nbSeg, x, 1E-4 ))
- GCPnts_AbscissaPoint Discret( C3d, curvLength, prevU );
+ double tol = Min( Precision::Confusion(), curvLength / 100. );
+ GCPnts_AbscissaPoint Discret( tol, C3d, curvLength, prevU );
size_t iSeg = theReverse ? segLen.size()-1 : 0;
size_t dSeg = theReverse ? -1 : +1;
double param = theFirstU;
size_t iSeg = theReverse ? segLen.size()-1 : 0;
size_t dSeg = theReverse ? -1 : +1;
double param = theFirstU;
for ( int i = 0, nb = segLen.size()-1; i < nb; ++i, iSeg += dSeg )
{
GCPnts_AbscissaPoint Discret( theC3d, segLen[ iSeg ], param );
for ( int i = 0, nb = segLen.size()-1; i < nb; ++i, iSeg += dSeg )
{
GCPnts_AbscissaPoint Discret( theC3d, segLen[ iSeg ], param );
case FIXED_POINTS_1D: {
const std::vector<double>& aPnts = _fpHyp->GetPoints();
const std::vector<int>& nbsegs = _fpHyp->GetNbSegments();
case FIXED_POINTS_1D: {
const std::vector<double>& aPnts = _fpHyp->GetPoints();
const std::vector<int>& nbsegs = _fpHyp->GetNbSegments();
- for(i=0; i<Params.Length(); i++) {
- int nbseg = ( i > nbsegs.size()-1 ) ? nbsegs[0] : nbsegs[i];
+ for ( int i = 0; i < Params.Length(); i++ )
+ {
+ int nbseg = ( i > (int)nbsegs.size()-1 ) ? nbsegs[0] : nbsegs[i];
segmentSize = Params.Value(i+1)*theLength - currAbscissa;
currAbscissa += segmentSize;
GCPnts_AbscissaPoint APnt(theC3d, sign*segmentSize, par1);
segmentSize = Params.Value(i+1)*theLength - currAbscissa;
currAbscissa += segmentSize;
GCPnts_AbscissaPoint APnt(theC3d, sign*segmentSize, par1);
segmentSize = theLength - currAbscissa;
eltSize = segmentSize/nbseg;
GCPnts_UniformAbscissa Discret;
segmentSize = theLength - currAbscissa;
eltSize = segmentSize/nbseg;
GCPnts_UniformAbscissa Discret;