From 6fcb77aa3a048a49cb2deb78ba1b55d5f5d26b5a Mon Sep 17 00:00:00 2001 From: apn Date: Mon, 4 Mar 2013 15:20:57 +0400 Subject: [PATCH] Adjusting testing cases for current state of OCCT --- tests/bugs/moddata_3/bug20866 | 42 +++++++++++++++++++++++++++++++++ tests/bugs/moddata_3/bug23703 | 4 ++-- tests/bugs/vis/bug21757_1 | 23 ++++++++++++++++++ tests/bugs/vis/bug21757_2 | 23 ++++++++++++++++++ tests/bugs/vis/bug7691 | 44 +++++++++++++++++++++++++++++++++++ 5 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/moddata_3/bug20866 create mode 100644 tests/bugs/vis/bug21757_1 create mode 100644 tests/bugs/vis/bug21757_2 create mode 100644 tests/bugs/vis/bug7691 diff --git a/tests/bugs/moddata_3/bug20866 b/tests/bugs/moddata_3/bug20866 new file mode 100644 index 0000000000..8b814149c4 --- /dev/null +++ b/tests/bugs/moddata_3/bug20866 @@ -0,0 +1,42 @@ +puts "============" +puts "OCC20866" +puts "============" +puts "" +####################################################################### +# BRepOffsetAPI_MakePipeShell fails on sections having different form +####################################################################### + +set BugNumber OCC20866 + +restore [locate_data_file bug20866_V_path_Eo_Co.brep] spine + +restore [locate_data_file bug20866_Compound_sections.brep] profile +explode profile + +mksweep spine +addsweep profile_1 +addsweep profile_2 +addsweep profile_3 +addsweep profile_4 +addsweep profile_5 +addsweep profile_6 +addsweep profile_7 + +if [catch { buildsweep result } ] { + puts "Faulty ${BugNumber} : buildsweep is wrong" +} else { + + set square 1.87535e+06 + + set nb_v_good 161 + set nb_e_good 299 + set nb_w_good 138 + set nb_f_good 138 + set nb_sh_good 1 + set nb_sol_good 0 + set nb_compsol_good 0 + set nb_compound_good 0 + set nb_shape_good 737 +} +set 2dviewer 0 + diff --git a/tests/bugs/moddata_3/bug23703 b/tests/bugs/moddata_3/bug23703 index 098d07b1c8..7d392115fa 100644 --- a/tests/bugs/moddata_3/bug23703 +++ b/tests/bugs/moddata_3/bug23703 @@ -6,8 +6,8 @@ puts "" ## Projection algorithm produces incomplete 2D-Curve #################################################################### -restore [locate_data_file bug23703_c2x.brep] c -restore [locate_data_file bug23703_s1.brep] s +restore [locate_data_file bug23703_c2x.draw] c +restore [locate_data_file bug23703_s1.draw] s mkface f s pcurve f diff --git a/tests/bugs/vis/bug21757_1 b/tests/bugs/vis/bug21757_1 new file mode 100644 index 0000000000..c2e42062b7 --- /dev/null +++ b/tests/bugs/vis/bug21757_1 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC21757" +puts "============" +puts "" +####################################################################### +# Funny (giraffe-like) shading of torus meshed with specific parameters (WNT) +####################################################################### + +set BugNumber OCC21757 + +vinit +vsetdispmode 1 +vclear + +# variant 1: mesh explicitly +ptorus result 200 50 45 +incmesh result 0.4 +vdisplay result +vfit +checkcolor 200 200 0.89 0.63 0.109 + +set only_screen 1 + diff --git a/tests/bugs/vis/bug21757_2 b/tests/bugs/vis/bug21757_2 new file mode 100644 index 0000000000..4937731a94 --- /dev/null +++ b/tests/bugs/vis/bug21757_2 @@ -0,0 +1,23 @@ +puts "============" +puts "OCC21757" +puts "============" +puts "" +####################################################################### +# Funny (giraffe-like) shading of torus meshed with specific parameters (WNT) +####################################################################### + +set BugNumber OCC21757 + +vinit +vsetdispmode 1 +vclear + +# variant 2: alternative implicit method of setting deflection +plane pl2 0 0 200 0 0 1 +ptorus result pl2 200 50 45 +vdisplay result +vsetshading result 0.0004 +vfit +checkcolor 200 200 0.89 0.63 0.109 + +set only_screen 1 diff --git a/tests/bugs/vis/bug7691 b/tests/bugs/vis/bug7691 new file mode 100644 index 0000000000..a782a60141 --- /dev/null +++ b/tests/bugs/vis/bug7691 @@ -0,0 +1,44 @@ +puts "============" +puts "OCC7691" +puts "============" +puts "" +####################################################################### +# Wrong hidden lines computed by HLRBRep_PolyAlgo and +# HLRBRep_PolyHLRToShape in OCC 5.1 +####################################################################### + +set BugNumber OCC7691 +set status 0 + +# load shape +restore [locate_data_file OCC7691-bottle.brep] shape +trotate shape 0 0 0 1 0 0 -90 + +# init viewer and compute hlr shape +vinit +vtop +vcomputehlr shape hlr +vfit + +set colorR 1 +set colorG 0 +set colorB 0 + +# move cursor not to select shape +vmoveto 0 0 + +# start position of color picking +set ptx 2 +set pty 200 +checkcolor $ptx $pty $colorR $colorG $colorB + +if { ${stat} != 0 } { + puts "HLR shape is correct" + puts "OK ${BugNumber}" +} else { + puts "HLR shape is incorrect" + puts "Faulty ${BugNumber}" +} + +set only_screen 1 +