MantisBT - Community
View Issue Details
0023950Community[OCCT] OCCT:Data Exchangepublic2013-05-08 16:102014-11-11 12:53
Pawel 
bugmaster 
normalminor 
closedfixed 
WindowsVC++ 200864 bit
[OCCT] 6.6.0 
[OCCT] 6.8.0[OCCT] 6.8.0 
bugs xde(005) bug23950
0023950: Names and visibility of points not saved when writing XCAF Document into STEP
As stated in the subject the visibility and the name (located at the corresponding label) of points is not written into the STEP file when using STEPCAFControl_Writer.

This happens if points are located in the assembly structure (i.e. "SimpleShape is not FreeShape").

In case of edges and other shapes this problem does not occur. Only points seem to be affected.
//test_point_assembly.step
TopoDS_Shape s6 = BRepBuilderAPI_MakeVertex(gp_Pnt(75,0,0));
gp_Trsf t0;
TopLoc_Location location0(t0);

TDF_Label lab1 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape();
XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->SetShape(lab1, s6);
TDataStd_Name::Set(lab1, "Point1");

TDF_Label labelA0 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main ())->NewShape();
TDataStd_Name::Set(labelA0, "ASSEMBLY");
        
TDF_Label component01 = XCAFDoc_DocumentTool::ShapeTool (aDoc->Main())->AddComponent(labelA0, lab1, location0);
        
Quantity_Color yellow(1,1,0, Quantity_TOC_RGB);
XCAFDoc_DocumentTool::ColorTool (labelA0)->SetColor(component01, yellow, XCAFDoc_ColorGen);
XCAFDoc_DocumentTool::ColorTool(labelA0)->SetVisibility(component01, 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_point_assembly.step");
=========================

The name "Point1" cannot be found in the resulting STEP file. "INVISIBILITY" does not occur either.

No tags attached.
related to 0023951closed apn Visibility of free, simple shapes not saved when writing XCAF Document into STEP 
? test_point_assembly.step (3,388) 2013-05-08 16:10
https://tracker.dev.opencascade.org/
Issue History
2013-05-08 16:10PawelNew Issue
2013-05-08 16:10PawelAssigned To => gka
2013-05-08 16:10PawelFile Added: test_point_assembly.step
2013-05-08 17:21PawelRelationship addedrelated to 0023951
2013-12-21 10:13abvTarget Version6.7.0 => 6.7.1
2014-04-04 18:27abvTarget Version6.7.1 => 6.8.0
2014-04-15 10:38gkaAssigned Togka => ika
2014-04-15 10:38gkaStatusnew => assigned
2014-04-18 15:41gkaAssigned Toika => gka
2014-06-17 13:06ikaNote Added: 0029796
2014-06-17 13:06ikaAssigned Togka => Pawel
2014-06-17 13:06ikaStatusassigned => feedback
2014-06-17 18:06PawelNote Added: 0029800
2014-06-17 18:06PawelAssigned ToPawel => ika
2014-06-17 18:06PawelStatusfeedback => assigned
2014-06-17 18:22abvNote Added: 0029801
2014-06-18 15:04apvTest case number => bugs xde bug23950
2014-06-18 15:09apvTest case numberbugs xde bug23950 =>
2014-07-21 17:55gitNote Added: 0030273
2014-07-21 18:04ikaNote Added: 0030275
2014-07-21 18:04ikaAssigned Toika => gka
2014-07-21 18:04ikaStatusassigned => resolved
2014-07-21 18:16gkaNote Added: 0030276
2014-07-21 18:16gkaStatusresolved => reviewed
2014-07-21 18:27gitNote Added: 0030277
2014-07-21 20:31mkvAssigned Togka => mkv
2014-07-23 15:52mkvNote Added: 0030387
2014-07-23 15:55gitNote Added: 0030388
2014-07-23 15:56mkvTest case number => bugs xde(005) bug23950
2014-07-23 15:56mkvAssigned Tomkv => ika
2014-07-23 15:56mkvStatusreviewed => assigned
2014-07-23 16:35gitNote Added: 0030391
2014-07-23 16:41ikaNote Added: 0030392
2014-07-23 16:41ikaAssigned Toika => mkv
2014-07-23 16:41ikaStatusassigned => feedback
2014-07-23 17:25gitNote Added: 0030394
2014-07-23 17:26mkvNote Added: 0030395
2014-07-23 17:26mkvAssigned Tomkv => bugmaster
2014-07-23 17:26mkvStatusfeedback => tested
2014-07-25 14:45bugmasterChangeset attached => occt master 1fa7cb8c
2014-07-25 14:45bugmasterStatustested => verified
2014-07-25 14:45bugmasterResolutionopen => fixed
2014-07-28 16:22gitNote Added: 0030436
2014-11-11 12:46aivFixed in Version => 6.8.0
2014-11-11 12:53aivStatusverified => closed

Notes
(0029796)
ika   
2014-06-17 13:06   
Dear Pawel,

According to issue OCC725 (Storing all free vertices of STEP into one SHAPE_DEFINITION_REPRESENTATION), all free vertices are exported like one geometric curve set, so a single vertex can't has its own color, name etc.
(0029800)
Pawel   
2014-06-17 18:06   
Dear ika,

if this behaviour is desired, please leave it as it is and close the issue.

Unfortunately, I don't have the access to the issue 725. Why is it desired to always have all free vertices as one SHAPE_DEFINITION_REPRESENTATION?
(0029801)
abv   
2014-06-17 18:22   
Issue #725 gives no explanation, it was just request to have all free vertices in one SDR :)

I deem that names of the points can possibly be encoded in their corresponding entities. Regarding colors, visibility, and other attributes, it would be worth checking current status of relevant Recommended Practices at CAX-IF web site to see whether this is supported for points by STEP APs or not, and how to encode it if supported.
(0030273)
git   
2014-07-21 17:55   
Branch CR23950 has been created by ika.

SHA-1: 5b98f71b5a1802b23ea7edfe462c694d0972078d
(0030275)
ika   
2014-07-21 18:04   
New mode of vertices writing was added, but old behavior is default.
A parameter "write.step.vertex.mode" was added to switching between these two modes:
0 - "One Compound" - old behavior (by default),
1 - "Single Vertex" - new behavior.

Branch CR23950 is ready to be reviewed.
Dear GKA,
Please review.
(0030276)
gka   
2014-07-21 18:16   
Branch CR23950 is ready to be tested
(0030277)
git   
2014-07-21 18:27   
Branch CR23950 has been updated by ika.

SHA-1: 646e5fa5b323a97711c0b6941a0ea8a829594a74
(0030387)
mkv   
2014-07-23 15:52   
Dear BugMaster,

Branch CR23950 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 646e5fa5b323a97711c0b6941a0ea8a829594a74

Number of compiler warnings:

occt component :
Linux: 15 (15 on master)
Windows: 0 (0 on master)
MacOS: 196 (196 on master)

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

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR23950-master-occt/Debian60-64/bugs/xde/bug23950.html [^]
http://occt-tests/CR23950-master-occt/Windows-32-VC10/bugs/xde/bug23950.html [^]
bugs xde(005) bug23950: BAD

Testing on Linux:
Total MEMORY difference: 351321680 / 351968492
Total CPU difference: 46660.54000000033 / 46305.24

Testing on Windows:
Total MEMORY difference: 239092968 / 239178976
Total CPU difference: 31184.28125 / 35090.328125

There are no differences in images found by testdiff.
(0030388)
git   
2014-07-23 15:55   
Branch CR23950 has been updated by mkv.

SHA-1: 1cfc53f19fa8773c62afc148900434226ac13e96
(0030391)
git   
2014-07-23 16:35   
Branch CR23950 has been updated by ika.

SHA-1: 23247126e6ea15a80a4a7e8ed951953e3a1403e2
(0030392)
ika   
2014-07-23 16:41   
Dear MKV,

As I wrote before, old behavior is default, and new vertex writing mode is additional and switch on by parameter write.step.vertex.mode. So BAD result in default mode is correct. To get IMPROVEMENT result this parameter should be 1 (0 by default).

I correct test script by switching ON/OFF this parameter. Now the result of test case is IMPROVEMENT.
(0030394)
git   
2014-07-23 17:25   
Branch CR23950 has been updated by mkv.

SHA-1: bc71fd428704688e2f0f75f9d1670f563a6b31c1
(0030395)
mkv   
2014-07-23 17:26   
Dear bugmaster,
CR23950 is TESTED.
(0030436)
git   
2014-07-28 16:22   
Branch CR23950 has been deleted by inv.

SHA-1: bc71fd428704688e2f0f75f9d1670f563a6b31c1