From 340054e17a817290861e420ade86f39e8ae8c769 Mon Sep 17 00:00:00 2001 From: apv Date: Thu, 24 Aug 2017 12:44:03 +0300 Subject: [PATCH] Update of tests database Test for 0027049: Make non-destructive mode be defined by default in Boolean operations Test for 0027052: Test boolean gdml_private ZI5 failure Test for 0027069: IGES parser does not recognize comments in Parameters section Test for 0027090: Point is classified IN solid but actually it is OUT Test for 0027170: Reading STEP files produces invalid shapes Test for 0027186: IGES - reconsider creation of Undefined entity in case of failure Test for 0027214: Duplicate of test cases Test for 0027224: Incorrect result of boolean operation in boolean bcut_complex Q1 test case Test for 0027227: Intersection curve is not continued to the surface boundary Test for 0027246: ShapeFix_Shape destroys shape Test for 0027251: Shape becomes invalid when exported to STEP and imported back Test for 0027316: exception when XAddShape Test for 0027378: BRepLib_MakeFace produces invalid faces on periodic surfaces in case the given parametrization does not match the default Test for 0027390: Box and Ellipsoid shape boolean cut and common introduce invalid result. Test for 0028119: Blend fails on fused identical but shifted tori Test for 0028144: Step reader - regression in comparison of version OCCT654 Test for 0028151: Sewing faces results in a shell with very big tolerance Test for 0027160: Weird results of the pipe algorithm Test for 0027623: Cannot find intersection line between two trimmed planar surfaces Test for 0027683: Inaccurate result by bopcut Test for 0027687: Section between shells of hull and deck is not closed Test for 0027711: Blend-on-blend corrupts the shape Test for 0027784: Thickness fails on cylinder with draft Test for 0027908: Exception during offset computation Test for 0027909: Exception during offset computation Test for 0027910: Sharing between edges was lost after offset operation Test for 0027911: Exception during offset computation Test for 0027912: Exception during offset computation Test for 0027928: BOP common produces empty compound Test for 0027948: Cut produces unexcpected shape Test for 0027950: Result of intersection algorithm depends too much on surface trim bounds Test for 0027701: Crash when export empty solid to STEP Test for 0027722: STEP error for Ellipse revol shape --- tests/boolean/bopsection/D6 | 15 - tests/boolean/gdml_private/bug27052_ZI5 | 10 + tests/bugs/heal/bug27246 | 17 + tests/bugs/iges/bug27186 | 14 + tests/bugs/modalg_7/bug27049 | 49 ++ tests/bugs/modalg_7/bug27090 | 81 +++ tests/bugs/modalg_7/bug27160 | 33 ++ tests/bugs/modalg_7/bug27224 | 29 ++ tests/bugs/modalg_7/bug27227 | 68 +++ tests/bugs/modalg_7/bug27378 | 55 ++ tests/bugs/modalg_7/bug27390_1 | 34 ++ tests/bugs/modalg_7/bug27390_2 | 34 ++ tests/bugs/modalg_7/bug27623 | 21 + tests/bugs/modalg_7/bug27683 | 26 + tests/bugs/modalg_7/bug27687 | 27 + tests/bugs/modalg_7/bug27711 | 58 +++ tests/bugs/modalg_7/bug27784 | 19 + tests/bugs/modalg_7/bug27908 | 18 + tests/bugs/modalg_7/bug27909 | 18 + tests/bugs/modalg_7/bug27910 | 18 + tests/bugs/modalg_7/bug27911 | 18 + tests/bugs/modalg_7/bug27912 | 18 + tests/bugs/modalg_7/bug27928 | 19 + tests/bugs/modalg_7/bug27948 | 28 ++ tests/bugs/modalg_7/bug27950 | 59 +++ tests/bugs/modalg_7/bug28119_1 | 20 + tests/bugs/modalg_7/bug28119_2 | 18 + tests/bugs/modalg_7/bug28119_3 | 18 + tests/bugs/modalg_7/bug28151 | 34 ++ tests/bugs/step/bug27251 | 25 + tests/bugs/step/bug27316 | 638 ++++++++++++++++++++++++ tests/bugs/step/bug28144 | 18 + tests/bugs/xde/bug27069 | 25 + tests/bugs/xde/bug27170_1 | 17 + tests/bugs/xde/bug27170_2 | 19 + tests/bugs/xde/bug27170_3 | 19 + tests/bugs/xde/bug27170_4 | 19 + tests/bugs/xde/bug27170_5 | 19 + tests/bugs/xde/bug27170_6 | 19 + tests/bugs/xde/bug27701 | 18 + tests/bugs/xde/bug27722 | 47 ++ 41 files changed, 1744 insertions(+), 15 deletions(-) delete mode 100644 tests/boolean/bopsection/D6 create mode 100644 tests/boolean/gdml_private/bug27052_ZI5 create mode 100755 tests/bugs/heal/bug27246 create mode 100644 tests/bugs/iges/bug27186 create mode 100644 tests/bugs/modalg_7/bug27049 create mode 100644 tests/bugs/modalg_7/bug27090 create mode 100644 tests/bugs/modalg_7/bug27160 create mode 100644 tests/bugs/modalg_7/bug27224 create mode 100644 tests/bugs/modalg_7/bug27227 create mode 100755 tests/bugs/modalg_7/bug27378 create mode 100755 tests/bugs/modalg_7/bug27390_1 create mode 100755 tests/bugs/modalg_7/bug27390_2 create mode 100644 tests/bugs/modalg_7/bug27623 create mode 100644 tests/bugs/modalg_7/bug27683 create mode 100644 tests/bugs/modalg_7/bug27687 create mode 100644 tests/bugs/modalg_7/bug27711 create mode 100644 tests/bugs/modalg_7/bug27784 create mode 100644 tests/bugs/modalg_7/bug27908 create mode 100644 tests/bugs/modalg_7/bug27909 create mode 100644 tests/bugs/modalg_7/bug27910 create mode 100644 tests/bugs/modalg_7/bug27911 create mode 100644 tests/bugs/modalg_7/bug27912 create mode 100644 tests/bugs/modalg_7/bug27928 create mode 100644 tests/bugs/modalg_7/bug27948 create mode 100644 tests/bugs/modalg_7/bug27950 create mode 100755 tests/bugs/modalg_7/bug28119_1 create mode 100755 tests/bugs/modalg_7/bug28119_2 create mode 100755 tests/bugs/modalg_7/bug28119_3 create mode 100644 tests/bugs/modalg_7/bug28151 create mode 100755 tests/bugs/step/bug27251 create mode 100644 tests/bugs/step/bug27316 create mode 100644 tests/bugs/step/bug28144 create mode 100644 tests/bugs/xde/bug27069 create mode 100644 tests/bugs/xde/bug27170_1 create mode 100644 tests/bugs/xde/bug27170_2 create mode 100644 tests/bugs/xde/bug27170_3 create mode 100644 tests/bugs/xde/bug27170_4 create mode 100644 tests/bugs/xde/bug27170_5 create mode 100644 tests/bugs/xde/bug27170_6 create mode 100644 tests/bugs/xde/bug27701 create mode 100644 tests/bugs/xde/bug27722 diff --git a/tests/boolean/bopsection/D6 b/tests/boolean/bopsection/D6 deleted file mode 100644 index 44dedd36eb..0000000000 --- a/tests/boolean/bopsection/D6 +++ /dev/null @@ -1,15 +0,0 @@ -puts "CTS22135" -puts "Generation of micro-edges during cut. " -puts "" -#axo -restore [locate_data_file cts21135a.brep] o -restore [locate_data_file cts21135b.brep] t - -bop o t - -#pkv f -bopsection result - -checkprops result -l 144.712 -checksection result -checkview -display result -2d -otherwise { o t } -l -path ${imagedir}/${test_image}.png diff --git a/tests/boolean/gdml_private/bug27052_ZI5 b/tests/boolean/gdml_private/bug27052_ZI5 new file mode 100644 index 0000000000..0a13d0904e --- /dev/null +++ b/tests/boolean/gdml_private/bug27052_ZI5 @@ -0,0 +1,10 @@ +puts "TODO ?OCC27052 All: Faulty shapes in variables faulty_1 to" + +source [locate_data_file equipement_chambre.asm.1.gdml.tcl] + +set So_N [llength [explode result So]] + +smallview +for {set i 1} {$i<=$So_N} {incr i} { + checkview -display result_${i} -2d -path ${imagedir}/${test_image}_${i}.png +} diff --git a/tests/bugs/heal/bug27246 b/tests/bugs/heal/bug27246 new file mode 100755 index 0000000000..15864ff11b --- /dev/null +++ b/tests/bugs/heal/bug27246 @@ -0,0 +1,17 @@ +puts "TODO OCC27246 ALL: Faulty shapes in variables faulty_1 to" + +puts "============" +puts "OCC27246" +puts "============" +puts "" +################################ +## ShapeFix_Shape destroys shape +################################ + +restore [locate_data_file bug27246_tmp.brep] tmp +checkshape tmp + +fixshape result tmp +checkshape result + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/iges/bug27186 b/tests/bugs/iges/bug27186 new file mode 100644 index 0000000000..27a4531b00 --- /dev/null +++ b/tests/bugs/iges/bug27186 @@ -0,0 +1,14 @@ +puts "TODO OCC27186 ALL: Directory Entry Error Status" + +puts "========" +puts "OCC27186" +puts "========" +puts "" +#################################################################### +# IGES - reconsider creation of Undefined entity in case of failure +#################################################################### + +set filename 919-004-T03-04-CP-VL.igs +igesbrep [locate_data_file ${filename}] a * + +entity 16233 diff --git a/tests/bugs/modalg_7/bug27049 b/tests/bugs/modalg_7/bug27049 new file mode 100644 index 0000000000..e5ea7d0077 --- /dev/null +++ b/tests/bugs/modalg_7/bug27049 @@ -0,0 +1,49 @@ +puts "TODO OCC27049 ALL: Error : result is WRONG because number of .* entities in shape" +puts "TODO OCC27049 ALL: Error: MaxTolerance" + +puts "============" +puts "OCC27049" +puts "============" +puts "" +####################################################################### +# Make non-destructive mode be defined by default in Boolean operations +####################################################################### + +restore [locate_data_file bug26619_shell_ft81_h0.brep] h0 +restore [locate_data_file bug26619_the_face.brep] f0 + +regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance h0] full MaxTolerance1 + +tolerance f0 + +#turn on non-destructive mode of BOP +#setflags h0 locked +#setflags f0 locked +#bnondestructive 1 + +bop h0 f0 +bopsection result +checkprops result -l 142.264 + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 46 + EDGE : 46 + WIRE : 0 + FACE : 0 + SHELL : 0 + SOLID : 0 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 93 +" +checknbshapes result -ref ${nbshapes_expected} -t -m "result" + +regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance h0] full MaxTolerance2 + +set expected_MaxTolerance ${MaxTolerance1} +set tol_abs_MaxTolerance 0.0001 +set tol_rel_MaxTolerance 0.0001 +checkreal "MaxTolerance" ${MaxTolerance2} ${expected_MaxTolerance} ${tol_abs_MaxTolerance} ${tol_rel_MaxTolerance} + +checkview -display result -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug27090 b/tests/bugs/modalg_7/bug27090 new file mode 100644 index 0000000000..9ce4e8f3d8 --- /dev/null +++ b/tests/bugs/modalg_7/bug27090 @@ -0,0 +1,81 @@ +puts "========" +puts "OCC27090" +puts "========" +puts "" +####################################################### +# Point is classified IN solid but actually it is OUT +####################################################### + +smallview + +# planar face +plane pln_f1 0 -875 -1.4432899320127035e-014 0 1 1.1102230246251565e-016 +erase pln_f1 +mkface f1 pln_f1 -1000000 1000000 -1000000 1000000 + +# planar face +plane pln_f2 1084.71007164 -980 -2128.6796868400002 1.110223024625157e-016 -1 1.1102230246251563e-016 +erase pln_f2 +mkface f2 pln_f2 -1000000 1000000 -1000000 1000000 + +# planar face +plane pln_f3 -308.43155740558768 -800 -2407.1041518310276 0.80901699437494767 9.2444637330587307e-033 -0.5877852522924728 +erase pln_f3 +mkface f3 pln_f3 -1000000 1000000 -1000000 1000000 + +# planar face +plane pln_f4 -381.4805392043022 -800 -2409.117597419774 -0.15639998811787861 -1.5422229525403152e-032 -0.98769380058635958 +erase pln_f4 +mkface f4 pln_f4 -1000000 1000000 -1000000 1000000 + +# cylindrical face +cylinder cyl_f5 0 0 -1.0103029524088925e-013 0 1 1.1102230246251565e-016 2440 +erase cyl_f5 +mkface f5 cyl_f5 0 6.2831853071795862 -1000000 1000000 + +# planar face +plane pln_f6 -309.45754782652125 -800 -2369.8806246344966 0.98769380058635958 -4.4408920985006262e-016 -0.15639998811787881 +erase pln_f6 +mkface f6 pln_f6 -1000000 1000000 -1000000 1000000 + +# planar face +plane pln_f7 -330.11602392243287 -800 -2299.7847255135234 -0.58778525229247269 -1.6653345369377348e-016 -0.80901699437494767 +erase pln_f7 +mkface f7 pln_f7 -1000000 1000000 -1000000 1000000 + +# cylindrical face +cylinder cyl_f8 0 0 -2.0206059048177849e-013 0 -1 1.1102230246251565e-016 2340 +erase cyl_f8 +mkface f8 cyl_f8 0 6.2831853071795862 -1000000 1000000 + +# make volume operation +mkvolume v f1 f2 f3 f4 f5 f6 f7 f8 + +donly v + +explode v + +if {[llength [explode v_6]] > 1} { + # We expect that v_6 is invalid solid containing 2 shells, + # and use the first shell to create a new valid solid. + + shape solid so + add v_6_1 solid + point p -131.81074615766306 -874.99999999999977 -2443.8619433375443 + + donly solid p + + set output [bclassify solid p] + + regexp {The point is ([^ ]*)} $output dummy state + if {$state != "OUT"} { + puts "Error: point is classified as $state, but must be OUT" + } else { + puts "Info: point is classified OUT, it is OK" + } +} else { + puts "Info: test is not actual for the current version" +} + +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug27160 b/tests/bugs/modalg_7/bug27160 new file mode 100644 index 0000000000..8b6f19a65c --- /dev/null +++ b/tests/bugs/modalg_7/bug27160 @@ -0,0 +1,33 @@ +puts "TODO OCC27160 ALL: Error: Weird results of the pipe algorithm" + +puts "========" +puts "OCC27160" +puts "========" +puts "" +##################################### +# Weird results of the pipe algorithm +##################################### + +cpulimit 3000 + +smallview + +restore [locate_data_file bug27160_path.rle] p +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}-path.png + +tuyau r p 0.2 +fit +checkview -screenshot -2d -path ${imagedir}/${test_image}-fit.png + +clear r + +mkface f r +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}-f.png + +set Log [bopcheck f] +if {[regexp "This shape seems to be OK" ${Log}] != 1} { + puts "Error: Weird results of the pipe algorithm" +} diff --git a/tests/bugs/modalg_7/bug27224 b/tests/bugs/modalg_7/bug27224 new file mode 100644 index 0000000000..3fdd7660f0 --- /dev/null +++ b/tests/bugs/modalg_7/bug27224 @@ -0,0 +1,29 @@ +puts "========" +puts "OCC27224" +puts "========" +puts "" +############################################################################ +# Incorrect result of boolean operation in boolean bcut_complex Q1 test case +############################################################################ + +restore [locate_data_file buc60290a.rle] sol1 +restore [locate_data_file buc60290b.rle] sol2 + +explode sol1 f +explode sol2 f + +bsection result sol2_1 sol1_1 + +regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection result] full nbv + +if { $nbv != 0 } { + puts "Error : Incorrect result of boolean operation" +} else { + puts "OK : Correct result of boolean operation" +} + +smallview +donly result +fit + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug27227 b/tests/bugs/modalg_7/bug27227 new file mode 100644 index 0000000000..9cfe04cdc1 --- /dev/null +++ b/tests/bugs/modalg_7/bug27227 @@ -0,0 +1,68 @@ +puts "============" +puts "OCC27227" +puts "============" +puts "" +############################################################# +# Intersection curve is not continued to the surface boundary +############################################################# + +ptorus a0 100 20 +tcopy a0 a1 +trotate a1 0 0 0 1 0 0 90 + +explode a0 f +explode a1 f + +smallview +donly a0_1 a1_1 + +bopcurves a0_1 a1_1 -2d + +disp c_5 + +set log [dump c_5] + +regexp {Degree +([-0-9.+eE]+), +([-0-9.+eE]+) Poles, +([-0-9.+eE]+)} ${log} full Degree Poles KnotsPoles +puts "Degree=${Degree}" +puts "Poles=${Poles}" +puts "KnotsPoles=${KnotsPoles}" +puts "" + +set Pole 1 +set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)" +regexp ${exp_string} ${log} full X_first Y_first Z_first + +puts "Pole=${Pole}" +puts "X_first=${X_first}" +puts "Y_first=${Y_first}" +puts "Z_first=${Z_first}" +puts "" + +set Pole ${Poles} +set exp_string " +${Pole} : +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+), +(\[-0-9.+eE\]+)" +regexp ${exp_string} ${log} full X_end Y_end Z_end + +puts "Pole=${Pole}" +puts "X_end=${X_end}" +puts "Y_end=${Y_end}" +puts "Z_end=${Z_end}" +puts "" + +set tol_abs [checkmaxtol a0] +set tol_rel 0.01 + +set expected_X_first 80. +checkreal "X_first" ${X_first} ${expected_X_first} ${tol_abs} ${tol_rel} +set expected_Y_first 0. +checkreal "Y_first" ${Y_first} ${expected_Y_first} ${tol_abs} ${tol_rel} +set expected_Z_first 0. +checkreal "Z_first" ${Z_first} ${expected_Z_first} ${tol_abs} ${tol_rel} +puts "" + +set expected_X_end 120. +checkreal "X_end" ${X_end} ${expected_X_end} ${tol_abs} ${tol_rel} +set expected_Y_end 0. +checkreal "Y_end" ${Y_end} ${expected_Y_end} ${tol_abs} ${tol_rel} +set expected_Z_end 0. +checkreal "Z_end" ${Z_end} ${expected_Z_end} ${tol_abs} ${tol_rel} +puts "" diff --git a/tests/bugs/modalg_7/bug27378 b/tests/bugs/modalg_7/bug27378 new file mode 100755 index 0000000000..492c8d61b7 --- /dev/null +++ b/tests/bugs/modalg_7/bug27378 @@ -0,0 +1,55 @@ +puts "TODO OCC27378 ALL: Error: BRepLib_MakeFace produces invalid faces on periodic surfaces" + +puts "========" +puts "OCC27378" +puts "========" +puts "" +############################################################################################################################ +# BRepLib_MakeFace produces invalid faces on periodic surfaces in case the given parametrization does not match the default +############################################################################################################################ + +cylinder cyl 10 +mkface fcyl cyl pi 3*pi -10 10 +checkshape fcyl +set Log [bopcheck fcyl] +if {[regexp "This shape seems to be OK" ${Log}] != 1} { + puts "Error: BRepLib_MakeFace produces invalid faces on periodic surfaces; fcyl" +} +checkview -display fcyl -2d -path ${imagedir}/${test_image}_fcyl.png + +sphere sph 10 +trimu spht sph pi 3*pi +mkface fsph spht +checkshape fsph +set Log [bopcheck fsph] +if {[regexp "This shape seems to be OK" ${Log}] != 1} { + puts "Error: BRepLib_MakeFace produces invalid faces on periodic surfaces; fsph" +} +checkview -display fsph -2d -path ${imagedir}/${test_image}_fsph.png + +cone con 30 0 +mkface fcon con pi 3*pi 0 20 +checkshape fcon +set Log [bopcheck fcon] +if {[regexp "This shape seems to be OK" ${Log}] != 1} { + puts "Error: BRepLib_MakeFace produces invalid faces on periodic surfaces; fcon" +} +checkview -display fcon -2d -path ${imagedir}/${test_image}_fcon.png + +torus tor 20 5 + +mkface ftor1 tor pi 3*pi 0 2*pi +checkshape ftor1 +set Log [bopcheck ftor1] +if {[regexp "This shape seems to be OK" ${Log}] != 1} { + puts "Error: BRepLib_MakeFace produces invalid faces on periodic surfaces; ftor1" +} +checkview -display ftor1 -2d -path ${imagedir}/${test_image}_ftor1.png + +mkface ftor2 tor 0 2*pi pi 3*pi +checkshape ftor2 +set Log [bopcheck ftor2] +if {[regexp "This shape seems to be OK" ${Log}] != 1} { + puts "Error: BRepLib_MakeFace produces invalid faces on periodic surfaces; ftor2" +} +checkview -display ftor2 -2d -path ${imagedir}/${test_image}_ftor2.png diff --git a/tests/bugs/modalg_7/bug27390_1 b/tests/bugs/modalg_7/bug27390_1 new file mode 100755 index 0000000000..7839fb43e8 --- /dev/null +++ b/tests/bugs/modalg_7/bug27390_1 @@ -0,0 +1,34 @@ +puts "========" +puts "OCC27390" +puts "========" +puts "" +########################################################################### +# Box and Ellipsoid shape boolean cut and common introduce invalid result. +########################################################################### + +restore [locate_data_file bug27390_Box_Ellipsoid.brep] c + +explode c + +bcommon result c_1 c_2 + +checkshape result + +checkprops result -s 8206.54 + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 5 + EDGE : 9 + WIRE : 4 + FACE : 4 + SHELL : 1 + SOLID : 1 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 25 +" +checknbshapes result -ref ${nbshapes_expected} -t -m "Boolean operations common" + +checkview -display result -3d -path ${imagedir}/${test_image}-3d.png +checkview -display result -2d -path ${imagedir}/${test_image}-2d.png diff --git a/tests/bugs/modalg_7/bug27390_2 b/tests/bugs/modalg_7/bug27390_2 new file mode 100755 index 0000000000..3338c17756 --- /dev/null +++ b/tests/bugs/modalg_7/bug27390_2 @@ -0,0 +1,34 @@ +puts "========" +puts "OCC27390" +puts "========" +puts "" +########################################################################### +# Box and Ellipsoid shape boolean cut and common introduce invalid result. +########################################################################### + +restore [locate_data_file bug27390_Box_Ellipsoid.brep] c + +explode c + +bcut result c_1 c_2 + +checkshape result + +checkprops result -s 34566 + +set nbshapes_expected " +Number of shapes in shape + VERTEX : 13 + EDGE : 21 + WIRE : 8 + FACE : 8 + SHELL : 1 + SOLID : 1 + COMPSOLID : 0 + COMPOUND : 1 + SHAPE : 53 +" +checknbshapes result -ref ${nbshapes_expected} -t -m "Boolean operations cut" + +checkview -display result -3d -path ${imagedir}/${test_image}-3d.png +checkview -display result -2d -path ${imagedir}/${test_image}-2d.png diff --git a/tests/bugs/modalg_7/bug27623 b/tests/bugs/modalg_7/bug27623 new file mode 100644 index 0000000000..8c9895daf9 --- /dev/null +++ b/tests/bugs/modalg_7/bug27623 @@ -0,0 +1,21 @@ +puts "TODO OCC27623 ALL: ERROR: OCC27623 is reproduced." + +puts "========" +puts "OCC27623" +puts "========" +puts "" +##################################################################### +# Cannot find intersection line between two trimmed planar surfaces +##################################################################### + +plane s1 0 0 0 0 0 1 1 0 0 +trim s1 s1 -10 10 -10 10 +plane s2 0 0 10 1 0 0 0 0 1 +trim s2 s2 -10+1.0e-5 10 -10+1.0e-5 10 + +intersect ii s1 s2 4.0e-4 + +set bug_info [string trim [whatis ii]] +if {[string length $bug_info] == 7} { + puts "ERROR: OCC27623 is reproduced. Intersection of trimmed planar surface has not been detected." +} diff --git a/tests/bugs/modalg_7/bug27683 b/tests/bugs/modalg_7/bug27683 new file mode 100644 index 0000000000..08e09ff4db --- /dev/null +++ b/tests/bugs/modalg_7/bug27683 @@ -0,0 +1,26 @@ +puts "TODO OCC27683 ALL: ERROR: OCC27683 is reproduced." + +puts "========" +puts "OCC27683" +puts "========" +puts "" +############################### +# Inaccurate result by bopcut +############################### + +restore [locate_data_file bug27683_shell.brep] s +restore [locate_data_file bug27683_solidreverse.brep] b + +bop s b +bopcut result + +set bug_info [string trim [bopcheck result]] +if {$bug_info != "This shape seems to be OK."} { + puts "ERROR: OCC27683 is reproduced. Result of bopcut operation is WRONG." +} + +vinit +vdisplay result +vfit + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug27687 b/tests/bugs/modalg_7/bug27687 new file mode 100644 index 0000000000..689aaf7c6c --- /dev/null +++ b/tests/bugs/modalg_7/bug27687 @@ -0,0 +1,27 @@ +puts "TODO OCC27687 ALL: ERROR: OCC27687 is reproduced." + +puts "========" +puts "OCC27687" +puts "========" +puts "" +######################################################### +# Section between shells of hull and deck is not closed +######################################################### + +restore [locate_data_file bug27746_first.brep] f +restore [locate_data_file bug27746_second.brep] s + +bsection result f s + +smallview +clear +display result +fit + +set bug_info [string trim [checksection result]] +set bug_info [string trim [string range $bug_info [expr {[string last ":" $bug_info] + 1}] [expr {[string length $bug_info] - 1}]]] +if {$bug_info != 0} { + puts "ERROR: OCC27687 is reproduced. Section is not closed: Number of alone Vertices: ${bug_info}." +} + +checkview -screenshot -2d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug27711 b/tests/bugs/modalg_7/bug27711 new file mode 100644 index 0000000000..8105c11ba3 --- /dev/null +++ b/tests/bugs/modalg_7/bug27711 @@ -0,0 +1,58 @@ +puts "TODO OCC27711 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC27711 ALL: ERROR: OCC27711 is reproduced." + +puts "========" +puts "OCC27711" +puts "========" +puts "" +##################################### +# Blend-on-blend corrupts the shape +##################################### + +smallview + +box a -1.5 -1.5 0 3 3 3 +box b -3 -3 -3 6 6 3 +bfuse result a b +set bug_info [string trim [checkshape result]] +if {$bug_info != "This shape seems to be valid"} { + puts "ERROR: Problem of test case functionality. Should be additionally investigated." +} +clear +display result +fit +xwd $imagedir/${casename}_step_0.png + +explode result e +blend result result 0.5 result_12 0.5 result_11 +set bug_info [string trim [checkshape result]] +if {$bug_info != "This shape seems to be valid"} { + puts "ERROR: Problem of test case functionality. Should be additionally investigated." +} +clear +display result +xwd $imagedir/${casename}_step_1.png + +explode result e +# The correct command format should be following: +# blend res res 0.5 res_7 0.5 res_11 +# but it does not work properly on win64 vc 10 +# so for automated test case following command format was used: +blend result result 0.5 result_11 +set bug_info [string trim [checkshape result]] +if {$bug_info != "This shape seems to be valid"} { + puts "ERROR: Problem of test case functionality. Should be additionally investigated." +} +clear +display result +xwd $imagedir/${casename}_step_2.png + +explode result e +blend result result 0.35 result_4 0.25 ressult_15 0.2 result_27 +set bug_info [string trim [checkshape result]] +if {$bug_info != "This shape seems to be valid"} { + puts "ERROR: OCC27711 is reproduced. Result of blend operation is WRONG." +} +clear +display result +xwd $imagedir/${casename}_step_3.png diff --git a/tests/bugs/modalg_7/bug27784 b/tests/bugs/modalg_7/bug27784 new file mode 100644 index 0000000000..d89e1f38c3 --- /dev/null +++ b/tests/bugs/modalg_7/bug27784 @@ -0,0 +1,19 @@ +puts "TODO OCC27784 ALL: An exception was caught" +puts "TODO OCC27784 ALL: \\*\\* Exception \\*\\*.*" +puts "TODO OCC27784 ALL: TEST INCOMPLETE" + +puts "========" +puts "OCC27784" +puts "========" +puts "" +########################################## +# Thickness fails on cylinder with draft +########################################## + +pcylinder cyl 50 30 +explode cyl f + +depouille draft cyl 0 0 -1 cyl_1 20 0 0 0 0 0 1 +explode draft f + +offsetcompshape d_thick draft -5 draft_2 diff --git a/tests/bugs/modalg_7/bug27908 b/tests/bugs/modalg_7/bug27908 new file mode 100644 index 0000000000..f3c760c3d0 --- /dev/null +++ b/tests/bugs/modalg_7/bug27908 @@ -0,0 +1,18 @@ +puts "TODO OCC27908 ALL: An exception was caught" +puts "TODO OCC27908 ALL: \\*\\* Exception \\*\\*.*" +puts "TODO OCC27908 ALL: TEST INCOMPLETE" + +puts "========" +puts "OCC27908" +puts "========" +puts "" +####################################### +# Exception during offset computation +####################################### + +restore [locate_data_file bug27908.brep] s + +offsetparameter 1e-7 p i +offsetload s 10 + +offsetperform result diff --git a/tests/bugs/modalg_7/bug27909 b/tests/bugs/modalg_7/bug27909 new file mode 100644 index 0000000000..f676829d3f --- /dev/null +++ b/tests/bugs/modalg_7/bug27909 @@ -0,0 +1,18 @@ +puts "TODO OCC27908 ALL: An exception was caught" +puts "TODO OCC27908 ALL: \\*\\* Exception \\*\\*.*" +puts "TODO OCC27908 ALL: TEST INCOMPLETE" + +puts "========" +puts "OCC27909" +puts "========" +puts "" +####################################### +# Exception during offset computation +####################################### + +restore [locate_data_file bug27909.brep] s + +offsetparameter 1e-7 p i +offsetload s 10 + +offsetperform result diff --git a/tests/bugs/modalg_7/bug27910 b/tests/bugs/modalg_7/bug27910 new file mode 100644 index 0000000000..3e5201fad6 --- /dev/null +++ b/tests/bugs/modalg_7/bug27910 @@ -0,0 +1,18 @@ +puts "TODO OCC27910 ALL: Faulty shapes in variables faulty_1 to faulty_" + +puts "========" +puts "OCC27910" +puts "========" +puts "" +####################################### +# Exception during offset computation +####################################### + +restore [locate_data_file bug27910.brep] s + +offsetparameter 1e-7 p i +offsetload s 10 +offsetperform result + +checkshape result + diff --git a/tests/bugs/modalg_7/bug27911 b/tests/bugs/modalg_7/bug27911 new file mode 100644 index 0000000000..1eb00c4564 --- /dev/null +++ b/tests/bugs/modalg_7/bug27911 @@ -0,0 +1,18 @@ +puts "TODO OCC27911 ALL: An exception was caught" +puts "TODO OCC27911 ALL: \\*\\* Exception \\*\\*.*" +puts "TODO OCC27911 ALL: TEST INCOMPLETE" + +puts "========" +puts "OCC27911" +puts "========" +puts "" +####################################### +# Exception during offset computation +####################################### + +restore [locate_data_file bug27911.brep] s + +offsetparameter 1e-7 p i +offsetload s 10 + +offsetperform result diff --git a/tests/bugs/modalg_7/bug27912 b/tests/bugs/modalg_7/bug27912 new file mode 100644 index 0000000000..d8267294fa --- /dev/null +++ b/tests/bugs/modalg_7/bug27912 @@ -0,0 +1,18 @@ +puts "TODO OCC27912 ALL: An exception was caught" +puts "TODO OCC27912 ALL: \\*\\* Exception \\*\\*.*" +puts "TODO OCC27912 ALL: TEST INCOMPLETE" + +puts "========" +puts "OCC27912" +puts "========" +puts "" +####################################### +# Exception during offset computation +####################################### + +restore [locate_data_file bug27912.brep] s + +offsetparameter 1e-7 p i +offsetload s 10 + +offsetperform result diff --git a/tests/bugs/modalg_7/bug27928 b/tests/bugs/modalg_7/bug27928 new file mode 100644 index 0000000000..5399984849 --- /dev/null +++ b/tests/bugs/modalg_7/bug27928 @@ -0,0 +1,19 @@ +puts "TODO OCC27928 ALL: ERROR: OCC27928 is reproduced." + +puts "========" +puts "OCC27928" +puts "========" +puts "" +###################################### +# BOP common produces empty compound +###################################### + +restore [locate_data_file bug27928_b1.brep] b1 +restore [locate_data_file bug27928_b2.brep] b2 + +bcommon result b1 b2 + +set bug_info [string trim [explode r]] +if {$bug_info == ""} { + puts "ERROR: OCC27928 is reproduced. Result of bcommon is empty." +} diff --git a/tests/bugs/modalg_7/bug27948 b/tests/bugs/modalg_7/bug27948 new file mode 100644 index 0000000000..9f5ebd5ecf --- /dev/null +++ b/tests/bugs/modalg_7/bug27948 @@ -0,0 +1,28 @@ +puts "TODO OCC27948 ALL: ERROR: OCC27948 is reproduced." + +puts "========" +puts "OCC27948" +puts "========" +puts "" +################################## +# Cut produces unexcpected shape +################################## + +restore [locate_data_file bug27948_a.brep] a +restore [locate_data_file bug27948_b.brep] b + +bcut res a b +explode res F + +vinit +vdisplay res +vfit +vdisplay res_16 +vsetdispmode res_16 1 + +set bug_info [string trim [vreadpixel 340 280 name]] +if {$bug_info == "DARKGOLDENROD3 1"} { + puts "ERROR: OCC27948 is reproduced." +} + +checkview -screenshot -3d -path ${imagedir}/${test_image}.png diff --git a/tests/bugs/modalg_7/bug27950 b/tests/bugs/modalg_7/bug27950 new file mode 100644 index 0000000000..5c08e6c018 --- /dev/null +++ b/tests/bugs/modalg_7/bug27950 @@ -0,0 +1,59 @@ +puts "TODO OCC27950 ALL: ERROR: OCC27950 is reproduced." + +puts "========" +puts "OCC27950" +puts "========" +puts "" +############################################################################ +# Result of intersection algorithm depends too much on surface trim bounds +############################################################################ + +restore [locate_data_file bug27950_s1.draw] s1 +restore [locate_data_file bug27950_s2.draw] s2 + +set bug_info [string trim [intersect i1 s1 s2]] +if {[llength $bug_info] != 4} { + puts "ERROR: OCC27950 is reproduced. Step #1. Result of intersection is [llength $bug_info]." +} + +trimv s2t s2 200 300 +set bug_info [string trim [intersect i2 s1 s2t]] +if {[llength $bug_info] != 4} { + puts "ERROR: OCC27950 is reproduced. Step #2. Result of intersection is [llength $bug_info]." +} + +trimv s2t s2 200 220 +set bug_info [string trim [intersect i3 s1 s2t]] +if {[llength $bug_info] != 4} { + puts "ERROR: OCC27950 is reproduced. Step #3. Result of intersection is [llength $bug_info]." +} + +trimv s2t s2 205.38050051360744 210.55652011282123 +set bug_info [string trim [intersect i4 s1 s2t]] +if {[llength $bug_info] != 4} { + puts "ERROR: OCC27950 is reproduced. Step #4. Result of intersection is [llength $bug_info]." +} + +trimv s2t s2 205 211 +set bug_info [string trim [intersect i5 s1 s2t]] +if {[llength $bug_info] != 4} { + puts "ERROR: OCC27950 is reproduced. Step #5. Result of intersection is [llength $bug_info]." +} + +trimv s2t s2 206 210 +set bug_info [string trim [intersect i6 s1 s2t]] +if {[llength $bug_info] != 4} { + puts "ERROR: OCC27950 is reproduced. Step #6. Result of intersection is [llength $bug_info]." +} + +trimv s2t s2 205.4 210.575 +set bug_info [string trim [intersect i7 s1 s2t]] +if {[llength $bug_info] != 4} { + puts "ERROR: OCC27950 is reproduced. Step #7. Result of intersection is [llength $bug_info]." +} + +trimv s2t s2 205.353 210.529 +set bug_info [string trim [intersect i8 s1 s2t]] +if {[llength $bug_info] != 4} { + puts "ERROR: OCC27950 is reproduced. Step #8. Result of intersection is [llength $bug_info]." +} diff --git a/tests/bugs/modalg_7/bug28119_1 b/tests/bugs/modalg_7/bug28119_1 new file mode 100755 index 0000000000..b5666f1692 --- /dev/null +++ b/tests/bugs/modalg_7/bug28119_1 @@ -0,0 +1,20 @@ +puts "TODO OCC28119 ALL: Error: Cannot find the result of BLEND-operation. The result of BOP operation will be returned." + +puts "========" +puts "OCC28119" +puts "========" +puts "" +################################################# +# Blend fails on fused identical but shifted tori +################################################# + +# identical secondary radi + +ptorus t1 100 10 +ptorus t2 100 10 +ttranslate t2 100 0 0 + +bfuseblend result t1 t2 5 + +checkview -display result -2d -path ${imagedir}/${test_image}-2d.png +checkview -display result -3d -path ${imagedir}/${test_image}-3d.png diff --git a/tests/bugs/modalg_7/bug28119_2 b/tests/bugs/modalg_7/bug28119_2 new file mode 100755 index 0000000000..d7dab3e386 --- /dev/null +++ b/tests/bugs/modalg_7/bug28119_2 @@ -0,0 +1,18 @@ +puts "========" +puts "OCC28119" +puts "========" +puts "" +################################################# +# Blend fails on fused identical but shifted tori +################################################# + +# large difference in secondary radi + +ptorus t1 100 10 +ptorus t2 100 9.9 +ttranslate t2 100 0 0 + +bfuseblend result t1 t2 5 + +checkview -display result -2d -path ${imagedir}/${test_image}-2d.png +checkview -display result -3d -path ${imagedir}/${test_image}-3d.png diff --git a/tests/bugs/modalg_7/bug28119_3 b/tests/bugs/modalg_7/bug28119_3 new file mode 100755 index 0000000000..0a9a75c5cb --- /dev/null +++ b/tests/bugs/modalg_7/bug28119_3 @@ -0,0 +1,18 @@ +puts "========" +puts "OCC28119" +puts "========" +puts "" +################################################# +# Blend fails on fused identical but shifted tori +################################################# + +# identical secondary radi + +ptorus t1 100 10 +ptorus t2 100 9.99 +ttranslate t2 100 0 0 + +bfuseblend result t1 t2 5 + +checkview -display result -2d -path ${imagedir}/${test_image}-2d.png +checkview -display result -3d -path ${imagedir}/${test_image}-3d.png diff --git a/tests/bugs/modalg_7/bug28151 b/tests/bugs/modalg_7/bug28151 new file mode 100644 index 0000000000..411da74c9c --- /dev/null +++ b/tests/bugs/modalg_7/bug28151 @@ -0,0 +1,34 @@ +puts "TODO OCC28151 ALL: Faulty shapes in variables faulty_1 to" +puts "TODO OCC28151 ALL: Error: MaxTolerance" + +puts "========" +puts "OCC28151" +puts "========" +puts "" +########################################################## +## Sewing faces results in a shell with very big tolerance +########################################################## + +restore [locate_data_file bug28151_surfs.brep] s + +puts "\nBefore sewing" +whatis s +checkshape s +tolerance s + +set expected_MaxTolerance 0.1 +sewing result ${expected_MaxTolerance} s + +puts "\nAfter sewing" +whatis result +checkshape result + +regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance result] full MaxTol + +set expected_MaxTolerance 0.1 +set tol_abs_MaxTolerance 0.05 +set tol_rel_MaxTolerance 0.5 +checkreal "MaxTolerance" ${MaxTol} ${expected_MaxTolerance} ${tol_abs_MaxTolerance} ${tol_rel_MaxTolerance} + +checkview -display s -3d -path ${imagedir}/${test_image}-s.png +checkview -display result -3d -path ${imagedir}/${test_image}-result.png diff --git a/tests/bugs/step/bug27251 b/tests/bugs/step/bug27251 new file mode 100755 index 0000000000..5f4ad01442 --- /dev/null +++ b/tests/bugs/step/bug27251 @@ -0,0 +1,25 @@ +puts "TODO OCC27251 All: Faulty shapes in variables faulty_1 to faulty_" + +puts "============" +puts "OCC27251" +puts "============" +puts "" +############################################################### +# Shape becomes invalid when exported to STEP and imported back +############################################################### + +restore [locate_data_file bug27251_cc.brep] c +whatis c +checkshape c + +set aFile ${imagedir}/bug27251.stp +catch { file delete ${aFile} } + +stepwrite 0 c ${aFile} + +stepread ${aFile} result * +whatis result_1 +checkshape result_1 + +checkview -display c -2d -path ${imagedir}/${test_image}_1.png +checkview -display result_1 -2d -path ${imagedir}/${test_image}_2.png diff --git a/tests/bugs/step/bug27316 b/tests/bugs/step/bug27316 new file mode 100644 index 0000000000..cd0176de30 --- /dev/null +++ b/tests/bugs/step/bug27316 @@ -0,0 +1,638 @@ +puts "TODO OCC27316 Windows: OSD_Exception_ACCESS_VIOLATION" +puts "TODO OCC27316 Linux: segmentation violation" +puts "TODO OCC27316 ALL:TEST INCOMPLETE" + +puts "========" +puts "OCC27316" +puts "========" +puts "" +########################## +# exception when XAddShape +########################## + +# model of rib for Buran wing. Drawing taken from www.buran.ru +# Create parameters +set B1 140. ;# half chord 1 +set B2 60. ;# half chord 2 +set B3 50. ;# breadth of upper part +set L 1000.; # wing length +set L_edge [expr "sqrt($L*$L+($B1-$B2)*($B1-$B2))"] ;# wing edge length +set step 135. ;# stiffener step +set step1 95. ;# 1 stiffener step +set B_st 30. ;# stiffener flange breadth +set B_st1 50. ;# stiffener flange breadth with inclined part +set H_st 30. ;# stiffener flange height +set t_st 1.5 ;# stiffener flange web thickness +set offset_fl 10.0 ;# stiffener side flange 1 offset +set t_fl 2.0 ;# stiffener side flange 1 thickness +set B_fl1 20.0 ;# stiffener side flange 1 width +set B_fl2 16.0 ;# stiffener side flange 2 width +set angle_cos [expr "$L/$L_edge"] ;# cos of angle between axis x and wing edge +set angle_sin [expr "($B1-$B2)/$L_edge"] ;# sin of angle between axis x and wing edge +set rad_rivet 1.;# radius of rivet +set step_rivet 20.;# step between rivets +set offset_rivet 5.;# offset between rivets and stringer +set rad_cut 45. ; # radius of big cut in middle plate +set rad_cut1 35. ; # radius of middle cut in middle plate +set rad_cut2 25. ; # radius of small cut in middle plate +set t_ang 1.; # angle bracket thickness +set h_ang 18.; # angle bracket length + + +# Create edge of upper stiffener flange +vertex r_1 0. $B1 0.; +set i 1; +set NN 8 +while {$i < $NN} { + vertex r_[expr "($i-1)*4+2"] [expr "(($i-1)*$step+$step1-$B_st1/2)*$angle_cos"] [expr "$B1-(($i-1)*$step+$step1-$B_st1/2)*$angle_sin"] 0.; + vertex r_[expr "($i-1)*4+3"] [expr "(($i-1)*$step+$step1-$B_st/2)*$angle_cos+$H_st*$angle_sin"] [expr "$B1-(($i-1)*$step+$step1-$B_st/2)*$angle_sin-$H_st*$angle_cos"] 0.; + vertex r_[expr "($i-1)*4+4"] [expr "(($i-1)*$step+$step1+$B_st/2)*$angle_cos+$H_st*$angle_sin"] [expr "$B1-(($i-1)*$step+$step1+$B_st/2)*$angle_sin-$H_st*$angle_cos"] 0.; + vertex r_[expr "($i-1)*4+5"] [expr "(($i-1)*$step+$step1+$B_st1/2)*$angle_cos"] [expr "$B1-(($i-1)*$step+$step1+$B_st1/2)*$angle_sin"] 0.; + vertex r_[expr "($i-1)*4+6"] [expr "($i*$step+$step1+$B_st1/2)*$angle_cos"] [expr "$B1-($i*$step+$step1+$B_st1/2)*$angle_sin"] 0.; + edge e_[expr "($i-1)*4+1"] r_[expr "($i-1)*4+1"] r_[expr "($i-1)*4+2"]; + edge e_[expr "($i-1)*4+2"] r_[expr "($i-1)*4+2"] r_[expr "($i-1)*4+3"]; + edge e_[expr "($i-1)*4+3"] r_[expr "($i-1)*4+3"] r_[expr "($i-1)*4+4"]; + fillet2d fil1_$i e_[expr "($i-1)*4+2"] e_[expr "($i-1)*4+3"] 3. + edge e_[expr "($i-1)*4+4"] r_[expr "($i-1)*4+4"] r_[expr "($i-1)*4+5"]; + fillet2d fil2_$i e_[expr "($i-1)*4+3"] e_[expr "($i-1)*4+4"] 3. + wire w_$i e_[expr "($i-1)*4+1"] e_[expr "($i-1)*4+2"] fil1_$i e_[expr "($i-1)*4+3"] fil2_$i e_[expr "($i-1)*4+4"]; + incr i; +} +vertex r_last $L $B2 0.; +edge e_last r_[expr "($i-2)*4+5"] r_last; +vertex vu_1 0. [expr "$B1-$B3"] 0.; +vertex vu_2 $L [expr "$B2-$B3"] 0.; +edge e_v1 vu_1 r_1 ; +edge e_v2 r_last vu_2; +edge e_v3 vu_2 vu_1; +wire w_upper e_v1 w_1 w_2 w_3 w_4 w_5 w_6 w_7 e_last e_v2 e_v3; + +mkplane f_upper w_upper; +#Create holes for rivets +circle c1 $offset_rivet [expr "$B1-$B3+$offset_rivet"] 0. $rad_rivet; +mkedge e_hole1 c1; +wire w_hole1 e_hole1; +mkplane f_hole1 w_hole1; +compound f_hole1 holes_upper; +set i 1; +set NNN [expr "int($L_edge/$step_rivet)"] +while {$i < $NNN} { + copy f_hole1 f_hole_$i + ttranslate f_hole_$i [expr "$i*$step_rivet*$angle_cos"] [expr "-($i*$step_rivet*$angle_sin)"] 0. ; + add f_hole_$i holes_upper; + incr i; +} +bcut f_upper_holes_1 f_upper holes_upper; +prism fwall_upper f_upper_holes_1 0 0 $t_st; + +#Create low side flange 1 +#Create wire and face for side flange +vertex vf_1 0. [expr "$B1-$B3+$offset_fl"] 0.; +vertex vf_2 0. [expr "$B1-$B3+$offset_fl+$t_fl"] 0. ; +vertex vf_3 0. [expr "$B1-$B3+$offset_fl"] $t_st; +vertex vf_4 0. [expr "$B1-$B3+$offset_fl+$t_fl"] $t_st; +vertex vf_5 0. [expr "$B1-$B3+$offset_fl"] $B_fl1; +vertex vf_6 0. [expr "$B1-$B3+$offset_fl+$t_fl"] $B_fl1; +vertex vf_7 0. [expr "$B1-$B3+$offset_fl-$t_st"] $t_st; +vertex vf_8 0. [expr "$B1-$B3+$offset_fl+$t_fl+$t_st"] $t_st; +edge side_fl_1 vf_1 vf_2; +edge side_fl_2 vf_2 vf_8; +edge side_fl_3 vf_8 vf_4; +edge side_fl_4 vf_4 vf_6; +edge side_fl_5 vf_6 vf_5; +edge side_fl_6 vf_5 vf_3; +edge side_fl_7 vf_3 vf_7; +edge side_fl_8 vf_7 vf_1; +fillet2d side_f1 side_fl_3 side_fl_4 1.5; +fillet2d side_f2 side_fl_6 side_fl_7 1.5; +wire w_side_fl side_fl_1 side_fl_2 side_fl_3 side_f1 side_fl_4 side_fl_5 side_fl_6 side_f2 side_fl_7 side_fl_8; +mkplane f_side_fl w_side_fl; +prism v_side_fl f_side_fl [expr "$L_edge*$angle_cos"] [expr "-$L_edge*$angle_sin"] 0. ; +bfuse f_upper v_side_fl fwall_upper + +#Create upper side flange 2 +#Create wire and face for side flange 2 +vertex vfs_1 0. [expr "$B1+$t_st"] [expr "$B_fl2-$t_st/2."]; +vertex vfs_2 0. [expr "$B1+$t_st"] [expr "-$B_fl2+$t_st/2."]; +vertex vfs_3 0. $B1 [expr "$B_fl2-$t_st/2."]; +vertex vfs_4 0. $B1 [expr "-$B_fl2+$t_st/2."]; +vertex vfs_5 0. [expr "$B1-3.*$t_st"] 0.; +vertex vfs_6 0. [expr "$B1-3.*$t_st"] $t_st; +vertex vfs_7 0. $B1 $t_st; +edge side_fl2_1 vfs_1 vfs_2; +edge side_fl2_2 vfs_2 vfs_4; +edge side_fl2_3 vfs_4 r_1; +edge side_fl2_4 r_1 vfs_5 ; +#fillet2d side_f12_1 side_fl2_3 side_fl2_4 1.5; +edge side_fl2_5 vfs_5 vfs_6; +edge side_fl2_6 vfs_6 vfs_7; +edge side_fl2_7 vfs_7 vfs_3; +#fillet2d side_f12_2 side_fl2_6 side_fl2_7 1.5; +edge side_fl2_8 vfs_3 vfs_1; +#wire w_side_fl2 side_fl2_1 side_fl2_2 side_fl2_3 side_f12_1 side_fl2_4 side_fl2_5 side_fl2_6 side_f12_2 side_fl2_7 side_fl2_8; +wire w_side_fl2 side_fl2_1 side_fl2_2 side_fl2_3 side_fl2_4 side_fl2_5 side_fl2_6 side_fl2_7 side_fl2_8; +mkplane f_side_fl2 w_side_fl2; + +#Create first side flange 2 +prism v_side_fl2 f_side_fl2 [expr "($step1-$B_st1/2)*$angle_cos"] [expr "-($step1-$B_st1/2)*$angle_sin"] 0. ; +bfuse f_upper_1 v_side_fl2 f_upper; + +#Create next side flange 2 +prism v_side_fl3 f_side_fl2 [expr "($step-$B_st1)*$angle_cos"] [expr "-($step-$B_st1)*$angle_sin"] 0. ; +set i 1; +set NN 7 +while {$i < $NN} { + copy v_side_fl3 v_side_fl_$i + ttranslate v_side_fl_$i [expr "(($i-1)*$step+$step1+$B_st1/2)*$angle_cos"] [expr "-(($i-1)*$step+$step1+$B_st1/2)*$angle_sin"] 0. ; + bfuse f_upper_[expr "$i+1"] v_side_fl_$i f_upper_[expr "$i"] ; + incr i; +} + +#Create last side flange 2 +prism v_side_fl4 f_side_fl2 [expr "($L_edge-6*$step-$step1-$B_st1/2)*$angle_cos"] [expr "-($L_edge-6*$step-$step-$B_st1/2)*$angle_sin"] 0. ; +ttranslate v_side_fl4 [expr "(6*$step+$step1+$B_st1/2)*$angle_cos"] [expr "-(6*$step+$step1+$B_st1/2)*$angle_sin"] 0. ; +bfuse f_uppern f_upper_7 v_side_fl4 ; +unifysamedom f_upper1 f_uppern; + +restore [locate_data_file bug27316_edges_fillet.brep] edges_fillet + +bclearobjects; +bcleartools; +baddobjects f_upper1 edges_fillet; +bfillds; +bbuild rgf; +explode rgf so; +copy rgf_1 v_upper + +set edges [explode edges_fillet e]; +set nbe [llength $edges] + +for {set i 1} {$i <= $nbe} {incr i} { + bmodified em edges_fillet_$i; + explode em e; + blend v_upper v_upper 1.5 em_1; +} + +#vdisplay v_upper; +#Create symmetrical part +copy v_upper v_lower; +tmirror v_lower 0. 0. 0. 0. 1. 0.; + +#Create middle plate +#Create wire and face for middle plate +vertex vfl_1 0. [expr "-($B1-$B3+$offset_fl)"] 0.; +vertex vfl_2 $L [expr "($B2-$B3+$offset_fl)"] 0.; +vertex vfl_3 $L [expr "-($B2-$B3+$offset_fl)"] 0.; +edge pl_1 vf_1 vfl_1; +edge pl_2 vfl_1 vfl_3; +edge pl_3 vfl_3 vfl_2; +edge pl_4 vfl_2 vf_1; +wire w_plate pl_1 pl_2 pl_3 pl_4; +mkplane f_plate w_plate; + +#Cut holes +#Create upper row of holes +bcut f_plate_holes f_plate holes_upper; + +#Create lower row of holes +copy holes_upper holes_lower; +tmirror holes_lower 0. 0. 0. 0. 1. 0. +bcut plate_holes_ul f_plate_holes holes_lower; +#Create 1 row of holes +compound holes_1; +set i 1; +set NN1 [expr "int(2*($B1-$B3+$offset_rivet)/$step_rivet)"] +while {$i < $NN1} { + copy f_hole1 f_hole1_$i + ttranslate f_hole1_$i 0. [expr "-($i*$step_rivet)"] 0. ; + add f_hole1_$i holes_1; + incr i; +} +bcut plate_holes_1 plate_holes_ul holes_1; + +#Create next rows of holes +set Nrow 6; #number of vertical rows +set j 1; +while {$j < $Nrow} { + copy f_hole1 f_hole_$j; + ttranslate f_hole_$j [expr "7*$step_rivet*$j*$angle_cos"] [expr "-(7*$step_rivet*$j)*$angle_sin-$step_rivet"] 0. ; + compound f_hole_$j holes_$j; + set i 1; + set NN2 [expr "$NN1-$j-1"]; + while {$i < $NN2} { + copy f_hole_$j f_holev_$i + ttranslate f_holev_$i 0. [expr "-($i*$step_rivet)"] 0. ; + add f_holev_$i holes_$j; + incr i; + } + bcut plate_holes_[expr "$j+1"] plate_holes_$j holes_$j; + incr j; +} + +#Create holes for cuts +#Create cut1 +circle c2 [expr "$offset_rivet+3.5*$step_rivet*$angle_cos"] 0. 0. $rad_cut; +mkedge e_hole2 c2; +wire w_hole2 e_hole2; +mkplane f_big_hole w_hole2; +bcut plate_holes_pl1 plate_holes_6 f_big_hole; + +#Create cut2 +copy f_big_hole f_big_hole1 +ttranslate f_big_hole1 [expr "7.*$step_rivet*$angle_cos"] 0. 0.; +bcut plate_holes_pl2 plate_holes_pl1 f_big_hole1; + +#Create cut3 +copy f_big_hole1 f_big_hole2 +ttranslate f_big_hole2 [expr "7.*$step_rivet*$angle_cos"] 0. 0.; +bcut plate_holes_pl3 plate_holes_pl2 f_big_hole2; + +#Create cut4 +circle c3 [expr "$offset_rivet+24.5*$step_rivet*$angle_cos"] 0. 0. $rad_cut1; +mkedge e_hole3 c3; +wire w_hole3 e_hole3; +mkplane f_big_hole3 w_hole3; +bcut plate_holes_pl4 plate_holes_pl3 f_big_hole3; + +#Create cut5 +circle c4 [expr "$offset_rivet+31.5*$step_rivet*$angle_cos"] 0. 0. $rad_cut2; +mkedge e_hole4 c4; +wire w_hole4 e_hole4; +mkplane f_big_hole4 w_hole4; +bcut plate_holes_pl5 plate_holes_pl4 f_big_hole4; +prism v_plate plate_holes_pl5 0. 0. [expr "-$t_st"]; + +#Create reinforcement of cut1 +circle c5 [expr "$offset_rivet+3.5*$step_rivet*$angle_cos+$rad_cut"] 0. [expr "3*$t_st"] 0. 1. 0. 3*$t_st; +mkedge en5 c5 [expr "3.141"] [expr "5*3.141/4"]; +circle c6 [expr "$offset_rivet+3.5*$step_rivet*$angle_cos+$rad_cut"] 0. [expr "3*$t_st"] 0. 1. 0. 4*$t_st; +mkedge en6 c6 [expr "3.141"] [expr "5*3.141/4"]; +explode en5 v; +explode en6 v; +vertex p1 [expr "$offset_rivet+3.5*$step_rivet*$angle_cos+$rad_cut+$t_st"] 0. 0. ; +vertex p2 [expr "$offset_rivet+3.5*$step_rivet*$angle_cos+$rad_cut+$t_st"] 0. [expr "-$t_st"] ; +edge en1 en6_2 en5_2; +edge en2 en5_1 p1; +edge en3 p1 p2; +edge en4 p2 en6_1; +wire w_en en1 en5 en2 en3 en4 en6; +mkplane f_en w_en; +revol rev_en1 f_en [expr "$offset_rivet+3.5*$step_rivet*$angle_cos"] 0. 0. 0. 0. 1. 360. +bfuse v_plate1 v_plate rev_en1; + +#Create reinforcement of cut2 +copy rev_en1 rev_en2; +ttranslate rev_en2 [expr "7.*$step_rivet*$angle_cos"] 0. 0.; +bfuse v_plate2 v_plate1 rev_en2; + +#Create reinforcement of cut3 +copy rev_en2 rev_en3; +ttranslate rev_en3 [expr "7.*$step_rivet*$angle_cos"] 0. 0.; +bfuse v_plate3 v_plate2 rev_en3; + +#Create reinforcement of cut4 +circle c7 [expr "$offset_rivet+24.5*$step_rivet*$angle_cos+$rad_cut1"] 0. [expr "3*$t_st"] 0. 1. 0. 3*$t_st; +mkedge en7 c7 [expr "3.141"] [expr "5*3.141/4"]; +circle c8 [expr "$offset_rivet+24.5*$step_rivet*$angle_cos+$rad_cut1"] 0. [expr "3*$t_st"] 0. 1. 0. 4*$t_st; +mkedge en8 c8 [expr "3.141"] [expr "5*3.141/4"]; +explode en7 v; +explode en8 v; +vertex p3 [expr "$offset_rivet+24.5*$step_rivet*$angle_cos+$rad_cut1+$t_st"] 0. 0. ; +vertex p4 [expr "$offset_rivet+24.5*$step_rivet*$angle_cos+$rad_cut1+$t_st"] 0. [expr "-$t_st"] ; +edge en9 en8_2 en7_2; +edge en10 en7_1 p3; +edge en11 p3 p4; +edge en12 p4 en8_1; +wire w_en1 en7 en10 en11 en12 en8 en9 ; +mkplane f_en1 w_en1; +revol rev_en4 f_en1 [expr "$offset_rivet+24.5*$step_rivet*$angle_cos"] 0. 0. 0. 0. 1. 360. +bfuse v_plate4 v_plate3 rev_en4; + +#Create reinforcement of cut5 +circle c9 [expr "$offset_rivet+31.5*$step_rivet*$angle_cos+$rad_cut2"] 0. [expr "3*$t_st"] 0. 1. 0. 3*$t_st; +mkedge en13 c9 [expr "3.141"] [expr "5*3.141/4"]; +circle c10 [expr "$offset_rivet+31.5*$step_rivet*$angle_cos+$rad_cut2"] 0. [expr "3*$t_st"] 0. 1. 0. 4*$t_st; +mkedge en14 c10 [expr "3.141"] [expr "5*3.141/4"]; +explode en13 v; +explode en14 v; +vertex p5 [expr "$offset_rivet+31.5*$step_rivet*$angle_cos+$rad_cut2+$t_st"] 0. 0. ; +vertex p6 [expr "$offset_rivet+31.5*$step_rivet*$angle_cos+$rad_cut2+$t_st"] 0. [expr "-$t_st"] ; +edge en15 en14_2 en13_2; +edge en16 en13_1 p5; +edge en17 p5 p6; +edge en18 p6 en14_1; +wire w_en2 en13 en16 en17 en18 en14 en15 ; +mkplane f_en2 w_en2; +revol rev_en5 f_en2 [expr "$offset_rivet+31.5*$step_rivet*$angle_cos"] 0. 0. 0. 0. 1. 360. +bfuse v_plate5 v_plate4 rev_en5; + +#Create pattern rivet 1 for 2 plates +circle c11 $offset_rivet [expr "$B1-$B3+$offset_rivet"] [expr " 0.3*$t_st"] 1. 0. 0. [expr "2.5* $rad_rivet"]; +mkedge e_riv c11 [expr "-acos(0.7*$t_st/2.5*$rad_rivet)"] 0; +explode e_riv v; +copy e_riv e_riv1; +tmirror e_riv1 0. 0. 0. 0. 0. 1.; +reverse e_riv1; +explode e_riv1 v; +vertex riv1 $offset_rivet [expr "$B1-$B3+$offset_rivet+$rad_rivet"] $t_st; +vertex riv2 $offset_rivet [expr "$B1-$B3+$offset_rivet+$rad_rivet"] [expr " -$t_st"]; +edge riv_e1 riv2 riv1; +edge riv_e2 e_riv_2 e_riv1_2; +edge riv_e3 e_riv1_1 riv2 ; +edge riv_e4 riv1 e_riv_1 ; +#fillet2d riv_fil1 riv_e1 riv_e3 0.25; +#fillet2d riv_fil2 riv_e2 riv_e1 0.25; +wire w_riv e_riv riv_e2 e_riv1 riv_e3 riv_e1 riv_e4; +mkplane f_riv w_riv; +revol rev_riv f_riv $offset_rivet [expr "$B1-$B3+$offset_rivet"] 0. 0. 0. 1. 360.; + +#Create pattern rivet 2 for 2 plates +copy e_riv e_riv3; +ttranslate e_riv3 0. 0. [expr " -$t_st"]; +explode e_riv3 v; +copy e_riv1 e_riv2; +ttranslate e_riv2 0. 0. [expr " -$t_ang"]; +explode e_riv2 v; +vertex riv3 $offset_rivet [expr "$B1-$B3+$offset_rivet+$rad_rivet"] 0; +vertex riv4 $offset_rivet [expr "$B1-$B3+$offset_rivet+$rad_rivet"] [expr " -$t_ang-$t_st"]; + +edge riv_e5 riv4 riv3; +edge riv_e6 riv3 e_riv3_1; +edge riv_e7 e_riv3_2 e_riv2_2; +edge riv_e8 e_riv2_1 riv4; +wire w_rivl e_riv3 riv_e7 e_riv2 riv_e8 riv_e5 riv_e6; +mkplane f_rivl w_rivl; +revol rev_rivl f_rivl $offset_rivet [expr "$B1-$B3+$offset_rivet"] 0. 0. 0. 1. 360.; + +#Create pattern rivet 3 for 3 plates +edge riv_e9 e_riv_2 e_riv2_2; +edge riv_e10 riv1 riv4; +wire w_riv3pl e_riv2 riv_e8 riv_e10 riv_e4 e_riv riv_e9 ; +mkplane f_riv3pl w_riv3pl; +revol rev_riv3pl f_riv3pl $offset_rivet [expr "$B1-$B3+$offset_rivet"] 0. 0. 0. 1. 360.; + + +#Create rivets upper row +compound rev_riv rivets_upper; +set i 1; +set NNN [expr "int($L_edge/$step_rivet)"] +while {$i < $NNN} { + if {fmod ($i,7) != 0 } { + copy rev_riv rev_riv_$i + ttranslate rev_riv_$i [expr "$i*$step_rivet*$angle_cos"] [expr "-($i*$step_rivet*$angle_sin)"] 0. ; + add rev_riv_$i rivets_upper; + } else { + copy rev_riv3pl rev_riv_$i + ttranslate rev_riv_$i [expr "$i*$step_rivet*$angle_cos"] [expr "-($i*$step_rivet*$angle_sin)"] 0. ; + add rev_riv_$i rivets_upper; + } + incr i; +} + +#Create rivets lower row +copy rivets_upper rivets_lower; +tmirror rivets_lower 0. 0. 0. 0. 1. 0.; + +#Create 1 row of rivets + +compound rivets_1; +set i 1; +set NN1 [expr "int(2*($B1-$B3+$offset_rivet)/$step_rivet)"] +while {$i < $NN1} { + copy rev_rivl rev_$i + ttranslate rev_$i 0. [expr "-($i*$step_rivet)"] 0. ; + add rev_$i rivets_1; + incr i; +} + + +#Create next rows of rivets +set Nrow 6; #number of vertical rows +set j 1; +while {$j < $Nrow} { + copy rev_rivl rev_riv1e_$j; + ttranslate rev_riv1e_$j [expr "7*$step_rivet*$j*$angle_cos"] [expr "-(7*$step_rivet*$j)*$angle_sin-$step_rivet"] 0. ; + compound rev_riv1e_$j rivets_$j; + set i 1; + set NN2 [expr "$NN1-$j-1"]; + while {$i < $NN2} { + copy rev_riv1e_$j rev_riv1v_$i + ttranslate rev_riv1v_$i 0. [expr "-($i*$step_rivet)"] 0. ; + add rev_riv1v_$i rivets_$j; + incr i; + } + incr j; +} +#Create profile for bracket +set ang_x1 [expr "($offset_rivet+7*$step_rivet-$h_ang/2)*$angle_cos"]; +set ang_y1 [expr "$B1-$B3+$offset_fl-($offset_rivet+7*$step_rivet-$h_ang/2)*$angle_sin"]; +vertex ang_1 $ang_x1 $ang_y1 [expr " -$t_st"]; +set ang_x2 [expr "($offset_rivet+7*$step_rivet+$h_ang/2)*$angle_cos"]; +set ang_y2 [expr "$B1-$B3+$offset_fl-($offset_rivet+7*$step_rivet+$h_ang/2)*$angle_sin"]; +vertex ang_2 $ang_x2 $ang_y2 [expr " -$t_st"]; +set ang_y3 [expr "$B1-$B3+$offset_fl-($offset_rivet+7*$step_rivet-$h_ang/2)*$angle_sin"]; +vertex ang_3 $ang_x1 $ang_y3 [expr " -$t_st-$t_ang"]; +set ang_y4 [expr "$B1-$B3+$offset_fl-($offset_rivet+7*$step_rivet+$h_ang/2)*$angle_sin"]; +vertex ang_4 $ang_x2 $ang_y4 [expr " -$t_st-$h_ang"]; +set ang_x5 [expr "($offset_rivet+7*$step_rivet+$h_ang/2-$t_ang)*$angle_cos"]; +set ang_y5 [expr "$B1-$B3+$offset_fl-($offset_rivet+7*$step_rivet+$h_ang/2-$t_ang)*$angle_sin"]; +vertex ang_5 $ang_x5 $ang_y5 [expr " -$t_st-$h_ang"]; +set ang_y6 [expr "$B1-$B3+$offset_fl-($offset_rivet+7*$step_rivet+$h_ang/2-$t_ang)*$angle_sin"]; +vertex ang_6 $ang_x5 $ang_y6 [expr " -$t_st-$t_ang"]; +edge ang_e1 ang_1 ang_2; +edge ang_e2 ang_2 ang_4; +edge ang_e3 ang_4 ang_5; +edge ang_e4 ang_5 ang_6; +edge ang_e5 ang_6 ang_3; +edge ang_e6 ang_3 ang_1; +fillet2d ang_f1 ang_e4 ang_e5 2.; +fillet2d ang_f2 ang_e5 ang_e6 0.4; +fillet2d ang_f3 ang_e3 ang_e4 0.4; +wire w_ang ang_e1 ang_e2 ang_e3 ang_f3 ang_e4 ang_f1 ang_e5 ang_f2 ang_e6; +mkplane f_ang w_ang; +prism v_ang f_ang 0. [expr "-2. *$B1"] 0.; + + +#Create prisms to cut profile +#prism v_pr1 +#vertex p1_1 0. [expr "-($B1-$B3+$offset_fl)-$B1"] 0.; +#vertex p1_2 $L [expr "-($B2-$B3+$offset_fl)-$B1"] 0.; +vertex p1_1 0. [expr "-($B1-$B3+$offset_fl)-3.*$B1"] 0.; +vertex p1_2 $L [expr "-($B2-$B3+$offset_fl)-3.*$B1"] 0.; +edge ep1_1 vfl_3 p1_2; +edge ep1_2 p1_2 p1_1; +edge ep1_3 p1_1 vfl_1; +wire w_pr1 ep1_1 pl_2 ep1_2 ep1_3; +mkplane f_pr1 w_pr1; +prism v_pr1 f_pr1 0. 0. [expr "-4.*$h_ang"]; + +#prism v_pr2 +vertex p2_1 $ang_x5 [expr "$ang_y5-10."] [expr " -$t_st-$h_ang"]; +vertex p2_2 $ang_x5 $ang_y5 [expr " -$t_st-$h_ang+10."]; +edge ep2_1 p2_1 p2_2; +edge ep2_2 p2_2 ang_5; +edge ep2_3 ang_5 p2_1; +wire w_pr2 ep2_1 ep2_2 ep2_3; +mkplane f_pr2 w_pr2; +prism v_pr2 f_pr2 [expr "$L*$angle_cos"] [expr "-$L*$angle_sin"] 0.; + +#prism v_pr3 +copy v_pr2 v_pr3; +tmirror v_pr3 0. 0. 0. 0. 1. 0.; + +#prism v_pr4 +set ang_xpr1 [expr "($offset_rivet+7*$step_rivet-$h_ang/2+5.)*$angle_cos"]; +set ang_ypr1 [expr "$B1-$B3+$offset_fl-($offset_rivet+7*$step_rivet-$h_ang/2+5.)*$angle_sin"]; +vertex p4_1 $ang_xpr1 $ang_ypr1 [expr " -$t_st"]; +vertex p4_2 $ang_x1 [expr "$ang_y1-5."] [expr " -$t_st"]; +edge ep4_1 p4_1 p4_2; +edge ep4_2 p4_2 ang_1; +edge ep4_3 ang_1 p4_1; +wire w_pr4 ep4_1 ep4_2 ep4_3; +mkplane f_pr4 w_pr4; +prism v_pr4 f_pr4 0. 0. [expr "-$L"]; + +#prism v_pr5 +copy v_pr4 v_pr5; +tmirror v_pr5 0. 0. 0. 0. 1. 0.; + +#Create bracket 1 +prism vholes_1 holes_1 0. 0. [expr "-4.*$h_ang"]; +bcut v_ang_1a v_ang v_pr1; +bcut v_ang_1b v_ang_1a v_pr2; +bcut v_ang_1c v_ang_1b v_pr3; +bcut v_ang_1d v_ang_1c v_pr4; +bcut v_ang_1e v_ang_1d v_pr5; +bcut v_ang_1f v_ang_1e vholes_1; +compound v_ang_1f brackets; + +set Nrow 6; #number of vertical rows +set j 2; +while {$j < $Nrow} { + copy v_ang_1e v_ang2; + ttranslate v_ang2 [expr "7*($j-1)*$step_rivet*$angle_cos"] [expr "-7*($j-1)*$step_rivet*$angle_sin"] 0.; + bcut v_ang3 v_ang2 v_pr1; + bcut v_ang4 v_ang3 v_pr3; + copy v_pr5 v_pr5_$j; + ttranslate v_pr5_$j [expr "7*($j-1)*$step_rivet*$angle_cos"] [expr "7*($j-1)*$step_rivet*$angle_sin"] 0.; + bcut v_ang5 v_ang4 v_pr5_$j; + prism vholes_$j holes_$j 0. 0. [expr "-4.*$h_ang"]; + bcut v_ang1_$j v_ang5 vholes_$j; + add v_ang1_$j brackets; + incr j; +} + + +#vdisplay v_plate5 v_upper v_lower rivets_1 rivets_2 rivets_3 rivets_4 rivets_5 rivets_upper rivets_lower brackets + +compound rivets_1 rivets_2 rivets_3 rivets_4 rivets_5 brackets brackets_with_rivets; +compound rivets_upper v_upper v_upper_rivets; +compound v_lower rivets_lower v_lower_rivets; +compound v_plate5 v_upper_rivets v_lower_rivets brackets_with_rivets wing_rib; + + +pload MODELING VISUALIZATION OCAF XDE; +NewDocument D;#creates new document with name D; + +#Assign names to shapes +XAddShape D wing_rib; + +SetName D 0:1:1:1 wing_rib; +SetName D 0:1:1:1:1 v_plate5; +SetName D 0:1:1:1:2 v_upper_rivets; +SetName D 0:1:1:1:3 v_lower_rivets; +SetName D 0:1:1:1:4 brackets_with_rivets; +SetName D 0:1:1:2 v_plate5; +SetName D 0:1:1:4 v_upper_rivets; +SetName D 0:1:1:4:1 rivets_upper; +SetName D 0:1:1:4:2 v_upper; +SetName D 0:1:1:5 rivets_upper; +SetName D 0:1:1:8 v_upper; +SetName D 0:1:1:8:1 v_upper; +SetName D 0:1:1:9 v_upper; +SetName D 0:1:1:10 v_lower_rivets; +SetName D 0:1:1:10:1 v_lower; +SetName D 0:1:1:10:2 rivets_lower; +SetName D 0:1:1:11 v_lower; +SetName D 0:1:1:13 rivets_lower; + +set i 1; +set NNN [expr "int($L_edge/$step_rivet)+1"] +while {$i < $NNN} { + SetName D 0:1:1:5:$i rev_riv_up_$i; + SetName D 0:1:1:13:$i rev_riv_low_$i; + set ind [expr "$i+13"] + XSetColor D 0:1:1:$ind 0.576 0.576 0.432; + incr i; +} + +XSetColor D 0:1:1:$ind 0.576 0.576 0.432; +puts $ind +SetName D 0:1:1:64 brackets_with_rivets; +SetName D 0:1:1:64:1 rivets_on_bracket_1; +SetName D 0:1:1:65 rivets_on_bracket_1; +SetName D 0:1:1:64:2 rivets_on_bracket_2; +SetName D 0:1:1:67 rivets_on_bracket_2; +SetName D 0:1:1:64:3 rivets_on_bracket_3; +SetName D 0:1:1:68 rivets_on_bracket_3; +SetName D 0:1:1:64:4 rivets_on_bracket_4; +SetName D 0:1:1:69 rivets_on_bracket_4; +SetName D 0:1:1:64:5 rivets_on_bracket_5; +SetName D 0:1:1:70 rivets_on_bracket_5; +SetName D 0:1:1:64:6 brackets; +SetName D 0:1:1:71 brackets; +SetName D 0:1:1:71:1 bracket_1; +SetName D 0:1:1:72 bracket_1; +SetName D 0:1:1:71:2 bracket_2; +SetName D 0:1:1:74 bracket_2; +SetName D 0:1:1:71:3 bracket_3; +SetName D 0:1:1:76 bracket_3; +SetName D 0:1:1:71:4 bracket_4; +SetName D 0:1:1:78 bracket_4; +SetName D 0:1:1:71:5 bracket_5; +SetName D 0:1:1:80 bracket_5; + +SetName D 0:1:1:3 plate5; +XSetColor D 0:1:1:3 0.58 0.57 0.57; +XSetColor D 0:1:1:6 0.576 0.576 0.432; +XSetColor D 0:1:1:7 0.576 0.576 0.432; +XSetColor D 0:1:1:66 0.576 0.576 0.432; +XSetColor D 0:1:1:75 0.58 0.57 0.57; +XSetColor D 0:1:1:77 0.58 0.57 0.57; +XSetColor D 0:1:1:79 0.58 0.57 0.57; +XSetColor D 0:1:1:81 0.58 0.57 0.57; + + +#All attributes (colors, dimensions can be exported only on basic solids without locations noty compounds +XGetShape v1 D 0:1:1:9; +explode v1 e; +#Set rivet diameter +XAddDimension D v1_388; #0:1:4:1 +XSetDimensionType D 0:1:4:1 15; + +XSetDimensionValue D 0:1:4:1 2.; +#Set length +XAddDimension D v1_296; #0:1:4:2 +XSetDimensionType D 0:1:4:2 2; + +XSetDimensionValue D 0:1:4:2 100.; + +XGetShape v2 D 0:1:1:3; +explode v2 f + +#Set cut diameter +XAddDimension D v2_24; #0:1:4:3 +XSetDimensionType D 0:1:4:3 15; + +XSetDimensionValue D 0:1:4:3 35.; + +#Set tolerance +XAddGeomTolerance D v2_2; #0:1:4: +XSetToleranceValue D 0:1:4:4 0.5 + +XSetTypeOfTolerance D 0:1:4:4 2 + +XSetTypeOfToleranceValue D 0:1:4:4 1 + +#======== +XAddShape D bracket_5 diff --git a/tests/bugs/step/bug28144 b/tests/bugs/step/bug28144 new file mode 100644 index 0000000000..49f5140fda --- /dev/null +++ b/tests/bugs/step/bug28144 @@ -0,0 +1,18 @@ +puts "========" +puts "OCC28144" +puts "========" +puts "" +########################################################### +# Step reader - regression in comparison of version OCCT654 +########################################################### + +testreadstep [locate_data_file bug28118_18547.stp] solid + +checkshape solid + +explode solid F + +renamevar solid_128 face + +checkview -display face -2d -path ${imagedir}/${test_image}-2d.png +checkview -display face -3d -path ${imagedir}/${test_image}-3d.png diff --git a/tests/bugs/xde/bug27069 b/tests/bugs/xde/bug27069 new file mode 100644 index 0000000000..482ff4d843 --- /dev/null +++ b/tests/bugs/xde/bug27069 @@ -0,0 +1,25 @@ +puts "TODO OCC27069 ALL: Error: IGES parser does not recognize comments in Parameters section" + +puts "==========" +puts "OCC27069" +puts "==========" +puts "" +###################################################################### +# IGES parser does not recognize comments in Parameters section +###################################################################### + +igesbrep [locate_data_file bug27069_points-with-comments.igs] a * + +set Log [data c] + +if {[regexp {Unknown message invoked with the keyword} $Log] == 1} { + puts "Error: IGES parser does not recognize comments in Parameters section" +} else { + puts "OK: IGES parser recognize comments in Parameters section" +} + +if {[regexp {Directory Entry : parameter 1 \(entity type\) is incorrect} $Log] == 1} { + puts "Error: IGES parser does not recognize comments in Parameters section" +} else { + puts "OK: IGES parser recognize comments in Parameters section" +} diff --git a/tests/bugs/xde/bug27170_1 b/tests/bugs/xde/bug27170_1 new file mode 100644 index 0000000000..b627be01f0 --- /dev/null +++ b/tests/bugs/xde/bug27170_1 @@ -0,0 +1,17 @@ +puts "============" +puts "CR27170" +puts "============" +puts "" + +############################################# +# Reading STEP files produces invalid shapes +############################################# + +ReadStep D [locate_data_file bug27170_ComauRomanTransformerTAXXX-0000016267.stp] + +XGetOneShape result D + +checkshape result + +checkview -display result -2d -path ${imagedir}/${casename}-2d.png +checkview -display result -3d -path ${imagedir}/${casename}-3d.png diff --git a/tests/bugs/xde/bug27170_2 b/tests/bugs/xde/bug27170_2 new file mode 100644 index 0000000000..bb4fa4eb4b --- /dev/null +++ b/tests/bugs/xde/bug27170_2 @@ -0,0 +1,19 @@ +puts "TODO CR27170 ALL: Faulty shapes in variables faulty_1 to" + +puts "============" +puts "CR27170" +puts "============" +puts "" + +############################################# +# Reading STEP files produces invalid shapes +############################################# + +ReadStep D [locate_data_file bug27170_ComauXTypeEntireAssVAGXA-1900002350.stp] + +XGetOneShape result D + +checkshape result + +checkview -display result -2d -path ${imagedir}/${casename}-2d.png +checkview -display result -3d -path ${imagedir}/${casename}-3d.png diff --git a/tests/bugs/xde/bug27170_3 b/tests/bugs/xde/bug27170_3 new file mode 100644 index 0000000000..d867db0763 --- /dev/null +++ b/tests/bugs/xde/bug27170_3 @@ -0,0 +1,19 @@ +puts "TODO CR27170 ALL: Faulty shapes in variables faulty_1 to" + +puts "============" +puts "CR27170" +puts "============" +puts "" + +############################################# +# Reading STEP files produces invalid shapes +############################################# + +ReadStep D [locate_data_file bug27170_ComauXTypeMajorAssVAGWS-ASSY00002078.stp] + +XGetOneShape result D + +checkshape result + +checkview -display result -2d -path ${imagedir}/${casename}-2d.png +checkview -display result -3d -path ${imagedir}/${casename}-3d.png diff --git a/tests/bugs/xde/bug27170_4 b/tests/bugs/xde/bug27170_4 new file mode 100644 index 0000000000..53d4775998 --- /dev/null +++ b/tests/bugs/xde/bug27170_4 @@ -0,0 +1,19 @@ +puts "TODO CR27170 ALL: Faulty shapes in variables faulty_1 to" + +puts "============" +puts "CR27170" +puts "============" +puts "" + +############################################# +# Reading STEP files produces invalid shapes +############################################# + +ReadStep D [locate_data_file bug27170_HiLex_Door_DS_FS_RH_140723.stp] + +XGetOneShape result D + +checkshape result + +checkview -display result -2d -path ${imagedir}/${casename}-2d.png +checkview -display result -3d -path ${imagedir}/${casename}-3d.png diff --git a/tests/bugs/xde/bug27170_5 b/tests/bugs/xde/bug27170_5 new file mode 100644 index 0000000000..49bd6432cd --- /dev/null +++ b/tests/bugs/xde/bug27170_5 @@ -0,0 +1,19 @@ +puts "TODO CR27170 ALL: Faulty shapes in variables faulty_1 to" + +puts "============" +puts "CR27170" +puts "============" +puts "" + +############################################# +# Reading STEP files produces invalid shapes +############################################# + +ReadStep D [locate_data_file bug27170_PX2-11-17-2015.stp] + +XGetOneShape result D + +checkshape result + +checkview -display result -2d -path ${imagedir}/${casename}-2d.png +checkview -display result -3d -path ${imagedir}/${casename}-3d.png diff --git a/tests/bugs/xde/bug27170_6 b/tests/bugs/xde/bug27170_6 new file mode 100644 index 0000000000..445eca9086 --- /dev/null +++ b/tests/bugs/xde/bug27170_6 @@ -0,0 +1,19 @@ +puts "TODO CR27170 ALL: Faulty shapes in variables faulty_1 to" + +puts "============" +puts "CR27170" +puts "============" +puts "" + +############################################# +# Reading STEP files produces invalid shapes +############################################# + +ReadStep D [locate_data_file bug27170_PowerTailgate_EX52525.stp] + +XGetOneShape result D + +checkshape result + +checkview -display result -2d -path ${imagedir}/${casename}-2d.png +checkview -display result -3d -path ${imagedir}/${casename}-3d.png diff --git a/tests/bugs/xde/bug27701 b/tests/bugs/xde/bug27701 new file mode 100644 index 0000000000..4b8a3281da --- /dev/null +++ b/tests/bugs/xde/bug27701 @@ -0,0 +1,18 @@ +puts "========" +puts "OCC27701" +puts "========" +puts "" +######################################### +# Crash when export empty solid to STEP +######################################### + +pload DCAF + +catch {exec rm ${imagedir}/bug27701.stp} + +restore [locate_data_file bug27701.brep] s + +NewDocument D +XAddShape D s +XSetColor D 0:1:1:1 1 0 0 s +WriteStep D ${imagedir}/bug27701.stp diff --git a/tests/bugs/xde/bug27722 b/tests/bugs/xde/bug27722 new file mode 100644 index 0000000000..f586f3f3c4 --- /dev/null +++ b/tests/bugs/xde/bug27722 @@ -0,0 +1,47 @@ +puts "TODO OCC27722 ALL: Faulty shapes in variables faulty_1 to faulty_" +puts "TODO OCC27722 ALL: Error : is WRONG because number of " + +puts "========" +puts "OCC27722" +puts "========" +puts "" +###################################### +# STEP error for Ellipse revol shape +###################################### + +catch {exec rm ${imagedir}/bug27722.stp} + +ellipse ge 0 0 20 10 +mkedge te ge 0 pi/2.0 +revol re te 0 0 0 0 1 0 360 + +set i_Vertex 0 +set i_Edge 0 +set i_Wire 0 +set i_Face 0 +set i_Shell 0 +set i_Solid 0 +set i_CSolid 0 +set i_Compound 0 +set i_Shape 0 +set bug_info [string trim [checkshape re]] +if {$bug_info == "This shape seems to be valid"} { + set nb_info [string trim [nbshapes re]] + set i_Vertex [string trim [lindex $nb_info 7]] + set i_Edge [string trim [lindex $nb_info 10]] + set i_Wire [string trim [lindex $nb_info 13]] + set i_Face [string trim [lindex $nb_info 16]] + set i_Shell [string trim [lindex $nb_info 19]] + set i_Solid [string trim [lindex $nb_info 22]] + set i_CSolid [string trim [lindex $nb_info 25]] + set i_Compound [string trim [lindex $nb_info 28]] + set i_Shape [string trim [lindex $nb_info 31]] +} else { + puts "ERROR: Problem of test case functionality. Should be additionally investigated." +} + +stepwrite a re ${imagedir}/bug27722.stp + +stepread ${imagedir}/bug27722.stp sr * +checkshape sr_1 +checknbshapes sr_1 -vertex ${i_Vertex} -edge ${i_Edge} -wire ${i_Wire} -face ${i_Face} -shell ${i_Shell} -solid ${i_Solid} -compsolid ${i_CSolid} -compound ${i_Compound} -shape ${i_Shape}