View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0032540 | Community | OCCT:Data Exchange | public | 2021-08-18 17:04 | 2021-09-11 14:06 |
Reporter | micheld2 | Assigned To | |||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Platform | Windows | OS | VC++ 2015 | ||
Product Version | 7.4.0 | ||||
Target Version | 7.6.0 | Fixed in Version | 7.6.0 | ||
Summary | 0032540: RWGltf_CafReader - optional "scene" parameter encoded as mandatory | ||||
Description | When reading the included file, with RWGltf_CafReader or OCCT CAD Assistant , error "Member 'scene' is not found" is returned. The gltf file format has the scene parameter as not required: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-scene File can be opened in this online gltf validator: https://github.khronos.org/glTF-Validator/ without error Parameter is flagged as mandatory in RWGltf_GltfJsonParser.cxx at line 240 | ||||
Steps To Reproduce | Opening the file with OCCT CAD Assistant or using sample code: opencascade::handle<TDocStd_Application> aTDFApplication = XCAFApp_Application::GetApplication(); opencascade::handle<TDocStd_Document> aTDFDocument; aTDFApplication->NewDocument("IMPORTGLTF", aTDFDocument); RWGltf_CafReader aGLTFReader; aGLTFReader.SetFileLengthUnit(1.); aGLTFReader.SetSystemLengthUnit(1e-3); aGLTFReader.SetDocument(aTDFDocument); aGLTFReader.Perform(aFilename, Standard_ProgressDialog::ProgressIndicator()->Start()) | ||||
Tags | No tags attached. | ||||
Test case number | Not required | ||||
|
SPHERE ONLY.glb (142,348 bytes) |
|
> When scene is undefined, runtime is not required to render anything at load time. Based on this item in specs, one would expect an empty document being loaded, which looks kind of useless to me. It is strange that other viewers display a sphere for attached file instead of an empty model. I guess we may modify OCCT to follow a common behavior, probably with a strict option or a warning message. It is currently not possible asking RWGltf_CafReader to import non-default scene into XCAF document. |
|
The glb file still contains a scenes array. The first item scenes[0] could be loaded by default, if present, when there is no default scene specified. This is probably what the other viewer does. |
|
Sure, I see what other viewers do. I'm just saying that current behavior of RWGltf_CafReader doesn't contradict to glTF specification (returning error or importing an empty scene will give no particular difference) - in fact reader is trying to follow specs more strictly here. |
|
Branch CR32540 has been created by kgv. SHA-1: 85143ccdc35fb89e73fdbeded166b8ab1ef8a4bc Detailed log of new commits: Author: kgv Date: Thu Sep 9 21:59:18 2021 +0300 0032540: RWGltf_CafReader - optional "scene" parameter encoded as mandatory First scene is now loaded when default one is undefined. |
|
Branch CR32540 has been updated forcibly by kgv. SHA-1: d297772c5806efca078b4b7c8f85b9d72807bcc3 |
|
Patch is ready for review - OCCT: branch CR32540. |
|
The patch was reviewed |
|
Combination - OCCT branch : IR-2021-09-10 master SHA - 9ae883970dd77a39d856b49e6883ed5d0e60d20f 49e51745631c52b6c452c65adae4d6dfa21a1b1e Products branch : IR-2021-09-10 SHA - 2d2bc879e2da9d770a1938ab3410f5885c8555e7 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: 17358.54000000042 / 17496.500000000422 [-0.79%] Products Total CPU difference: 11397.800000000112 / 11567.680000000111 [-1.47%] Windows-64-VC14: OCCT Total CPU difference: 19328.109375 / 19307.609375 [+0.11%] Products Total CPU difference: 12733.328125 / 12920.953125 [-1.45%] Image differences : No differences that require special attention Memory differences : No differences that require special attention |
|
Branch CR32540 has been deleted by mnt. SHA-1: d297772c5806efca078b4b7c8f85b9d72807bcc3 |
occt: master 8a17a8bb 2021-09-09 18:59:18 Committer: |
0032540: RWGltf_CafReader - optional "scene" parameter encoded as mandatory First scene is now loaded when default one is undefined. |
Affected Issues 0032540 |
|
mod - src/RWGltf/RWGltf_CafReader.cxx | Diff File | ||
mod - src/RWGltf/RWGltf_CafReader.hxx | Diff File | ||
mod - src/RWGltf/RWGltf_GltfJsonParser.cxx | Diff File | ||
mod - src/RWGltf/RWGltf_GltfJsonParser.hxx | Diff File | ||
mod - src/RWGltf/RWGltf_GltfRootElement.hxx | Diff File | ||
mod - src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-08-18 17:04 | micheld2 | New Issue | |
2021-08-18 17:04 | micheld2 | Assigned To | => gka |
2021-08-18 17:04 | micheld2 | File Added: SPHERE ONLY.glb | |
2021-08-18 18:06 | kgv | Note Added: 0103282 | |
2021-08-18 18:07 | kgv | Note Edited: 0103282 | |
2021-08-18 18:12 | kgv | Relationship added | child of 0030691 |
2021-08-18 18:12 | kgv | Assigned To | gka => kgv |
2021-08-18 18:12 | kgv | Product Version | 7.5.0 => 7.4.0 |
2021-08-18 18:12 | kgv | Target Version | => 7.6.0 |
2021-08-18 18:44 | micheld2 | Note Added: 0103286 | |
2021-08-18 19:19 | kgv | Note Added: 0103288 | |
2021-08-18 19:22 | kgv | Note Edited: 0103288 | |
2021-09-09 22:21 | git | Note Added: 0103959 | |
2021-09-09 23:40 | git | Note Added: 0103966 | |
2021-09-09 23:46 | kgv | Note Added: 0103967 | |
2021-09-09 23:46 | kgv | Assigned To | kgv => osa |
2021-09-09 23:46 | kgv | Status | new => resolved |
2021-09-10 19:29 |
|
Note Added: 0103992 | |
2021-09-10 19:29 |
|
Assigned To | osa => bugmaster |
2021-09-10 19:29 |
|
Status | resolved => reviewed |
2021-09-11 13:27 |
|
Note Added: 0104016 | |
2021-09-11 13:27 |
|
Status | reviewed => tested |
2021-09-11 13:37 |
|
Test case number | => Not required |
2021-09-11 13:43 |
|
Changeset attached | => occt master 8a17a8bb |
2021-09-11 13:43 |
|
Assigned To | bugmaster => smoskvin |
2021-09-11 13:43 |
|
Status | tested => verified |
2021-09-11 13:43 |
|
Resolution | open => fixed |
2021-09-11 14:06 | git | Note Added: 0104045 |