DiscussionsIssue archiveOCCT:Data Exchange

Archived issue #0026174

Data Exchange, IGES - Loss of color after the second write of file

Open CASCADEOCCT:Data Exchangeclosed34 public notes

Search issues

Description

If write the document twice, in the second file will be missing color.
This bug is reproduced, if the document will be the first time writen with the param write.iges.brep.mode Faces (default)

Steps to reproduce

pload MODELING XDE OCAF VISUALIZATION
box b 0 0 0 10 10 10
compound  b c

NewDoc D
XAddShape D c 1
XSetColor D 0:1:1:1:1 1 0 0

WriteIges D d:/t1.igs
newmodel
WriteIges D d:/t2.igs

ReadIges D1 d:/t1.igs
ReadIges D2 d:/t2.igs

vinit View1
vclear
XDisplay D1 -dispMode 1
vfit

vclear
XDisplay D2 -dispMode 1
vfit

Public activity

34 archived notes

Participants are labeled by their role within this record.

01Commenter 1
Problem described in issue is reproduced on current state of OCCT.
02Commenter 2
Analysis and Solution Elaboration
03Commenter 3
Solution Elaboration: Found the reason and one of the possible solutions to the issue.
04Commenter 1
Analysis
05Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: ssafarov
Date: Mon Nov 15 18:15:33 2021 +0300

    0026174: Data Exchange, IGES - Loss of color after the second write of file
    
    Fixed export problem with reversed faces
06Commenter 1
Analysis [15.11]

Support with finding a problem with Iges transfer process (input document is changed via import process)
Support with develop a solution to fix incorrect Iges entities binding and updating an input shapes
07Commenter 7
Analysis and Solution Elaboration: Search for a possible solution.
08Commenter 3
Analysis
09Commenter 9
Analysis and Solution Elaboration
10Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: ssafarov
Date: Mon Nov 29 17:05:49 2021 +0300

    0026174: Data Exchange, IGES - Loss of color after the second write of file
    
    Transferring Edge transformations from TransferFace() method to TransferEdge()

11Commenter 2
Branch [archived branch] has been updated by Participant.

[revision removed]


Detailed log of new commits:

Author: ssafarov
Date: Tue Nov 30 11:06:32 2021 +0300

    0026174: Data Exchange, IGES - Loss of color after the second write of file
    
    Fixed variable names and added one more test check

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

[revision removed]


Detailed log of new commits:

Author: ssafarov
Date: Mon Nov 15 18:15:33 2021 +0300

    0026174: Data Exchange, IGES - Loss of color after the second write of file
    
    Removed unnecessary code
    Fixed variable names and added one more test check
    Moved Edge's Curve transformations from TransferFace() method to TransferEdge()
    Fixed export problem with reversed faces
13Commenter 2
Branch [archived branch] has been created by Participant.

[revision removed]


Detailed log of new commits:

Author: ssafarov
Date: Mon Nov 15 18:15:33 2021 +0300

    0026174: Data Exchange, IGES - Loss of color after the second write of file
    
    A copy of myface is made, where further on the copy the geometry changes. We connect the face, wire, edge of the original shape with the one whose geometry was changed. This is done in order to get the original shape in the TransferWire() and TransferEdge() methods.
14Commenter 14
Solution Elaboration
15Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
16Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
17Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
18Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
19Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
20Commenter 20
Commenter 1 please review CR26174_2

Issue: The original shape is overwritten and linked to the transformed (Iges entity), so when we want to assign a color to the Iges entity in the MakeColors() method, we cannot do this, because we are trying to get the Iges entity from the original shape (before we overwrote it)

Solution: A copy of myface is made in the TransferFace() method, where further on the copy the geometry changes. We connect the face, wire, edge of the original shape with the one whose geometry was changed. This is done in order to get the original shape in the TransferWire() and TransferEdge() methods and connect the original shape to the Iges entity

Link compare:
http://occt-tests/CR26174-master-ssafarov-OCCT/Debian80-64/diff_summary.html
http://occt-tests/CR26174-master-ssafarov-OCCT/Windows-64-VC14/diff_summary.html
http://occt-tests/CR26174-master-ssafarov-Products/Debian80-64/diff_summary.html
http://occt-tests/CR26174-master-ssafarov-Products/Windows-64-VC14/diff_summary.html
21Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
22Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
23Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
24Commenter 1
25Commenter 1
There are some problem:

The written file has not correct parameterization of 2d curves (for example lines) for the reverted face
26Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
27Commenter 27
Solution Elaboration
28Commenter 2
Branch [archived branch] has been updated forcibly by Participant.

[revision removed]
29Commenter 29
30Commenter 1
No remarks.

Dear bugmaster,
please integrate branch CR26174_2

The solution does not distort the result iges file. All entities in the file are equal to the master. The issue's bug is fixed, the input document's shapes are not changed now.
31Commenter 31
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: 18206.60000000041 / 18222.99000000043 [-0.09%]
Products
Total CPU difference: 11646.460000000101 / 11645.100000000084 [+0.01%]
Windows-64-VC14:
OCCT
Total CPU difference: 20012.890625 / 20000.0 [+0.06%]
Products
Total CPU difference: 13093.890625 / 13044.453125 [+0.38%]


Image differences :
No differences that require special attention

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

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

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

[revision removed]

Related records