0030389: Data Exchange - StlAPI_Writer does not check if the face has triangulation
[occt.git] / tests / bugs / stlvrml / bug30389
diff --git a/tests/bugs/stlvrml/bug30389 b/tests/bugs/stlvrml/bug30389
new file mode 100644 (file)
index 0000000..383d895
--- /dev/null
@@ -0,0 +1,19 @@
+puts "========"
+puts "0030389: Data Exchange - StlAPI_Writer does not check if the face has triangulation"
+puts "========"
+puts ""
+
+box b 1 1 1 
+
+# mesh only 5 faces of the box
+eval compound [lrange [explode b f] 0 4] cf
+incmesh cf 0.1
+
+# save box into stl
+writestl b $imagedir/${casename}.stl
+
+# read stl
+readstl result $imagedir/${casename}.stl -brep
+
+# check that it contains only 10 triangles
+checknbshapes result -face 10