0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file
[occt.git] / tests / de_mesh / obj_write / lantern
diff --git a/tests/de_mesh/obj_write/lantern b/tests/de_mesh/obj_write/lantern
new file mode 100644 (file)
index 0000000..d8b737c
--- /dev/null
@@ -0,0 +1,29 @@
+puts "========"
+puts "0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file"
+puts "Write textured lantern glTF model into OBJ file"
+puts "========"
+
+pload XDE OCAF MODELING VISUALIZATION
+Close D  -silent
+Close D1 -silent
+ReadGltf D1 [locate_data_file bug30691_Lantern.glb]
+
+set aTmpObjBase "${imagedir}/${casename}_tmp"
+set aTmpObj "${aTmpObjBase}.obj"
+lappend occ_tmp_files $aTmpObj
+lappend occ_tmp_files "${aTmpObjBase}.mtl"
+lappend occ_tmp_files "${aTmpObjBase}_textures"
+
+WriteObj D1 "$aTmpObj"
+
+ReadObj D "$aTmpObj"
+XGetOneShape s D
+checknbshapes s -face 3 -compound 1
+checktrinfo s -tri 5394 -nod 4145
+
+vclear
+vinit View1
+XDisplay -dispMode 1 D
+vaxo
+vfit
+vdump ${imagedir}/${casename}.png