From: emv Date: Tue, 3 Dec 2019 06:19:11 +0000 (+0300) Subject: Tests for 0031212: Modeling Algorithms - Incomplete result of the Offset operation... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR31212;p=occt-copy.git Tests for 0031212: Modeling Algorithms - Incomplete result of the Offset operation due to presence of internal edges in the input shape --- diff --git a/tests/offset/shape_type_i_c/YM1 b/tests/offset/shape_type_i_c/YM1 new file mode 100644 index 0000000000..b2611eb187 --- /dev/null +++ b/tests/offset/shape_type_i_c/YM1 @@ -0,0 +1,29 @@ +puts "TODO OCC31212 All: Error : The area of result shape is" +puts "TODO OCC31212 All: Error : The volume of result shape is" +puts "TODO OCC31212 All: Error : is WRONG because number of" + +puts "========" +puts "0031212: Modeling Algorithms - Incomplete result of the Offset operation due to presence of internal edges in the input shape" +puts "========" +puts "" + +restore [locate_data_file bug31212_input.brep] s +offsetparameter 1e-7 c i +offsetload s 0 +foreach f [explode s f] { + mksurface surf $f; + set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]; + if {$found && abs($z - 1) < 1.e-7} { + offsetonface $f 2 + } else { + offsetonface $f 5 + } +} +offsetperform result + +checkprops result -s 886929 -v 1.24711e+07 + +unifysamedom result_unif result +checknbshapes result_unif -face 251 -shell 1 -solid 1 + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png diff --git a/tests/offset/shape_type_i_c/YM2 b/tests/offset/shape_type_i_c/YM2 new file mode 100644 index 0000000000..085031a48f --- /dev/null +++ b/tests/offset/shape_type_i_c/YM2 @@ -0,0 +1,26 @@ +puts "========" +puts "0031212: Modeling Algorithms - Incomplete result of the Offset operation due to presence of internal edges in the input shape" +puts "========" +puts "" + +restore [locate_data_file bug31212_input_no_internal.brep] s + +offsetparameter 1e-7 c i +offsetload s 0 +foreach f [explode s f] { + mksurface surf $f; + set found [regexp {Axis :([-0-9.+eE]*), ([-0-9.+eE]*), ([-0-9.+eE]*)} [dump surf] full x y z]; + if {$found && abs($z - 1) < 1.e-7} { + offsetonface $f 2 + } else { + offsetonface $f 5 + } +} +offsetperform result + +checkprops result -s 886929 -v 1.24711e+07 + +unifysamedom result_unif result +checknbshapes result_unif -face 251 -shell 1 -solid 1 + +checkview -display result_unif -2d -path ${imagedir}/${test_image}.png