From c2e47bdd8db82982b53c3f160f4eb1c14b3b2e7c Mon Sep 17 00:00:00 2001 From: mkv Date: Thu, 26 Oct 2017 11:59:25 +0300 Subject: [PATCH] Update of tests database Test for 0023171: Got wrong result after stitching Test for 0023612: BRepPrimAPI_MakeTorus Test for 0023610: checkshape command does not detect mismatch of the tolerance values among the sub-shapes of the shape Test for 0023660: 'bsection' produces result with gap Test for 0024397: BRepBuilderAPI_Copy works not correct Test for 0023927: BRepProj_Projection produces Edge with one Vertex outside from curve Test for 0023902: Cannot build fillet Test for 0023669: Error in Boolean operations algorithm: section between cylindrical face and prism is incomplete Test for 0023660: 'bsection' produces result with gap Test for 0024100: Bad pcurve is built on a face while converting the shape from STEP format. Test for 0024319: Sewing makes a solid transparent Test for 0024302: Section operation modifies input argument Test for 0024397: BRepBuilderAPI_Copy works not correct Test for 0024418: Wrong section curves when intersecting analytical surfaces --- tests/bugs/modalg_5/bug24302 | 21 +++++++++++++++++++++ tests/bugs/modalg_5/bug24397_1 | 13 +++++++++++++ tests/bugs/modalg_5/bug24397_2 | 15 +++++++++++++++ tests/bugs/modalg_5/bug24397_3 | 15 +++++++++++++++ tests/bugs/modalg_7/bug23171_1 | 16 ++++++++++++++++ tests/bugs/modalg_7/bug23171_2 | 18 ++++++++++++++++++ tests/bugs/modalg_7/bug23610 | 34 ++++++++++++++++++++++++++++++++++ tests/bugs/modalg_7/bug23612 | 15 +++++++++++++++ tests/bugs/modalg_7/bug23660 | 22 ++++++++++++++++++++++ tests/bugs/modalg_7/bug23669 | 21 +++++++++++++++++++++ tests/bugs/modalg_7/bug23902 | 33 +++++++++++++++++++++++++++++++++ tests/bugs/modalg_7/bug23927 | 31 +++++++++++++++++++++++++++++++ tests/bugs/modalg_7/bug24319 | 21 +++++++++++++++++++++ tests/bugs/modalg_7/bug24418_1 | 25 +++++++++++++++++++++++++ tests/bugs/modalg_7/bug24418_2 | 26 ++++++++++++++++++++++++++ tests/bugs/step/bug24100 | 21 +++++++++++++++++++++ 16 files changed, 347 insertions(+) create mode 100644 tests/bugs/modalg_5/bug24302 create mode 100644 tests/bugs/modalg_5/bug24397_1 create mode 100644 tests/bugs/modalg_5/bug24397_2 create mode 100644 tests/bugs/modalg_5/bug24397_3 create mode 100644 tests/bugs/modalg_7/bug23171_1 create mode 100644 tests/bugs/modalg_7/bug23171_2 create mode 100644 tests/bugs/modalg_7/bug23610 create mode 100644 tests/bugs/modalg_7/bug23612 create mode 100644 tests/bugs/modalg_7/bug23660 create mode 100644 tests/bugs/modalg_7/bug23669 create mode 100644 tests/bugs/modalg_7/bug23902 create mode 100644 tests/bugs/modalg_7/bug23927 create mode 100644 tests/bugs/modalg_7/bug24319 create mode 100755 tests/bugs/modalg_7/bug24418_1 create mode 100755 tests/bugs/modalg_7/bug24418_2 create mode 100644 tests/bugs/step/bug24100 diff --git a/tests/bugs/modalg_5/bug24302 b/tests/bugs/modalg_5/bug24302 new file mode 100644 index 0000000000..a1e64956ba --- /dev/null +++ b/tests/bugs/modalg_5/bug24302 @@ -0,0 +1,21 @@ +puts "========" +puts "OCC24302" +puts "========" +puts "" +########################################### +# Section operation modifies input argument +########################################### + +restore [locate_data_file bug24302_MyPlane.brep] p +restore [locate_data_file bug24302_SolidBefore.brep] b + +regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance b] full MaxTol_b_1 + +bnondestructive 1 + +bop p b +regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance b] full MaxTol_b_2 + +set tol_abs_MaxTol 0.0001 +set tol_rel_MaxTol 0.0001 +checkreal "Section operation modifies input argument, Maxtolerance " ${MaxTol_b_2} ${MaxTol_b_1} ${tol_abs_MaxTol} ${tol_rel_MaxTol} diff --git a/tests/bugs/modalg_5/bug24397_1 b/tests/bugs/modalg_5/bug24397_1 new file mode 100644 index 0000000000..098adc67f5 --- /dev/null +++ b/tests/bugs/modalg_5/bug24397_1 @@ -0,0 +1,13 @@ +puts "============" +puts "OCC24397" +puts "============" +puts "" +####################################### +# BRepBuilderAPI_Copy works not correct +####################################### + +restore [locate_data_file case_1_wire3.brep] result + +tcopy result result1 + +checkprops result1 -equal result diff --git a/tests/bugs/modalg_5/bug24397_2 b/tests/bugs/modalg_5/bug24397_2 new file mode 100644 index 0000000000..aa6ed9c11a --- /dev/null +++ b/tests/bugs/modalg_5/bug24397_2 @@ -0,0 +1,15 @@ +puts "TODO OCC24397 ALL: Error : is WRONG because number of" + +puts "============" +puts "OCC24397" +puts "============" +puts "" +####################################### +# BRepBuilderAPI_Copy works not correct +####################################### + +restore [locate_data_file OCC485b.brep] b + +tcopy b b1 + +checknbshapes b1 -ref [nbshapes b] diff --git a/tests/bugs/modalg_5/bug24397_3 b/tests/bugs/modalg_5/bug24397_3 new file mode 100644 index 0000000000..ee790808e0 --- /dev/null +++ b/tests/bugs/modalg_5/bug24397_3 @@ -0,0 +1,15 @@ +puts "TODO OCC24397 ALL: Error : is WRONG because number of" + +puts "============" +puts "OCC24397" +puts "============" +puts "" +####################################### +# BRepBuilderAPI_Copy works not correct +####################################### + +restore [locate_data_file bug22678_objCut.brep] b + +tcopy b b1 + +checknbshapes b1 -ref [nbshapes b] diff --git a/tests/bugs/modalg_7/bug23171_1 b/tests/bugs/modalg_7/bug23171_1 new file mode 100644 index 0000000000..be46d42266 --- /dev/null +++ b/tests/bugs/modalg_7/bug23171_1 @@ -0,0 +1,16 @@ +puts "========" +puts "OCC23171" +puts "========" +puts "" +################################## +# Got wrong result after stitching +################################## + +restore [locate_data_file bug23171_stitch.brep] a +sewing r 0.000001 a + +checkshape r + +checknbshapes r -vertex 6 -edge 8 + +checkmaxtol r -min_tol 0.003 diff --git a/tests/bugs/modalg_7/bug23171_2 b/tests/bugs/modalg_7/bug23171_2 new file mode 100644 index 0000000000..3a108d8a77 --- /dev/null +++ b/tests/bugs/modalg_7/bug23171_2 @@ -0,0 +1,18 @@ +puts "========" +puts "OCC23171" +puts "========" +puts "" +################################## +# Got wrong result after stitching +################################## + +catch {pload XDE} + +igesread [locate_data_file bug23171_tube_surf.igs] s * +sewing r 0.1 s + +checkshape r + +checknbshapes r -vertex 4 -edge 6 + +checkmaxtol r -min_tol 0.2 diff --git a/tests/bugs/modalg_7/bug23610 b/tests/bugs/modalg_7/bug23610 new file mode 100644 index 0000000000..2376f439de --- /dev/null +++ b/tests/bugs/modalg_7/bug23610 @@ -0,0 +1,34 @@ +puts "TODO OCC23610 ALL: should be less then or equal to the minimal tolerance value of its sub-shapes" + +puts "========" +puts "OCC23610" +puts "========" +puts "" +######################################################################################################## +## checkshape command does not detect mismatch of the tolerance values among the sub-shapes of the shape +######################################################################################################## + +restore [locate_data_file buc60462b.brep] b + +foreach Face [explode b f] { + if {[checkshape $Face] == "This shape seems to be valid"} { + set ToleranceList [tolerance $Face] + regexp {FACE +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_face AvgTol_face MinTol_face + regexp {EDGE +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_edge AvgTol_edge MinTol_edge + regexp {VERTEX +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_vertex AvgTol_vertex MinTol_vertex + if {${MaxTol_face} > ${MinTol_edge} || ${MaxTol_face} > ${MinTol_vertex}} { + puts "Error: the tolerance value of the FACE $Face should be less then or equal to the minimal tolerance value of its sub-shapes(EDGES and VERTICES)" + } + } +} + +foreach Edge [explode b e] { + if {[checkshape $Edge] == "This shape seems to be valid"} { + set ToleranceList [tolerance $Edge] + regexp {EDGE +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_edge AvgTol_edge MinTol_edge + regexp {VERTEX +: +MAX=([-0-9.+eE]+) +AVG=([-0-9.+eE]+) +MIN=([-0-9.+eE]+)} $ToleranceList full MaxTol_vertex AvgTol_vertex MinTol_vertex + if {${MaxTol_edge} > ${MinTol_vertex}} { + puts "Error: the tolerance value of the EDGE $Edge should be less then or equal to the minimal tolerance value of its sub-shapes(VERTICES)" + } + } +} diff --git a/tests/bugs/modalg_7/bug23612 b/tests/bugs/modalg_7/bug23612 new file mode 100644 index 0000000000..8d9803c44f --- /dev/null +++ b/tests/bugs/modalg_7/bug23612 @@ -0,0 +1,15 @@ +puts "TODO OCC23612 ALL: Faulty shapes in variables faulty_1" + +puts "========" +puts "OCC23612" +puts "========" +puts "" +####################### +# BRepPrimAPI_MakeTorus +####################### + +ptorus p 10 2 90 270 45 + +checkshape p + +checkview -display p -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug23660 b/tests/bugs/modalg_7/bug23660 new file mode 100644 index 0000000000..2f4e245824 --- /dev/null +++ b/tests/bugs/modalg_7/bug23660 @@ -0,0 +1,22 @@ +puts "TODO OCC23660 ALL: Error: tolerance" + +puts "========" +puts "OCC23660" +puts "========" +puts "" +##################################### +# 'bsection' produces result with gap +##################################### + +restore [locate_data_file bug23660_shell_537.brep] s +restore [locate_data_file bug23660_face_537.brep] f + +bsection r s f -a +explode r + +smallview +donly r_9 r_10 +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png + +checkmaxtol r -min_tol 0.001 diff --git a/tests/bugs/modalg_7/bug23669 b/tests/bugs/modalg_7/bug23669 new file mode 100644 index 0000000000..3cfecb3765 --- /dev/null +++ b/tests/bugs/modalg_7/bug23669 @@ -0,0 +1,21 @@ +puts "TODO OCC23669 ALL: Error : bopsection is WRONG" + +puts "========" +puts "OCC23669" +puts "========" +puts "" +################################################################################################# +# Error in Boolean operations algorithm: section between cylindrical face and prism is incomplete +################################################################################################# + +restore [locate_data_file bug23669_theFace.brep] ff +restore [locate_data_file bug23669_Prism.brep] pr + +bop ff pr + +bopsection res + +checknbshapes res -edge 2 -m "bopsection" +bopcheck res + +checkview -display res -with {ff} -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug23902 b/tests/bugs/modalg_7/bug23902 new file mode 100644 index 0000000000..010a84b533 --- /dev/null +++ b/tests/bugs/modalg_7/bug23902 @@ -0,0 +1,33 @@ +puts "TODO OCC23902 ALL: Error: Cannot build fillet" + +puts "========" +puts "OCC23902" +puts "========" +puts "" +##################### +# Cannot build fillet +##################### + +bsplinecurve r 4 3 1 5 2 2 3 5 0 8 0 1 2 8 2 1 4 8 3 1 4 8 3 1 4 8 3 1 6 8 4 1 10 8 10 1 + +mkedge e1 r +vertex v1 10 8 10 +vertex v2 5 8 8 +edge e2 v1 v2 +vertex v3 0 8 0 +edge e3 v2 v3 +wire w e1 e2 e3 +mkplane f w +prism p f 0 5 0 +explode p e + +if {![catch {fillet result p 0.5 p_3}]} { + if {[regexp "This shape seems to be valid" [checkshape result] ] != 1} { + puts "Error: Cannot build fillet (1)" + } + if {[regexp "This shape seems to be OK" [bopcheck result] ] != 1} { + puts "Error: Cannot build fillet (2)" + } +} else { + puts "Error: Cannot build fillet (3)" +} diff --git a/tests/bugs/modalg_7/bug23927 b/tests/bugs/modalg_7/bug23927 new file mode 100644 index 0000000000..551f5ebb09 --- /dev/null +++ b/tests/bugs/modalg_7/bug23927 @@ -0,0 +1,31 @@ +puts "========" +puts "OCC23927" +puts "========" +puts "" +###################################################################### +# BRepProj_Projection produces Edge with one Vertex outside from curve +###################################################################### + +restore [locate_data_file bug23927_line.brep] line +restore [locate_data_file bug23927_surf.brep] surf + +breducetolerance surf + +prj p line surf 0.57735025882720947 -0.57735025882720947 0.57735025882720947 + +explode p_1 V + +smallview +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png + +explode line V + +set tol_abs 0.001 +set tol_rel 0 + +distmini d p_1_1 line_1 +checkreal "Projection, p1" [dval d_val] 0 $tol_abs $tol_rel + +distmini d p_1_2 line_2 +checkreal "Projection, p2" [dval d_val] 0 $tol_abs $tol_rel diff --git a/tests/bugs/modalg_7/bug24319 b/tests/bugs/modalg_7/bug24319 new file mode 100644 index 0000000000..b3c16d2311 --- /dev/null +++ b/tests/bugs/modalg_7/bug24319 @@ -0,0 +1,21 @@ +puts "========" +puts "OCC24319" +puts "========" +puts "" +################################## +# Sewing makes a solid transparent +################################## + +catch {pload XDE} + +igesread [locate_data_file bug24421_Rohteil_Pmod.igs] s * + +sewing r s + +checkview -display r -3d -path ${imagedir}/${test_image}.png + +set x 370 +set y 270 +if { [checkcolor $x $y 0.78039216995239258 0.55294120311737061 0.094117648899555206] != 1 } { + puts "Error: Sewing makes a solid transparent" +} diff --git a/tests/bugs/modalg_7/bug24418_1 b/tests/bugs/modalg_7/bug24418_1 new file mode 100755 index 0000000000..0c20301cac --- /dev/null +++ b/tests/bugs/modalg_7/bug24418_1 @@ -0,0 +1,25 @@ +puts "TODO OCC24418 ALL: Error : T=" + +puts "========" +puts "OCC24418" +puts "========" +puts "" +############################################################ +# Wrong section curves when intersecting analytical surfaces +############################################################ + +restore [locate_data_file OCC20964_revsolid.brep] b1 +restore [locate_data_file OCC20964_sphere.brep] b2 + +explode b1 f; copy b1_7 b1 +explode b2 f; copy b2_1 b2 +mksurface s1 b1 +mksurface s2 b2 +trimv s1t s1 0 230.14184397163115 + +intersect ii s1t s2 + +bounds ii_2 u1 u2 + +xdistcs ii_2 s1 u1 u2 10 2.0e-7 +xdistcs ii_2 s2 u1 u2 10 2.0e-7 diff --git a/tests/bugs/modalg_7/bug24418_2 b/tests/bugs/modalg_7/bug24418_2 new file mode 100755 index 0000000000..44e77de5b0 --- /dev/null +++ b/tests/bugs/modalg_7/bug24418_2 @@ -0,0 +1,26 @@ +puts "TODO OCC24418 ALL: Error : T=" + +puts "========" +puts "OCC24418" +puts "========" +puts "" +############################################################ +# Wrong section curves when intersecting analytical surfaces +############################################################ + +ptorus b1 25 24 90 +plane p 20 20 10 0 0 1 +pcone b2 p 10 8 40 +explode b1 f; copy b1_1 b1 +explode b2 f; copy b2_1 b2 +mksurface s1 b1 +mksurface s2 b2 +trimu s1t s1 0 1.5707963267948966 +trimv s2t s2 0 40.049968789001575 + +intersect ii s1t s2t + +bounds ii_1 u1 u2 + +xdistcs ii_1 s1 u1 u2 10 2.0e-7 +xdistcs ii_1 s2 u1 u2 10 2.0e-7 diff --git a/tests/bugs/step/bug24100 b/tests/bugs/step/bug24100 new file mode 100644 index 0000000000..1df0bc3f54 --- /dev/null +++ b/tests/bugs/step/bug24100 @@ -0,0 +1,21 @@ +puts "TODO OCC24100 ALL: Error : Bad pcurve is built on a face while converting the shape from STEP format" + +puts "========" +puts "OCC24100" +puts "========" +puts "" +############################################################################ +# Bad pcurve is built on a face while converting the shape from STEP format. +############################################################################ + +stepread [locate_data_file bug24100_REFLECT_CURVE_PART_5_SOL_ohne_Metadaten.stp] a * + +explode a_1 f + +pcurve a_1_686 + +set inter2 [2dintersect a_1_686_4 a_1_686_3] +set int2 [regexp {Intersection point 2} ${inter2}] +if { ${int2} == 1 } { + puts "Error : Bad pcurve is built on a face while converting the shape from STEP format" +} -- 2.20.1