Use of input tolerance has been eliminated in Geom2dInt_GInter algorithm called from BRepClass_Intersector::Perform(...) method.
Now the input tolerance is used only for checking ON-status of classification.
IntRes2d_Domain DL;
//
if(P!=RealLast()) {
- DL.SetValues(L.Location(),0.,aTolZ,ElCLib::Value(P,L),P,aTolZ);
+ DL.SetValues(L.Location(),0.,Precision::PConfusion(),ElCLib::Value(P,L),P,Precision::PConfusion());
}
else {
- DL.SetValues(L.Location(),0.,aTolZ,Standard_True);
+ DL.SetValues(L.Location(),0.,Precision::PConfusion(),Standard_True);
}
IntRes2d_Domain DE(pdeb,deb,toldeb,pfin,fin,tolfin);
--- /dev/null
+puts "========"
+puts "OCC29887: Wrong result of CUT operation due to incorrect point-face classification"
+puts "========"
+puts ""
+
+brestore [locate_data_file bug29887_ar_shape_to_cuts.brep] s1
+brestore [locate_data_file bug29887_ar_cutting_shapes.brep] s2
+
+bcut result s1 s2
+checknbshapes result -face 2 -wire 2
+
+checkshape result
+
+if {[regexp "Faulties" [bopargcheck result]]} {
+ puts "Error: bopargcheck has found some faulties in result"
+}
+
+checkprops result -s 319.71
+
+smallview
+don result
+fit
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
--- /dev/null
+puts "========"
+puts "OCC29887: Wrong result of CUT operation due to incorrect point-face classification"
+puts "========"
+puts ""
+
+brestore [locate_data_file bug29887_ar_shape_to_cuts.brep] s1
+
+point p 11.633693861603586 -0.88940231049090079
+
+if { ![regexp {IN} [ b2dclassifx s1 p ] ] } {
+ puts "Error : Wrong result of 2d classifier algorithm"
+} else {
+ puts "OK : Good result of 2d classifier algorithm"
+}
+
+if { ![regexp {IN} [ b2dclassify s1 p ] ] } {
+ puts "Error : Wrong result of 2d classifier algorithm"
+} else {
+ puts "OK : Good result of 2d classifier algorithm"
+}
+
+smallview -2D-
+2dclear
+display p
+pcurve s1
+2dfit
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png