View Issue Details

IDProjectCategoryView StatusLast Update
0031618CommunityOCCT:Data Exchangepublic2021-01-18 14:24
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version7.4.0 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031618: Data Exchange, RWGltf_CafWriter - exporting some models produces glTF files not passing validation
DescriptionRWGltf_CafWriter produces invalid glTF files for some models:
https://www.opencascade.com/comment/21591

{
  "name": "",
  "primitives": [] // not supposed to be empty
}
Steps To Reproduce
pload XDE OCAF VISUALIZATION
ReadStep D io1-tu-203.stp
vinit View
XDisplay -dispMode 1 D
vfit
WriteGltf D test.gltf
TagsNo tags attached.
Test case numberNot required

Attached Files

  • io1-tu-203.zip (37,331 bytes)

Relationships

child of 0030953 closedbugmaster Open CASCADE Data Exchange - implement export of mesh data into glTF 2.0 format 

Activities

kgv

2020-06-18 18:12

developer  

io1-tu-203.zip (37,331 bytes)

git

2020-07-14 16:52

administrator   ~0093138

Branch CR31618 has been created by mkrylova.

SHA-1: bf958cf0dec61ab1727fc7feb95fd88811890edd


Detailed log of new commits:

Author: mkrylova
Date: Tue Jul 14 16:49:41 2020 +0300

    0031618: Data Exchange, RWGltf_CafWriter - exporting some models produces glTF files not passing validation
    
    Added a check for non-empty mesh

kgv

2020-07-15 13:06

developer   ~0093144

+    RWMesh_FaceIterator aFaceIter(aDocNode.RefLabel, TopLoc_Location(), true, aDocNode.Style);
+    if (!aFaceIter.More())
+    {
+      continue;
+    }

When initializing RWMesh_FaceIterator only to check if there are any faces to export, there is no point to dispatch colors (3rd argument in constructor), thus it could be set to FALSE.
As aFaceIter is not used further in the block, please move it into {} to limit visibility and release unused variable.

Ignoring data silently is undesired. If exporting model does not generated any warning - please add it.

> Message::SendWarning (TCollection_AsciiString ("RWGltf_CafWritere skipped node '") + aNodeName + "' without triangulation data");

git

2020-07-20 16:58

administrator   ~0093201

Branch CR31618_1 has been created by mkrylova.

SHA-1: 8d52a14d7b0d3a5d25b2aaaa94f1c3747935b56b


Detailed log of new commits:

Author: mkrylova
Date: Tue Jul 14 16:49:41 2020 +0300

    0031618: Data Exchange, RWGltf_CafWriter - exporting some models produces glTF files not passing validation
    
    Added a check for non-empty mesh and new warning
    that notifies about skipping an empty node

osa

2020-07-21 09:37

developer   ~0093218

+ Message::SendWarning(TCollection_AsciiString("RWGltf_CafWriter skipped node '") + aNodeName + "' without triangulation data");

Please not forget spaces before parenthesis.

+ if (!aFaceIter.More())
+ {
+ continue;
+ }

Maybe it will be better to add some warning here too (if exporting model has not generated it yet)

kgv

2020-07-21 10:06

developer   ~0093219

> Maybe it will be better to add some warning here too
> (if exporting model has not generated it yet)
I suppose this will duplicate the message.

git

2020-07-21 16:55

administrator   ~0093234

Branch CR31618_2 has been created by mkrylova.

SHA-1: c16d3f5544dfa6cb5fd7325c6a5c0ad95676b916


Detailed log of new commits:

Author: mkrylova
Date: Tue Jul 14 16:49:41 2020 +0300

    0031618: Data Exchange, RWGltf_CafWriter - exporting some models produces glTF files not passing validation
    
    Added a check for non-empty mesh and new warning
    that notifies about skipping an empty node

kgv

2020-07-21 22:40

developer   ~0093243

Please raise the patch in OCCT branch CR31618_2.

bugmaster

2020-07-25 13:22

administrator   ~0093317

Combination -
OCCT branch : IR-2020-07-24
master SHA - 4c7a3faef5f292475c23ee615ad49d57fc039b58
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-07-24 SHA - be95aa91db3bd344c872901349e58022d3c687fc
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: 17271.39000000011 / 17230.04000000007 [+0.24%]
Products
Total CPU difference: 800.6699999999917 / 791.7399999999936 [+1.13%]
Windows-64-VC14:
OCCT
Total CPU difference: 18742.140625 / 18745.390625 [-0.02%]
Products
Total CPU difference: 1329.234375 / 1321.390625 [+0.59%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-07-25 14:02

administrator   ~0093333

Branch CR31618_2 has been deleted by inv.

SHA-1: c16d3f5544dfa6cb5fd7325c6a5c0ad95676b916

git

2020-07-25 14:02

administrator   ~0093339

Branch CR31618_1 has been deleted by inv.

SHA-1: 8d52a14d7b0d3a5d25b2aaaa94f1c3747935b56b

git

2020-07-25 14:03

administrator   ~0093349

Branch CR31618 has been deleted by inv.

SHA-1: bf958cf0dec61ab1727fc7feb95fd88811890edd

Related Changesets

occt: master b011420f

2020-07-14 13:49:41

mkrylova


Committer: bugmaster Details Diff
0031618: Data Exchange, RWGltf_CafWriter - exporting some models produces glTF files not passing validation

Added a check for non-empty mesh and new warning
that notifies about skipping an empty node
Affected Issues
0031618
mod - src/RWGltf/RWGltf_CafWriter.cxx Diff File

Issue History

Date Modified Username Field Change
2020-06-18 18:12 kgv New Issue
2020-06-18 18:12 kgv Assigned To => kgv
2020-06-18 18:12 kgv Assigned To kgv => mkrylova
2020-06-18 18:12 kgv Status new => assigned
2020-06-18 18:12 kgv Product Version => 7.4.0
2020-06-18 18:12 kgv File Added: io1-tu-203.zip
2020-06-18 18:14 kgv Steps to Reproduce Updated
2020-06-18 18:16 kgv Relationship added child of 0030953
2020-07-14 16:52 git Note Added: 0093138
2020-07-14 21:19 mkrylova Assigned To mkrylova => osa
2020-07-14 21:19 mkrylova Status assigned => resolved
2020-07-15 13:06 kgv Note Added: 0093144
2020-07-15 13:07 kgv Assigned To osa => mkrylova
2020-07-15 13:07 kgv Status resolved => assigned
2020-07-20 16:58 git Note Added: 0093201
2020-07-20 16:58 mkrylova Assigned To mkrylova => osa
2020-07-20 16:58 mkrylova Status assigned => resolved
2020-07-21 09:37 osa Note Added: 0093218
2020-07-21 09:38 osa Assigned To osa => mkrylova
2020-07-21 10:06 kgv Note Added: 0093219
2020-07-21 16:55 git Note Added: 0093234
2020-07-21 22:40 kgv Note Added: 0093243
2020-07-21 22:40 kgv Assigned To mkrylova => bugmaster
2020-07-21 22:40 kgv Status resolved => reviewed
2020-07-25 13:22 bugmaster Note Added: 0093317
2020-07-25 13:22 bugmaster Status reviewed => tested
2020-07-25 13:34 bugmaster Test case number => Not required
2020-07-25 13:57 bugmaster Changeset attached => occt master b011420f
2020-07-25 13:57 bugmaster Status tested => verified
2020-07-25 13:57 bugmaster Resolution open => fixed
2020-07-25 14:02 git Note Added: 0093333
2020-07-25 14:02 git Note Added: 0093339
2020-07-25 14:03 git Note Added: 0093349
2020-12-02 16:22 emo Fixed in Version => 7.5.0
2020-12-02 17:13 emo Status verified => closed