]> OCCT Git - occt.git/commitdiff
0023378: BRepAlgoAPI_Cut returns wrong result
authorapv <apv@opencascade.com>
Thu, 1 Jun 2017 09:00:46 +0000 (12:00 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 1 Jun 2017 10:55:29 +0000 (13:55 +0300)
Adding test cases only

tests/bugs/grids.list
tests/bugs/modalg_7/begin [new file with mode: 0644]
tests/bugs/modalg_7/bug23378_1 [new file with mode: 0644]
tests/bugs/modalg_7/bug23378_2 [new file with mode: 0644]

index 2aaf629806f3eab1cc0d36c6cc9e93d5438d719b..f1949ebb8488cb32c899e31f7f418c8569291e0a 100755 (executable)
@@ -9,12 +9,13 @@
 009 modalg_4
 010 modalg_5
 011 modalg_6
-012 moddata_1
-013 moddata_2
-014 moddata_3
-015 step
-016 caf
-017 mesh
-018 heal
-019 stlvrml
-020 splitshape
\ No newline at end of file
+012 modalg_7
+013 moddata_1
+014 moddata_2
+015 moddata_3
+016 step
+017 caf
+018 mesh
+019 heal
+020 stlvrml
+021 splitshape
\ No newline at end of file
diff --git a/tests/bugs/modalg_7/begin b/tests/bugs/modalg_7/begin
new file mode 100644 (file)
index 0000000..f40c35f
--- /dev/null
@@ -0,0 +1,20 @@
+set subgroup modalg
+
+set calcul "p"
+set type "i"
+
+proc OFFSETSHAPE {distance faces calcul type} {
+        uplevel #0 explode s f
+        uplevel #0 offsetparameter 1e-7 $calcul $type
+        uplevel #0 offsetload s $distance $faces
+        uplevel #0 offsetperform result
+}
+
+
+
+
+
+
+
+
+
diff --git a/tests/bugs/modalg_7/bug23378_1 b/tests/bugs/modalg_7/bug23378_1
new file mode 100644 (file)
index 0000000..9dc66b4
--- /dev/null
@@ -0,0 +1,33 @@
+puts "========"
+puts "OCC23378"
+puts "========"
+puts ""
+########################################
+# BRepAlgoAPI_Cut returns wrong result
+########################################
+
+# Restore the initial shape
+restore [locate_data_file bug23378_blower1.brep] b
+
+# Test case body
+explode b
+bop b_1 b_2
+bopcut r
+
+# Result of operation should be two shapes (checking)
+set oper_result [explode r]
+if {[llength $oper_result] != 2} {
+  puts "ERRROR: Result of BrepAlgoAPI_Cut is unexpected"
+}
+
+# Algorithmic check of r_1 shape
+renamevar r_1 result
+checkshape result
+checkprops result -s 864274
+
+# Visualization check of r_1 shape
+vinit
+vsetdispmode 1
+vdisplay result
+vfit
+checkview -screenshot -3d -path ${imagedir}/${test_image}.png
diff --git a/tests/bugs/modalg_7/bug23378_2 b/tests/bugs/modalg_7/bug23378_2
new file mode 100644 (file)
index 0000000..3e41a25
--- /dev/null
@@ -0,0 +1,33 @@
+puts "========"
+puts "OCC23378"
+puts "========"
+puts ""
+########################################
+# BRepAlgoAPI_Cut returns wrong result
+########################################
+
+# Restore the initial shape
+restore [locate_data_file bug23378_blower1.brep] b
+
+# Test case body
+explode b
+bop b_1 b_2
+bopcut r
+
+# Result of operation should be two shapes (checking)
+set oper_result [explode r]
+if {[llength $oper_result] != 2} {
+  puts "ERRROR: Result of BrepAlgoAPI_Cut is unexpected"
+}
+
+# Algorithmic check of r_2 shape
+renamevar r_2 result
+checkshape result
+checkprops result -s 2.77917
+
+# Visualization check of r_2 shape
+vinit
+vsetdispmode 1
+vdisplay result
+vfit
+checkview -screenshot -3d -path ${imagedir}/${test_image}.png