diff --git a/tests/bugs/modalg_5/bug23948_1 b/tests/bugs/modalg_5/bug23948_1 new file mode 100644 index 0000000000..88cdb01e0f --- /dev/null +++ b/tests/bugs/modalg_5/bug23948_1 @@ -0,0 +1,25 @@ +puts "=========" +puts "OCC23948" +puts "=========" +puts "" +########################################################### +# Wrong intersection between a surface of revolution and a plane. +########################################################### + +set MaxTol 1.0e-4 +set NbCurv_OK 2 + +restore [locate_data_file bug22766_f1] f1 +restore [locate_data_file bug22766_f2] f2 + +set log [bopcurves f1 f2] + +regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv + +if {${NbCurv} != ${NbCurv_OK}} { + puts "Error: ${NbCurv_OK} curve(s) expected, but ${NbCurv} found." +} + +if {${Toler} > ${MaxTol}} { + puts "Error: Tolerance is too big!" +} diff --git a/tests/bugs/modalg_5/bug23948_2 b/tests/bugs/modalg_5/bug23948_2 new file mode 100644 index 0000000000..4e60dd3051 --- /dev/null +++ b/tests/bugs/modalg_5/bug23948_2 @@ -0,0 +1,44 @@ +puts "=========" +puts "OCC23948" +puts "=========" +puts "" +########################################################### +# Wrong intersection between a surface of revolution and a plane. +########################################################### + +restore [locate_data_file bug22766_f1] f1 +restore [locate_data_file bug22766_f2] f2 + +bopcurves f1 f2 + +mksurface s1 f1 +mksurface s2 f2 + +dlog reset +dlog on +xdistcs c_1 s2 0 1 10 +set Log1 [dlog get] + +set List1 [split ${Log1} {TD= \t\n}] + +set L1 [llength ${List1}] +set L2 10 +set L3 5 +set N [expr (${L1} - ${L2})/${L3} + 1] +set Tolerance 1.0e-3 +set D_good 0. + +for {set i 1} {${i} <= ${N}} {incr i} { + set j1 [expr ${L2} + (${i}-1)*${L3}] + set j2 [expr ${j1} + 2] + set T [lindex ${List1} ${j1}] + set D [lindex ${List1} ${j2}] + #puts "i=${i} j1=${j1} j2=${j2} T=${T} D=${D}" + if { [expr abs(${D} - ${D_good})] > ${Tolerance} } { + puts "Error: i=${i} T=${T} D=${D}" + } +} + +smallview +fit +set only_screen_axo 1