mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
RWGltf_GltfJsonParser::gltfParseSceneNode() - prevent flattering of Scene nodes (allow flattering only of Mesh nodes). Added command XAutoNaming managing XCAFDoc_ShapeTool::SetAutoNaming(). Added comparisons with reference Xdump data to glTF tests.
54 lines
6.5 KiB
Plaintext
54 lines
6.5 KiB
Plaintext
puts "========"
|
|
puts "0031312: Data Exchange - RWGltf_CafReader fails reading texture embedded into base64 bufferView"
|
|
puts "========"
|
|
|
|
# glTF file content
|
|
set cubeGltf {
|
|
{
|
|
"asset":{"generator":"","version":"2.0"},
|
|
"scene":0,
|
|
"scenes":[{"name":"Scene","nodes":[0]}],
|
|
"nodes":[{"mesh":0,"name":"Cube"}],
|
|
"materials":[{"name":"Material","pbrMetallicRoughness":{"baseColorTexture":{"index":0,"texCoord":0},"metallicFactor":0,"roughnessFactor":0.4}}],
|
|
"meshes":[{"name":"Cube","primitives":[{"attributes":{"POSITION":0,"NORMAL":1,"TEXCOORD_0":2},"indices":3,"material":0}]}],
|
|
"textures":[{"source":0}],
|
|
"images":[{"bufferView":4,"mimeType":"image/jpeg","name":"UVGrid"}],
|
|
"accessors":[
|
|
{"bufferView":0,"componentType":5126,"count":24,"type":"VEC3"},
|
|
{"bufferView":1,"componentType":5126,"count":24,"type":"VEC3"},
|
|
{"bufferView":2,"componentType":5126,"count":24,"type":"VEC2"},
|
|
{"bufferView":3,"componentType":5123,"count":36,"type":"SCALAR"}
|
|
],
|
|
"bufferViews":[
|
|
{"buffer":0,"byteLength":288,"byteOffset":0},
|
|
{"buffer":0,"byteLength":288,"byteOffset":288},
|
|
{"buffer":0,"byteLength":192,"byteOffset":576},
|
|
{"buffer":0,"byteLength":72,"byteOffset":768},
|
|
{"buffer":0,"byteLength":2870,"byteOffset":840}
|
|
],
|
|
"buffers":[{
|
|
"byteLength":3712,
|
|
"uri":"data:application/octet-stream;base64,AACAPwAAgD8AAIA/AACAPwAAgD8AAIC/AACAv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kDPuKJzjTi5TdkurMEnJ2RRorofG3gnUvA+t3VjfWt1HbpcTQ213cWzQpdKjY3pnggjaeCfvDmueqKNaniKcatKV4vVNFThKnJxkrNH3NRRT4oJJ2KxRtIwGcICTirnONOLlN2S6szbSV2Moqe8s5LKZkdWChiFZlIDAHqKgqKNaniKcatKV4vVNEwnGcVKLumfDNFFW9N0m+1mdobCzuL6ZV3mO2iaRguQM4APGSOfetW1FXbCc404uU3ZLqypRWz4p8LX3hTVbi1ure4SFZpIoLiaBo1uFRsb1z1BGDwT1FY1TCcakVODumZ0K9PE041qMrxlqmj7moooqzcradYx6Zp9rZxFmit4lhQucsQoAGffirNFFJJRVkXOcqk3Obu3q/U+GaKKKZBe13V5vEGt6hqlwqJcX1xJcyLECEDOxYgAknGT3JqjRRUQhGnFQirJaIbbk7s+5qKKKsQ+eUzzSSsAGdixx0yTTKKKiEI04qEVZLRCSUVZHwzRRRVjLeralLrOq3l/MqLNdTPO6xghQzMWIGSeMmqlFFJJRSS2IhCNOKhBWS0R/9kAAA=="
|
|
}]
|
|
}
|
|
}
|
|
|
|
set fd [open ${imagedir}/${casename}.gltf w]
|
|
fconfigure $fd -translation lf
|
|
puts $fd $cubeGltf
|
|
close $fd
|
|
|
|
ReadGltf D ${imagedir}/${casename}.gltf
|
|
XGetOneShape s D
|
|
checknbshapes s -face 1 -compound 0
|
|
checktrinfo s -tri 12 -nod 24
|
|
|
|
set THE_REF_DUMP {
|
|
INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "Cube"
|
|
PART FACE 0:1:1:2 "Cube"
|
|
|
|
Free Shapes: 1
|
|
INSTANCE FACE 0:1:1:1 (refers to 0:1:1:2) "Cube"
|
|
}
|
|
checkXDump D $THE_REF_DUMP
|