diff --git a/tests/bugs/begin b/tests/bugs/begin index 1135b9c903..18e568238c 100755 --- a/tests/bugs/begin +++ b/tests/bugs/begin @@ -240,3 +240,14 @@ proc checktrend {listval delta tolerance message} { # check if deviation is clearly within a range return [expr abs ($mean - $delta) <= $sigma && $sigma <= $tolerance] } + +# Check if area of triangles is valid +proc CheckTriArea {shape {eps 0}} { + upvar #0 $shape result + set area [triarea result $eps] + set t_area [lindex $area 0] + set g_area [expr abs([lindex $area 1])] + puts "area by triangles: $t_area" + puts "area by geometry: $g_area" + expr ($t_area - $g_area) / $g_area * 100 +} diff --git a/tests/bugs/caf/bug381_1 b/tests/bugs/caf/bug381_1 index dd308c3383..4c5b9933f5 100755 --- a/tests/bugs/caf/bug381_1 +++ b/tests/bugs/caf/bug381_1 @@ -8,11 +8,11 @@ pload QAcommands NewDocument D MDTV-Standard ###################################################### -catch { SaveAs D ${imagedir}/OCC381.std } +catch { SaveAs D ${imagedir}/OCC381_1.std } if { [catch { OCC381_Save D } ] } { puts "OCC381: Error" } else { - catch { exec chmod 777 ${imagedir}/OCC381.std } - file delete ${imagedir}/OCC381.std + catch { exec chmod 777 ${imagedir}/OCC381_1.std } + file delete -force ${imagedir}/OCC381_1.std } diff --git a/tests/bugs/caf/bug381_2 b/tests/bugs/caf/bug381_2 index a651303561..019529998a 100755 --- a/tests/bugs/caf/bug381_2 +++ b/tests/bugs/caf/bug381_2 @@ -8,10 +8,10 @@ pload QAcommands NewDocument D MDTV-Standard ###################################################### -if { [catch { OCC381_SaveAs D ${imagedir}/OCC381.std}] } { +if { [catch { OCC381_SaveAs D ${imagedir}/OCC381_2.std}] } { puts "OCC381: Error" } else { - catch {exec chmod 777 ${imagedir}/OCC381.std} - file delete ${imagedir}/OCC381.std + catch {exec chmod 777 ${imagedir}/OCC381_2.std} + file delete -force ${imagedir}/OCC381_2.std } diff --git a/tests/bugs/modalg_2/bug22818_1 b/tests/bugs/modalg_2/bug22818_1 index 255991aa99..fcd7c99ebd 100755 --- a/tests/bugs/modalg_2/bug22818_1 +++ b/tests/bugs/modalg_2/bug22818_1 @@ -18,12 +18,13 @@ edge e2 v2 v3 edge e3 v3 v1 wire w1 e1 e2 e3 plane pln 0 10 0 1 0 0 -mkface f1 pln w1 +mkface f1 pln +add w1 f1 don f1 revol result f1 0 10 0 0 0 1 180 checkshape result -set square 673.385 +set square 823.385 set nb_v_good 3 set nb_e_good 8 diff --git a/tests/bugs/modalg_2/bug22818_2 b/tests/bugs/modalg_2/bug22818_2 index 04a84a48ce..5272e462a7 100755 --- a/tests/bugs/modalg_2/bug22818_2 +++ b/tests/bugs/modalg_2/bug22818_2 @@ -19,12 +19,13 @@ edge e2 v2 v3 edge e3 v3 v1 wire w1 e1 e2 e3 plane pln 0 5 5 1 0 0 -mkface f1 pln w1 +mkface f1 pln +add w1 f1 don f1 revol result f1 0 10 0 0 0 1 180 checkshape result -set square 161.072 +set square 186.072 set nb_v_good 3 set nb_e_good 8 diff --git a/tests/bugs/modalg_5/bug23824_2 b/tests/bugs/modalg_5/bug23824_2 index 2bf29b7b83..454a51c0a5 100755 --- a/tests/bugs/modalg_5/bug23824_2 +++ b/tests/bugs/modalg_5/bug23824_2 @@ -19,7 +19,7 @@ setsweep -DT addsweep profile buildsweep result -set square 8997.97 +set square 8805.92 set nb_v_good 2 set nb_e_good 3 diff --git a/tests/bugs/modalg_5/bug23824_4 b/tests/bugs/modalg_5/bug23824_4 index baa5da5f2f..9643305022 100755 --- a/tests/bugs/modalg_5/bug23824_4 +++ b/tests/bugs/modalg_5/bug23824_4 @@ -20,7 +20,7 @@ setsweep -DT addsweep profile buildsweep result -set square 38260.5 +set square 38663.7 set nb_v_good 2 set nb_e_good 3 diff --git a/tests/bugs/modalg_5/bug23845 b/tests/bugs/modalg_5/bug23845 index 0e41e4c746..450b32d56f 100755 --- a/tests/bugs/modalg_5/bug23845 +++ b/tests/bugs/modalg_5/bug23845 @@ -12,8 +12,20 @@ restore [locate_data_file bug23845_profil_1a.brep] b concatC0wire aa a concatC0wire bb b -tolerance aa -checkshape aa +set CMP_TOL 1.e-6 -tolerance bb +# 1 +checkshape aa +set tolmaxres [tolmax aa] +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full MaxTolerance +if { ${MaxTolerance} > ${CMP_TOL} } { + puts "Error: invalid tolerance of first wire" +} + +# 2 checkshape bb +set tolmaxres [tolmax bb] +regexp {max tol = ([-0-9.+eE]+)} $tolmaxres full MaxTolerance +if { ${MaxTolerance} > ${CMP_TOL} } { + puts "Error: invalid tolerance of second wire" +} diff --git a/tests/bugs/modalg_5/bug23849_1 b/tests/bugs/modalg_5/bug23849_1 new file mode 100644 index 0000000000..f32ca345bb --- /dev/null +++ b/tests/bugs/modalg_5/bug23849_1 @@ -0,0 +1,17 @@ +puts "================" +puts "OCC23849" +puts "================" +puts "" +####################################################################### +# BOP regression +####################################################################### + +set BugNumber OCC23849 + +restore [locate_data_file bug23849_segment_1.brep] b1 +restore [locate_data_file bug23849_plane_1.brep] b2 + +bop b1 b2 +bopcommon result + +set square empty diff --git a/tests/bugs/modalg_5/bug23849_2 b/tests/bugs/modalg_5/bug23849_2 new file mode 100644 index 0000000000..8b87d96838 --- /dev/null +++ b/tests/bugs/modalg_5/bug23849_2 @@ -0,0 +1,23 @@ +puts "================" +puts "OCC23849" +puts "================" +puts "" +####################################################################### +# BOP regression +####################################################################### + +set BugNumber OCC23849 + +restore [locate_data_file bug23849_segment_1.brep] b1 +explode b1 f + +point p2D 4.1882396063720497 50.643343428894831 + +set info [b2dclassify b1_1 p2D] +set check [regexp "ON" $info] + +if { ${check} == 1 } { + puts "OK ${BugNumber}" +} else { + puts "Faulty ${BugNumber}" +} diff --git a/tests/bugs/modalg_5/bug23849_3 b/tests/bugs/modalg_5/bug23849_3 new file mode 100644 index 0000000000..c775f76192 --- /dev/null +++ b/tests/bugs/modalg_5/bug23849_3 @@ -0,0 +1,17 @@ +puts "================" +puts "OCC23849" +puts "================" +puts "" +####################################################################### +# BOP regression +####################################################################### + +set BugNumber OCC23849 + +restore [locate_data_file bug23849_segment_2.brep] b1 +restore [locate_data_file bug23849_plane_2.brep] b2 + +bop b1 b2 +bopcommon result + +set square empty diff --git a/tests/caf/driver/B6 b/tests/caf/driver/B6 index 7087686b5d..05b538e8c3 100755 --- a/tests/caf/driver/B6 +++ b/tests/caf/driver/B6 @@ -87,7 +87,7 @@ set SL2 [TestMultipleSelection D $Prism 0] #12 modify NewCommand D -PntOffset D $Pnt1 40 25 skip +PntOffset D $Pnt1 25 15 skip #13 recompute NewCommand D diff --git a/tests/mesh/data/standard/K9 b/tests/mesh/data/standard/K9 index cdf82b1220..a26b2be1cf 100755 --- a/tests/mesh/data/standard/K9 +++ b/tests/mesh/data/standard/K9 @@ -1,5 +1,3 @@ set TheFileName shading_099.brep -if { [string compare $command "shading"] != 0 } { - set bug_area "OCC22687" - set rel_tol 1.5 -} +set bug_area "OCC22687" +set rel_tol 1.5 diff --git a/tests/mesh/data/standard/W7 b/tests/mesh/data/standard/W7 index a0aa92e03c..cc79f61406 100755 --- a/tests/mesh/data/standard/W7 +++ b/tests/mesh/data/standard/W7 @@ -1,7 +1,9 @@ set TheFileName shading_wrongshape_027.brep set bug_freenodes "OCC22687" -set nbfreenodes(All) 1 +set nbfreenodes(All) 2 if { [string compare $command "shading"] != 0 } { set bug_area "OCC22687" set rel_tol 1.1 } +set nbcross(All) 2 +set bug_cross "OCC23184" diff --git a/tests/mesh/end b/tests/mesh/end index e37cdbb29b..5640b83cee 100644 --- a/tests/mesh/end +++ b/tests/mesh/end @@ -54,7 +54,7 @@ if { [string compare $bug_area ""] != 0 } { if { $rel_tol == 100 } { puts "TODO $bug_area All:^\\s*Error : The meshing algo cannot create mesh.\\s*$" } else { - puts "TODO $bug_area All:^\\s*Error : area by triangles differs from the actual area by \[-.0-9\]+ %\\s*$" + puts "TODO ?$bug_area All:^\\s*Error : area by triangles differs from the actual area by \[-.0-9\]+ %\\s*$" } } @@ -83,7 +83,7 @@ if { [string compare $bug_cross ""] != 0 } { # It may be different for different OS foreach os_cross [array names nbcross] { if { $nbcross($os_cross) != 0 } { - puts "TODO $bug_cross $os_cross:^\\s*Error: Cross face errors: $nbcross($os_cross)\\b\\s*" + puts "TODO $bug_cross $os_cross:Error: Cross face errors" } } } @@ -103,7 +103,7 @@ if { [string compare $bug_freenodes ""] != 0 } { # It may be different for different OS foreach os_freenodes [array names nbfreenodes] { if { $nbfreenodes($os_freenodes) != 0 } { - puts "TODO $bug_freenodes $os_freenodes:^\\s*Error: Free nodes: $nbfreenodes($os_freenodes)\\b\\s*" + puts "TODO $bug_freenodes $os_freenodes:Error: Free nodes" } } }