0030700: Visualization, TKOpenGl - support PBR Metallic-Roughness shading model
[occt.git] / tests / de_mesh / obj_read / prism
CommitLineData
4151c94d 1puts "========"
2puts "0029296: Data Exchange - implement import of mesh data from files in OBJ format"
3puts "Reading small generated file."
4puts "========"
5
6set material_mtl {newmtl ObjMat1
7Ns 96.07
8Ka 0.00 0.00 0.00
9Kd 0.64 0.64 0.64
10Ks 0.50 0.50 0.50
11Ni 1.00
12d 1.00}
13
14set minimal_ascii_obj {mtllib A1_material.mtl
15g Group1
16usemtl ObjMat1
17v 0 0 0
18v 2 0 0
19v 2 1 0
20v 1 2 0
21v 0 1 0
22v 0 0 2
23v 2 0 2
24v 2 1 2
25v 1 2 2
26v 0 1 2
27f 5 4 3 2 1
28f 7 8 9 10 6
29f 10 9 4 5
30f 9 8 3 4
31f 6 10 5 1
32f 2 3 8 7
33f 1 2 7 6}
34
35# Ascii MTL file, CRLF
36set fd [open ${imagedir}/${casename}_material.mtl w]
37fconfigure $fd -translation crlf
38puts $fd $material_mtl
39close $fd
40
41puts ""
42puts "#======================================================================"
43puts "# Ascii file, CRLF"
44puts "#======================================================================"
45set fd [open ${imagedir}/${casename}_one_ascii_dos.obj w]
46fconfigure $fd -translation crlf
47puts $fd $minimal_ascii_obj
48close $fd
49readobj mcrlf ${imagedir}/${casename}_one_ascii_dos.obj -singleFace
50checknbshapes mcrlf -face 1
51checktrinfo mcrlf -tri 16 -nod 10
52
53puts ""
54puts "#======================================================================"
55puts "# Ascii file with single facet, LF"
56puts "#======================================================================"
57set fd [open ${imagedir}/${casename}_one_ascii_unix.obj w]
58fconfigure $fd -translation lf
59puts $fd $minimal_ascii_obj
60close $fd
61readobj mlf ${imagedir}/${casename}_one_ascii_unix.obj -singleFace
62checknbshapes mlf -face 1
63checktrinfo mlf -tri 16 -nod 10
64
65vclear
66vinit View1
67vdisplay -dispMode 1 mlf
68vaxo
69vfit
70vdump ${imagedir}/${casename}_raw.png
71
72# read OBJ into document
73ReadObj D ${imagedir}/${casename}_one_ascii_unix.obj