}
static bool computeParamByFunc(Adaptor3d_Curve& C3d, double first, double last,
- double length, bool theReverse,
+ double length, bool theReverse,
int nbSeg, Function& func,
list<double>& theParams)
{
sprintf( buf, "%f\n", float(x[i] ) );
MESSAGE( buf );
}
-
+
// apply parameters in range [0,1] to the space of the curve
GCPnts_AbscissaPoint Discret( theC3d, eltSize, param );
if ( !Discret.IsDone() ) break;
param = Discret.Parameter();
- if ( param > f && param < l )
+ if ( f < param && param < l )
theParams.push_back( param );
else
break;
eltSize *= q;
}
compensateError( a1, an, U1, Un, theLength, theC3d, theParams );
+ if (theReverse) theParams.reverse(); // NPAL18025
return true;
}
eltSize += q;
}
compensateError( a1, an, U1, Un, theLength, theC3d, theParams );
+ if (theReverse) theParams.reverse(); // NPAL18025
return true;
}
theParams.push_back( param );
}
return true;
-
}
default:;
const SMDS_MeshNode * idPrev = idFirst;
double parPrev = f;
double parLast = l;
- if(reversed) {
+
+ /* NPAL18025
+ if (reversed) {
idPrev = idLast;
+ idLast = idFirst;
+ idFirst = idPrev;
parPrev = l;
parLast = f;
}
-
+ */
+
for (list<double>::iterator itU = params.begin(); itU != params.end(); itU++) {
double param = *itU;
gp_Pnt P = Curve->Value(param);
meshDS->SetMeshElementOnShape(edge, shapeID);
}
else {
- if(!reversed) {
- SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast);
- meshDS->SetMeshElementOnShape(edge, shapeID);
- }
- else {
- SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idFirst);
- meshDS->SetMeshElementOnShape(edge, shapeID);
- }
+ SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast);
+ meshDS->SetMeshElementOnShape(edge, shapeID);
}
}
else