1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
kgv 35ad04e78b 0032107: Data Exchange, RWGltf_CafReader - reading glTF document back loses sharing
RWGltf_CafWriter has been fixed to write shared Faces having a different style.
RWGltf_GltfJsonParser::gltfParsePrimArray() now tries to create a shared TopoDS_Face
from the same primitive array definition.

RWGltf_CafReader - improved name generation.
2021-09-10 20:22:59 +03:00

25 lines
620 B
Plaintext

puts "========"
puts "0032530: Data Exchange, RWGltf_CafWriter - add option merging Faces within the Part"
puts "========"
Close D0 -silent
ReadStep D0 [locate_data_file as1-oc-214-mat.stp]
XGetOneShape ss D0
incmesh ss 1.0
set aTmpGltf1 "${imagedir}/${casename}_tmp1.glb"
set aTmpGltf2 "${imagedir}/${casename}_tmp2.glb"
lappend occ_tmp_files $aTmpGltf1
lappend occ_tmp_files $aTmpGltf2
WriteGltf D0 "$aTmpGltf1"
WriteGltf D0 "$aTmpGltf2" -mergeFaces
ReadGltf D1 "$aTmpGltf1"
XGetOneShape s1 D1
checknbshapes s1 -face 53 -compound 28
ReadGltf D "$aTmpGltf2"
XGetOneShape s2 D
checknbshapes s2 -face 5 -compound 10