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