0031332: Data Exchange - RWGltf_CafReader ignores bufferView.byteStride within glTF 2.0
[occt.git] / tests / de_mesh / gltf_read / boxinterleaved
1 puts "========"
2 puts "0031332: Data Exchange - RWGltf_CafReader ignores bufferView.byteStride within glTF 2.0"
3 puts "========"
4
5 # glTF file content
6 set cubeGltf {
7 {
8 "asset": {"generator": "","version": "2.0"},
9 "scene": 0,
10 "scenes": [{"nodes": [0]}],
11 "nodes": [{"children": [1],"matrix": [1.0,0.0,0.0,0.0,0.0,0.0,-1.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,1.0]},{"mesh": 0}],
12 "meshes": [{"primitives": [{"attributes": {"NORMAL": 1,"POSITION": 2},"indices": 0,"mode": 4,"material": 0}],"name": "Mesh"}],
13 "accessors": [
14 {"bufferView": 0,"byteOffset": 0, "componentType": 5123,"count": 36,"max": [23],"min": [0],"type": "SCALAR"},
15 {"bufferView": 1,"byteOffset": 0, "componentType": 5126,"count": 24,"max": [1.0,1.0,1.0],"min": [-1.0,-1.0,-1.0],"type": "VEC3"},
16 {"bufferView": 1,"byteOffset": 12,"componentType": 5126,"count": 24,"max": [0.5,0.5,0.5],"min": [-0.5,-0.5,-0.5],"type": "VEC3"}
17 ],
18 "materials": [{"pbrMetallicRoughness": {"baseColorFactor": [0.800000011920929,0.0,0.0,1.0]}}],
19 "bufferViews": [
20 {"buffer": 0,"byteOffset": 576,"byteLength": 72,"target": 34963},
21 {"buffer": 0,"byteOffset": 0,  "byteLength": 576,"byteStride": 24,"target": 34962}
22 ],
23 "buffers": [{"byteLength": 648,"uri": "data:application/octet-stream;base64,AAAAAAAAAAAAAIA/AAAAvwAAAL8AAAA/AAAAAAAAAAAAAIA/AAAAPwAAAL8AAAA/AAAAAAAAAAAAAIA/AAAAvwAAAD8AAAA/AAAAAAAAAAAAAIA/AAAAPwAAAD8AAAA/AAAAAAAAgL8AAAAAAAAAPwAAAL8AAAA/AAAAAAAAgL8AAAAAAAAAvwAAAL8AAAA/AAAAAAAAgL8AAAAAAAAAPwAAAL8AAAC/AAAAAAAAgL8AAAAAAAAAvwAAAL8AAAC/AACAPwAAAAAAAAAAAAAAPwAAAD8AAAA/AACAPwAAAAAAAAAAAAAAPwAAAL8AAAA/AACAPwAAAAAAAAAAAAAAPwAAAD8AAAC/AACAPwAAAAAAAAAAAAAAPwAAAL8AAAC/AAAAAAAAgD8AAAAAAAAAvwAAAD8AAAA/AAAAAAAAgD8AAAAAAAAAPwAAAD8AAAA/AAAAAAAAgD8AAAAAAAAAvwAAAD8AAAC/AAAAAAAAgD8AAAAAAAAAPwAAAD8AAAC/AACAvwAAAAAAAAAAAAAAvwAAAL8AAAA/AACAvwAAAAAAAAAAAAAAvwAAAD8AAAA/AACAvwAAAAAAAAAAAAAAvwAAAL8AAAC/AACAvwAAAAAAAAAAAAAAvwAAAD8AAAC/AAAAAAAAAAAAAIC/AAAAvwAAAL8AAAC/AAAAAAAAAAAAAIC/AAAAvwAAAD8AAAC/AAAAAAAAAAAAAIC/AAAAPwAAAL8AAAC/AAAAAAAAAAAAAIC/AAAAPwAAAD8AAAC/AAABAAIAAwACAAEABAAFAAYABwAGAAUACAAJAAoACwAKAAkADAANAA4ADwAOAA0AEAARABIAEwASABEAFAAVABYAFwAWABUA"}]
24 }
25 }
26
27 set fd [open ${imagedir}/${casename}.gltf w]
28 fconfigure $fd -translation lf
29 puts $fd $cubeGltf
30 close $fd
31
32 ReadGltf D ${imagedir}/${casename}.gltf
33 XGetOneShape s D
34 checknbshapes s -face 1 -compound 0
35 checktrinfo s -tri 12 -nod 24