MantisBT - Community
View Issue Details
0030870Community[OCCT] OCCT:Data Exchangepublic2019-08-07 11:012019-09-07 16:27
drazmyslovich 
bugmaster 
normalminor 
verifiedfixed 
WindowsVC++ 201564 bit
[OCCT] 7.4.0 
[OCCT] 7.4.0 
Not required
0030870: Data Exchange - Add the support for empty draughting models and empty presentation layer assignments for step import
Hello, all,

from our customers we received several STEP files, which are not 100% conform to STEP standard, but adding the support for them in OCC code looks quite straight forward.

Unfortunately, I can't provide any real files, but I am allowed to inform, that the files were generated by:
1. CREO PARAMETRIC BY PTC INC, 2017300
2. HOOPS EXCHANGE VIEWER

Regards,
Dima
N/A
No tags attached.
Issue History
2019-08-07 11:01drazmyslovichNew Issue
2019-08-07 11:01drazmyslovichAssigned To => gka
2019-08-07 11:02drazmyslovichAssigned Togka => drazmyslovich
2019-08-07 11:07gitNote Added: 0086049
2019-08-07 11:07drazmyslovichNote Added: 0086050
2019-08-07 11:07drazmyslovichAssigned Todrazmyslovich => gka
2019-08-07 11:07drazmyslovichStatusnew => resolved
2019-08-07 11:07drazmyslovichSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21591#r21591
2019-09-04 18:32kgvSummaryAdd the support for empty draughting models and empty presentation layer assignments for step import => Data Exchange - Add the support for empty draughting models and empty presentation layer assignments for step import
2019-09-05 15:22gitNote Added: 0086798
2019-09-06 13:28gkaNote Added: 0086868
2019-09-06 13:29gkaNote Added: 0086869
2019-09-06 13:32gkaNote Added: 0086870
2019-09-06 13:32gkaAssigned Togka => bugmaster
2019-09-06 13:32gkaStatusresolved => reviewed
2019-09-06 18:16bugmasterTest case number => Not required
2019-09-06 18:16bugmasterNote Added: 0086906
2019-09-06 18:16bugmasterStatusreviewed => tested
2019-09-07 11:38bugmasterChangeset attached => occt master 9063f1e0
2019-09-07 11:38bugmasterStatustested => verified
2019-09-07 11:38bugmasterResolutionopen => fixed
2019-09-07 16:26gitNote Added: 0086928
2019-09-07 16:27gitNote Added: 0086951

Notes
(0086049)
git   
2019-08-07 11:07   
Branch CR30870 has been created by drazmyslovich.

SHA-1: aec4844eef572ba769231b239c80017297d4467f


Detailed log of new commits:

Author: build
Date: Wed Aug 7 10:04:53 2019 +0200

    0030870: Add support for some non-conform STEP files - allow empty draughting models and empty presentation layer assignments
(0086050)
drazmyslovich   
2019-08-07 11:07   
The changes are submitted, please, review.
(0086798)
git   
2019-09-05 15:22   
Branch CR30870_1 has been created by gka.

SHA-1: 73a9a2d57b82172c8cd74fef87cfaee8f7d18fb2


Detailed log of new commits:

Author: build
Date: Wed Aug 7 11:04:53 2019 +0300

    0030870: Data Exchange - Add the support for empty draughting models and empty presentation layer assignments for step import
    
    Protections to avoid exception in the methods RWStepVisual_RWDraughtingModel::ReadStep and RWStepVisual_RWPresentationLayerAssignment::ReadStep for case when assigned items are absent were added
(0086868)
gka   
2019-09-06 13:28   
Following modifications for RWStepVisual_RWDraughtingModels were excluded from ciommit:

- for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::NbItems(); i1++ ) {
- Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
- SW.Send (Var0);
+ if (!ent->StepRepr_Representation::Items ().IsNull ())
+ {
+ for (Standard_Integer i1=1; i1 <= ent->StepRepr_Representation::Items()->Length(); i1++ ) {
+ Handle(StepRepr_RepresentationItem) Var0 = ent->StepRepr_Representation::Items()->Value(i1);
+ SW.Send (Var0);
+ }

because method StepRepr_Representation::NbItems() returns 0 if field items is null:

Standard_Integer StepRepr_Representation::NbItems () const
{
    if (items.IsNull()) return 0;
    return items->Length();
}
(0086869)
gka   
2019-09-06 13:29   
Results of tests by path:
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30870_1-master-gka/view/COMPARE/ [^]
(0086870)
gka   
2019-09-06 13:32   
Branch CR30870_1 was reviewed
(0086906)
bugmaster   
2019-09-06 18:16   
Combination -
OCCT branch : CR30870_1
master SHA - 73a9a2d57b82172c8cd74fef87cfaee8f7d18fb2
5f5b1aed1c6e139bbd34314eca77ae7abcd8895c
Products branch : master SHA - 34e9bf11c6b525830b5dee35839707da81e7d1ab
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: 16180.789999999988 / 16167.270000000033 [+0.08%]
Products
Total CPU difference: 10487.370000000054 / 10484.930000000048 [+0.02%]
Windows-64-VC14:
OCCT
---
Products
Total CPU difference: 12028.875 / 12168.265625 [-1.15%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0086928)
git   
2019-09-07 16:26   
Branch CR30870_1 has been deleted by inv.

SHA-1: 73a9a2d57b82172c8cd74fef87cfaee8f7d18fb2
(0086951)
git   
2019-09-07 16:27   
Branch CR30870 has been deleted by inv.

SHA-1: aec4844eef572ba769231b239c80017297d4467f