0030700: Visualization, TKOpenGl - support PBR Metallic-Roughness shading model
[occt.git] / tests / de_mesh / obj_read / multiline
CommitLineData
5e2477a7 1puts "========"
2puts "0030899: Data Exchange, RWObj_Reader - reading multiline file with more than one line separator leads to memory corruption"
3puts "========"
4
5# define a long line
6set aDummy "dummy"
7for {set i 0} {$i < 49} {incr i} { set aDummy "${aDummy}dummy" }
8
9set ml_obj {
10v 0 0 0
11v 2 0 0
12v 2 1 0
13v 1 2 0
14v 0 1 0
15v 0 0 2
16v 2 0 2
17v 2 1 2
18v 1 2 2
19v 0 1 2\
20__DUMMY__\
21__DUMMY__
22f 5 4 3 2 1
23f 7 8 \
24__SPLIT__ 9 10 6
25f 10 9 4 5
26f 9 8 3 4
27f 6 10 5 1
28f 2 3 8 7
29f 1 2 7 6}
30
31regsub -all {__DUMMY__} $ml_obj "\\\n${aDummy}" ml_obj
32regsub -all {__SPLIT__} $ml_obj "\\\n" ml_obj
33
34set fd [open ${imagedir}/${casename}.obj w]
35fconfigure $fd -translation lf
36puts $fd $ml_obj
37close $fd
38
39ReadObj D ${imagedir}/${casename}.obj
40XGetOneShape s D
41checknbshapes s -face 1 -compound 1
42checktrinfo s -tri 16 -nod 10