0031587: Modeling Data - add BRepTools::RemoveInternals() removing internal sub-shape...
[occt.git] / tests / bugs / moddata_3 / bug31587_3
diff --git a/tests/bugs/moddata_3/bug31587_3 b/tests/bugs/moddata_3/bug31587_3
new file mode 100644 (file)
index 0000000..96c5194
--- /dev/null
@@ -0,0 +1,34 @@
+puts "================"
+puts "0031587: Modeling Data - Remove internal sub-shapes from the shape"
+puts "================"
+puts ""
+
+box b 10 10 10
+box b1 2 2 -1 3 2 2
+explode b1 f
+
+bclearobjects
+bcleartools
+baddobjects b
+baddtools b1_1 b1_2
+bfillds
+bsplit r
+
+removeinternals r
+
+checkshape r
+checknbshapes r -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1
+
+bbuild r
+bbuild r1
+removeinternals r1 0
+
+checkshape r1
+checknbshapes r1 -ref [nbshapes r]
+
+removeinternals r1 1
+checkshape r1
+checknbshapes r1 -vertex 20 -edge 26 -wire 10 -face 10 -shell 1 -solid 1
+
+explode r1 so
+checknbshapes r1_1 -vertex 8 -edge 12 -wire 6 -face 6 -shell 1 -solid 1