DiscussionsIssue archiveOCCT:Data Exchange

Archived issue #0025910

The material with 0-density causes errors during writing STEP files

CommunityOCCT:Data Exchangeclosed12 public notes

Search issues

Description

Having a 0-density material in the model causes the STEP writer to emit NULL reference error due to improper handling of 0-density material: particularly during the creating of material STEP structures in STEPCAFControl_Writer::WriteMaterials the density property definition is created while the empty representation is attached.

Public activity

12 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: razmyslovich
Date: Wed Mar 11 10:21:14 2015 +0100

    0025910: properly process 0-density material - create STEP density structures if and only if the density is > 0
02Author
The fix is committed, please, review.
03Commenter 3
I have tried to reproduce the problem in DRAW, but in my test material is just not written, with no error reported:

pload MODELING OCAF XDE
NewDocument D
box b 10 10 10
XSetMaterial D [XAddShape D b] Vacuum 0.
WriteStep D ${imagedir}/bug25910.stp
04Commenter 4
The problem can be reproduced in Debug. The proposed fix looks Ok, however I believe we need to check why no error is reported in Release mode (I used vc10 x64, OCCT 6.8.0) and ensure that errors of this kind are properly reported.
05Commenter 2
Branch [archived branch] has been updated by Author.

[revision removed]


Detailed log of new commits:

Author: razmyslovich
Date: Wed Mar 11 14:29:42 2015 +0100

    0025910: properly process 0-density material - create STEP density structures if and only if the density is > 0, but preserve the already mapped structures

06Author
I didn't like the fix myself, therefore I've committed another proposal for the fix. Please, review.

07Commenter 7
Branch CR25910 is ready to be tested.
08Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
09Commenter 9
Branch [archived branch] has been rebased on the current master
10Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: apv
Date: Tue Mar 17 16:25:01 2015 +0300

    Test-case for issue #0025910

11Commenter 11
Dear Commenter 1,

Branch CR25910 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]

Number of compiler warnings:
occt component:
   Linux: 18 (18 on master)
   Windows: 0 (0 on master)
products component:
   Linux: 11 (11 on master)
   Windows: 4 (4 on master)

Regressions/Differences:
http://occt-tests/CR25910-master-occt-64/Windows-64-VC10/summary.html
bugs mesh(016) bug25364 (test-case is unstable)

Testing on Linux:
Total MEMORY difference: 89892265 / 90076200
Total CPU difference: 58285.2400000001 / 58911.169999999984

Testing on Windows:
Total MEMORY difference: 58002982 / 58008153
Total CPU difference: 51117.453125 / 57237.046875

12Commenter 2
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records