35ad04e7 |
1 | puts "========" |
2 | puts "0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing" |
3 | puts "========" |
4 | |
5 | vclear |
6 | vclose ALL |
7 | Close * |
8 | source $env(CSF_OCCTSamplesPath)/tcl/vis_pbr_spheres.tcl |
9 | vdump "${imagedir}/${casename}_0.png" |
10 | |
11 | set aTmpGltf1 "${imagedir}/${casename}_tmp1.glb" |
12 | set aTmpGltf1m "${imagedir}/${casename}_tmp1m.glb" |
13 | set aTmpGltf2 "${imagedir}/${casename}_tmp2.glb" |
14 | set aTmpGltf2m "${imagedir}/${casename}_tmp2m.glb" |
15 | lappend occ_tmp_files $aTmpGltf1 |
16 | lappend occ_tmp_files $aTmpGltf1m |
17 | lappend occ_tmp_files $aTmpGltf2 |
18 | lappend occ_tmp_files $aTmpGltf2m |
19 | |
20 | WriteGltf D "$aTmpGltf1" |
21 | puts [file size "$aTmpGltf1"] |
22 | WriteGltf D "$aTmpGltf1m" -mergeFaces |
23 | puts [file size "$aTmpGltf1m"] |
24 | |
25 | ReadGltf D1 "$aTmpGltf1" |
26 | XGetOneShape s1 D1 |
27 | checknbshapes s1 -face 26 -compound 22 |
28 | vclear |
29 | XDisplay D1 -dispMode 1 |
30 | vdump "${imagedir}/${casename}_1.png" |
31 | |
32 | ReadGltf D1m "$aTmpGltf1m" |
33 | XGetOneShape s1m D1m |
34 | checknbshapes s1m -face 5 -compound 18 |
35 | vclear |
36 | XDisplay D1m -dispMode 1 |
37 | vdump "${imagedir}/${casename}_1m.png" |
38 | |
39 | WriteGltf D1 "$aTmpGltf2" |
40 | puts [file size "$aTmpGltf2"] |
41 | WriteGltf D1m "$aTmpGltf2m" -mergeFaces |
42 | puts [file size "$aTmpGltf2m"] |
43 | |
44 | ReadGltf D2 "$aTmpGltf2" |
45 | XGetOneShape s2 D2 |
46 | checknbshapes s2 -face 26 -compound 22 |
47 | vclear |
48 | XDisplay D2 -dispMode 1 |
49 | vdump "${imagedir}/${casename}_2.png" |
50 | |
51 | ReadGltf D2m "$aTmpGltf2m" |
52 | XGetOneShape s2m D2m |
53 | checknbshapes s2m -face 5 -compound 18 |
54 | vclear |
55 | XDisplay D2m -dispMode 1 |
56 | vdump "${imagedir}/${casename}_2m.png" |