MantisBT - Community
View Issue Details
0023951Community[OCCT] OCCT:Data Exchangepublic2013-05-08 17:212015-02-07 08:42
Pawel 
apn 
normalminor 
closedfixed 
WindowsVC++ 200864 bit
[OCCT] 6.6.0 
[OCCT] 6.8.0[OCCT] 6.8.0 
bugs xde bug23951
0023951: Visibility of free, simple shapes not saved when writing XCAF Document into STEP
I'm not sure if this effect occurs by design or not bur I noticed that when saving a simple free shape that is invisible into STEP file using STEPCAFControl_Writer the (in)visibility status is not set.

//test_box.step
TDF_Label lab1 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape();
XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->SetShape(lab1, s1);
TDataStd_Name::Set(lab1, "Box1");
        
Quantity_Color yellow(1,1,0, Quantity_TOC_RGB);
XCAFDoc_DocumentTool::ColorTool (aDoc->Main())->SetColor(lab1, yellow, XCAFDoc_ColorGen);
XCAFDoc_DocumentTool::ColorTool(aDoc->Main())->SetVisibility(lab1, 0);

STEPControl_StepModelType mode = STEPControl_AsIs;
STEPCAFControl_Writer writer;
if ( ! writer.Transfer (aDoc, mode ) )
{
    cout<<"The document cannot be translated or gives no result."<<endl;
    return;
}

IFSelect_ReturnStatus stat = writer.Write("test_box.step");
No tags attached.
related to 0023950closed bugmaster Community Names and visibility of points not saved when writing XCAF Document into STEP 
related to 0025803closed bugmaster Open CASCADE Defective tests contaminating current directory 
? test_box.step (17,124) 2013-05-08 17:21
https://tracker.dev.opencascade.org/
Issue History
2013-05-08 17:21PawelNew Issue
2013-05-08 17:21PawelAssigned To => gka
2013-05-08 17:21PawelFile Added: test_box.step
2013-05-08 17:21PawelRelationship addedrelated to 0023950
2013-12-21 10:13abvTarget Version6.7.0 => 6.7.1
2014-03-25 16:22apnNote Added: 0028471
2014-04-04 18:09abvTarget Version6.7.1 => 6.8.0
2014-04-15 10:39gkaAssigned Togka => ika
2014-04-15 10:39gkaStatusnew => assigned
2014-05-21 11:09ikaNote Added: 0029427
2014-05-21 11:09ikaAssigned Toika => gka
2014-05-21 11:09ikaStatusassigned => resolved
2014-05-21 11:16gkaNote Added: 0029428
2014-05-21 11:16gkaStatusresolved => reviewed
2014-05-22 11:11bugmasterAssigned Togka => apn
2014-05-27 11:04apnNote Added: 0029532
2014-05-27 11:04apnAssigned Toapn => ika
2014-05-27 11:04apnStatusreviewed => assigned
2014-05-27 15:01ikaNote Added: 0029546
2014-05-27 15:01ikaAssigned Toika => apn
2014-05-27 15:01ikaStatusassigned => feedback
2014-05-28 09:53apnStatusfeedback => reviewed
2014-05-28 16:00apnNote Added: 0029578
2014-05-28 16:01apnTest case number => bugs xde bug23951
2014-05-28 16:01apnAssigned Toapn => bugmaster
2014-05-28 16:01apnStatusreviewed => tested
2014-05-30 12:59apnChangeset attached => occt master 574d7236
2014-05-30 12:59apnAssigned Tobugmaster => apn
2014-05-30 12:59apnStatustested => verified
2014-05-30 12:59apnResolutionopen => fixed
2014-11-11 12:46aivFixed in Version => 6.8.0
2014-11-11 12:52aivStatusverified => closed
2015-02-07 08:42abvRelationship addedrelated to 0025803

Notes
(0028471)
apn   
2014-03-25 16:22   
QA command OCC23951 was added to QABugs_19.cxx
(0029427)
ika   
2014-05-21 11:09   
Delete check for top-level shape during writing invisibility property.

Branch CR23951 is ready to be reviewed.
Dear GKA,
Please review.
(0029428)
gka   
2014-05-21 11:16   
Branch CR23951 is ready to be tested.
(0029532)
apn   
2014-05-27 11:04   
Dear BugMaster,

Branch CR23951 (and products from GIT master) was compiled on Linux, Windows and MacOS platforms and tested.
SHA-1: e628003fa5c31526337504624dff667abd19ef2f

Number of compiler warnings:

occt component :
Linux: 17 (17 on master)
Windows: 0 (0 on master)
MacOS: 202 (205 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions

Testing cases:
I added QA command OCC23951 (step to reproduce) to src/QABugs/QABugs_19.cxx, it compiles successfully, but crashes in Draw.
Could you please review it.

Testing on Linux:
Total MEMORY difference: 359360664 / 359725188
Total CPU difference: 51412.86000000007 / 51526.670000000115

Testing on Windows:
Total MEMORY difference: 382006404 / 382720164
Total CPU difference: 36923.140625 / 39033.953125

There are no differences in images found by testdiff.
(0029546)
ika   
2014-05-27 15:01   
Dear APN,

The problem was fixed by initializing document and shape.
Branch CR23951 was updated.
(0029578)
apn   
2014-05-28 16:00   
Dear BugMaster,

Branch CR23951 (and products from GIT master) was compiled on Linux, Windows and MacOS platforms and tested.
SHA-1: 0516c80b55df8a50868adf3dad20947776b8a9f9

Number of compiler warnings:

occt component :
Linux: 17 (17 on master)
Windows: 0 (0 on master)
MacOS: 202 (205 on master)

products component :
Linux: 11 (11 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions

Testing cases:
bugs xde bug23951 - OK
http://occt-tests/CR23951-master-occt/Debian60-64/bugs/xde/bug23951.html [^]

Testing on Linux:
Total MEMORY difference: 359501580 / 359742796
Total CPU difference: 52244.45999999983 / 51526.670000000115

Testing on Windows:
Total MEMORY difference: 381882788 / 382651592
Total CPU difference: 42782.984375 / 37486.484375

There are no differences in images found by testdiff.