for( double z1 = theMinZ; z1 <= theMaxZ; z1 += theDDZ )
{
Handle(Geom2d_Line) aLine = new Geom2d_Line( gp_Pnt2d( 0, z1 ), gp_Dir2d( 1, 0 ) );
- std::set<double> intersections;
+ std::set<double> intersections; //TODO the solutions should be treated with some epsilon~1e-8 (computation error of intersector)
Bnd_Box2d intersect_bndbox;
for( size_t i = 0; i < n; i++ )
{
}
double xmin, ymin, xmax, ymax;
intersect_bndbox.Get(xmin, ymin, xmax, ymax);
- if (Abs(xmax-xmin)>PREC)
+ //if (Abs(xmax-xmin)>PREC)
+ if (intersection_nb >= 1)
{
double u_mid, u_wid;
if( !CalcMidWidth( intersect_bndbox, u_mid, u_wid ) )