0031312: Data Exchange - RWGltf_CafReader fails reading texture embedded into base64...
[occt.git] / tests / de_mesh / gltf_read / cubeemb
1 puts "========"
2 puts "0031312: Data Exchange - RWGltf_CafReader fails reading texture embedded into base64 bufferView"
3 puts "========"
4
5 # glTF file content
6 set cubeGltf {
7 {
8 "asset":{"generator":"","version":"2.0"},
9 "scene":0,
10 "scenes":[{"name":"Scene","nodes":[0]}],
11 "nodes":[{"mesh":0,"name":"Cube"}],
12 "materials":[{"name":"Material","pbrMetallicRoughness":{"baseColorTexture":{"index":0,"texCoord":0},"metallicFactor":0,"roughnessFactor":0.4}}],
13 "meshes":[{"name":"Cube","primitives":[{"attributes":{"POSITION":0,"NORMAL":1,"TEXCOORD_0":2},"indices":3,"material":0}]}],
14 "textures":[{"source":0}],
15 "images":[{"bufferView":4,"mimeType":"image/jpeg","name":"UVGrid"}],
16 "accessors":[
17 {"bufferView":0,"componentType":5126,"count":24,"type":"VEC3"},
18 {"bufferView":1,"componentType":5126,"count":24,"type":"VEC3"},
19 {"bufferView":2,"componentType":5126,"count":24,"type":"VEC2"},
20 {"bufferView":3,"componentType":5123,"count":36,"type":"SCALAR"}
21 ],
22 "bufferViews":[
23 {"buffer":0,"byteLength":288,"byteOffset":0},
24 {"buffer":0,"byteLength":288,"byteOffset":288},
25 {"buffer":0,"byteLength":192,"byteOffset":576},
26 {"buffer":0,"byteLength":72,"byteOffset":768},
27 {"buffer":0,"byteLength":2870,"byteOffset":840}
28 ],
29 "buffers":[{
30 "byteLength":3712,
31 "uri":"data:application/octet-stream;base64,AACAPwAAgD8AAIA/AACAPwAAgD8AAIC/AACAvwAAgD8AAIC/AACAvwAAgD8AAIA/AACAvwAAgD8AAIA/AACAvwAAgL8AAIA/AACAPwAAgL8AAIA/AACAPwAAgD8AAIA/AACAvwAAgD8AAIC/AACAvwAAgL8AAIC/AACAvwAAgL8AAIA/AACAvwAAgD8AAIA/AACAvwAAgL8AAIA/AACAvwAAgL8AAIC/AACAPwAAgL8AAIC/AACA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CzuL6ZV3mO2iaRguQM4APGSOfetW1FXbCc404uU3ZLqypRWz4p8LX3hTVbi1ure4SFZpIoLiaBo1uFRsb1z1BGDwT1FY1TCcakVODumZ0K9PE041qMrxlqmj7moooqzcradYx6Zp9rZxFmit4lhQucsQoAGffirNFFJJRVkXOcqk3Obu3q/U+GaKKKZBe13V5vEGt6hqlwqJcX1xJcyLECEDOxYgAknGT3JqjRRUQhGnFQirJaIbbk7s+5qKKKsQ+eUzzSSsAGdixx0yTTKKKiEI04qEVZLRCSUVZHwzRRRVjLeralLrOq3l/MqLNdTPO6xghQzMWIGSeMmqlFFJJRSS2IhCNOKhBWS0R/9kAAA=="
32 }]
33 }
34 }
35
36 set fd [open ${imagedir}/${casename}.gltf w]
37 fconfigure $fd -translation lf
38 puts $fd $cubeGltf
39 close $fd
40
41 ReadGltf D ${imagedir}/${casename}.gltf
42 XGetOneShape s D
43 checknbshapes s -face 1 -compound 0
44 checktrinfo s -tri 12 -nod 24