0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file
[occt.git] / tests / de_mesh / obj_write / ball
diff --git a/tests/de_mesh/obj_write/ball b/tests/de_mesh/obj_write/ball
new file mode 100644 (file)
index 0000000..81d586a
--- /dev/null
@@ -0,0 +1,28 @@
+puts "========"
+puts "0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file"
+puts "Write B-Rep model into OBJ file"
+puts "========"
+
+pload XDE OCAF MODELING VISUALIZATION
+Close D -silent
+
+restore [locate_data_file Ball.brep] b
+incmesh b 0.1
+
+set aTmpObjBase "${imagedir}/${casename}_tmp"
+set aTmpObj "${aTmpObjBase}.obj"
+lappend occ_tmp_files $aTmpObj
+lappend occ_tmp_files "${aTmpObjBase}.mtl"
+
+writeobj b "$aTmpObj"
+
+ReadObj D "$aTmpObj"
+XGetOneShape s D
+checknbshapes s -face 2 -compound 2
+
+vclear
+vinit View1
+XDisplay -dispMode 1 D
+vaxo
+vfit
+vdump ${imagedir}/${casename}.png