DiscussionsIssue archiveOCCT:Data Exchange

Archived issue #0032612

Data Exchange, RWGltf_CafReader - lost hierarchy of two nested compounds

Open CASCADEOCCT:Data Exchangeclosed9 public notes

Search issues

Description

Reading glTF containing nested scene nodes with a single child leads to lost hierarchy details in produced XCAF document.

Steps to reproduce

pload MODELING OCAF XDE VISUALIZATION
box b 1 2 3
incmesh b 0.1
compound b c
compound c cc
XNewDoc D1
XAddShape D1 cc
SetName D1 [XFindShape D1 b]    "box"
SetName D1 [XFindShape D1 c]    "comp1"
SetName D1 [XFindShape D1 c]:1  "box_inst"
SetName D1 [XFindShape D1 cc]   "comp2"
SetName D1 [XFindShape D1 cc]:1 "comp1_inst"
XSave D1 "test.xbf"
WriteGltf D1 "test.glb"

ReadGltf D "test.glb"
Xdump D


Output:
INSTANCE COMPOUND 0:1:1:1 (refers to 0:1:1:2) "comp2"
PART COMPOUND 0:1:1:2 "box"

Free Shapes: 1
INSTANCE COMPOUND  0:1:1:1 (refers to 0:1:1:2) "comp2"

Public activity

9 archived notes

Participants are labeled by their role within this record.

01Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Mon Oct 11 22:05:58 2021 +0300

    0032612: Data Exchange, RWGltf_CafReader - lost hierarchy of two nested compounds
    
    Added comparisons with reference Xdump data to glTF tests.
02Commenter 2
Branch [archived branch] has been updated by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Mon Oct 11 23:24:52 2021 +0300

    RWGltf_GltfJsonParser::gltfParseSceneNode() - prevent flattering of Scene nodes
    (allow flattering only of Mesh nodes).
    
    Added command XAutoNaming managing XCAFDoc_ShapeTool::SetAutoNaming().

03Commenter 2
Branch [archived branch] has been created by Author.

[revision removed]


Detailed log of new commits:

Author: Author
Date: Mon Oct 11 22:05:58 2021 +0300

    0032612: Data Exchange, RWGltf_CafReader - lost hierarchy of two nested compounds
    
    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.
04Author
Patch is ready for review
- OCCT: branch CR32612_1.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32612_1-master-KGV/
05Commenter 2
Branch [archived branch] has been updated forcibly by Author.

[revision removed]
06Commenter 6
The patch was reviewed
07Commenter 7
Combination -
OCCT branch : [archived branch]
master SHA - [revision removed]
[revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17699.720000000394 / 17936.010000000137 [-1.32%]
Products
Total CPU difference: 11665.880000000112 / 11621.340000000107 [+0.38%]
Windows-64-VC14:
OCCT
Total CPU difference: 19656.34375 / 19690.109375 [-0.17%]
Products
Total CPU difference: 12872.390625 / 12807.375 [+0.51%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
08Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]
09Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records