static void InsertPoints(std::vector<gp_Pnt2d>& points, int nbpoints)
{
points.reserve(points.size() + nbpoints);
- while (nbpoints)
+ while (nbpoints>0)
{
double dmax=0, dmax2=0;
int imax=-1;
double Y0 = p1.Y();
double X1 = p2.X();
double Y1 = p2.Y();
+ if (nbPins>nbpoints) //deny to add more points than needed
+ nbPins = nbpoints;
for (int i=0;i<nbPins;i++)
{
double t = ((double)i+1)/((double)nbPins+1);
}
nbpoints-=nbPins;
}
+ assert (nbpoints == 0);
}
static void PolyToCurve2d(const Handle(HYDROData_PolylineXY)& poly, Handle(Geom2d_Curve)& c2d)