View Issue Details

IDProjectCategoryView StatusLast Update
0023950CommunityOCCT:Data Exchangepublic2022-07-05 13:28
ReporterPawel Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformWindowsOSVC++ 2008 
Product Version6.6.0 
Target Version6.8.0Fixed in Version6.8.0 
Summary0023950: Names and visibility of points not saved when writing XCAF Document into STEP
DescriptionAs 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.
Steps To Reproduce//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.

TagsNo tags attached.
Test case numberbugs xde(005) bug23950

Attached Files

  • test_point_assembly.step (3,388 bytes)

Relationships

parent of 0033053 closeddpasukhi Open CASCADE Data Exchange, Step Export - Compound with vertex is ignored 
related to 0023951 closedapn Community Visibility of free, simple shapes not saved when writing XCAF Document into STEP 

Activities

Pawel

2013-05-08 16:10

developer  

test_point_assembly.step (3,388 bytes)

ika

2014-06-17 13:06

developer   ~0029796

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.

Pawel

2014-06-17 18:06

developer   ~0029800

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?

abv

2014-06-17 18:22

manager   ~0029801

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.

git

2014-07-21 17:55

administrator   ~0030273

Branch CR23950 has been created by ika.

SHA-1: 5b98f71b5a1802b23ea7edfe462c694d0972078d

ika

2014-07-21 18:04

developer   ~0030275

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.

gka

2014-07-21 18:16

developer   ~0030276

Branch CR23950 is ready to be tested

git

2014-07-21 18:27

administrator   ~0030277

Branch CR23950 has been updated by ika.

SHA-1: 646e5fa5b323a97711c0b6941a0ea8a829594a74

mkv

2014-07-23 15:52

tester   ~0030387

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.

git

2014-07-23 15:55

administrator   ~0030388

Branch CR23950 has been updated by mkv.

SHA-1: 1cfc53f19fa8773c62afc148900434226ac13e96

git

2014-07-23 16:35

administrator   ~0030391

Branch CR23950 has been updated by ika.

SHA-1: 23247126e6ea15a80a4a7e8ed951953e3a1403e2

ika

2014-07-23 16:41

developer   ~0030392

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.

git

2014-07-23 17:25

administrator   ~0030394

Branch CR23950 has been updated by mkv.

SHA-1: bc71fd428704688e2f0f75f9d1670f563a6b31c1

mkv

2014-07-23 17:26

tester   ~0030395

Dear bugmaster,
CR23950 is TESTED.

git

2014-07-28 16:22

administrator   ~0030436

Branch CR23950 has been deleted by inv.

SHA-1: bc71fd428704688e2f0f75f9d1670f563a6b31c1

Related Changesets

occt: master 1fa7cb8c

2014-07-24 09:49:25

ika


Committer: bugmaster Details Diff
0023950: Names and visibility of points not saved when writing XCAF Document into STEP

Add new mode of writing vertices and parameter to switch on this mode.

Add description of new parameter (write.step.vertex.mode) into documentation.

Small correction of draw-command and test case for issue CR25095

test case correction

Small correction of test case for issue CR23950
Affected Issues
0023950
mod - dox/user_guides/step/step.md Diff File
mod - src/QABugs/QABugs_19.cxx Diff File
mod - src/STEPControl/STEPControl_ActorWrite.cxx Diff File
mod - src/STEPControl/STEPControl_Controller.cxx Diff File
mod - tests/bugs/xde/bug23950 Diff File

Issue History

Date Modified Username Field Change
2013-05-08 16:10 Pawel New Issue
2013-05-08 16:10 Pawel Assigned To => gka
2013-05-08 16:10 Pawel File Added: test_point_assembly.step
2013-05-08 17:21 Pawel Relationship added related to 0023951
2013-12-21 10:13 abv Target Version 6.7.0 => 6.7.1
2014-04-04 18:27 abv Target Version 6.7.1 => 6.8.0
2014-04-15 10:38 gka Assigned To gka => ika
2014-04-15 10:38 gka Status new => assigned
2014-04-18 15:41 gka Assigned To ika => gka
2014-06-17 13:06 ika Note Added: 0029796
2014-06-17 13:06 ika Assigned To gka => Pawel
2014-06-17 13:06 ika Status assigned => feedback
2014-06-17 18:06 Pawel Note Added: 0029800
2014-06-17 18:06 Pawel Assigned To Pawel => ika
2014-06-17 18:06 Pawel Status feedback => assigned
2014-06-17 18:22 abv Note Added: 0029801
2014-06-18 15:04 apv Test case number => bugs xde bug23950
2014-06-18 15:09 apv Test case number bugs xde bug23950 =>
2014-07-21 17:55 git Note Added: 0030273
2014-07-21 18:04 ika Note Added: 0030275
2014-07-21 18:04 ika Assigned To ika => gka
2014-07-21 18:04 ika Status assigned => resolved
2014-07-21 18:16 gka Note Added: 0030276
2014-07-21 18:16 gka Status resolved => reviewed
2014-07-21 18:27 git Note Added: 0030277
2014-07-21 20:31 mkv Assigned To gka => mkv
2014-07-23 15:52 mkv Note Added: 0030387
2014-07-23 15:55 git Note Added: 0030388
2014-07-23 15:56 mkv Test case number => bugs xde(005) bug23950
2014-07-23 15:56 mkv Assigned To mkv => ika
2014-07-23 15:56 mkv Status reviewed => assigned
2014-07-23 16:35 git Note Added: 0030391
2014-07-23 16:41 ika Note Added: 0030392
2014-07-23 16:41 ika Assigned To ika => mkv
2014-07-23 16:41 ika Status assigned => feedback
2014-07-23 17:25 git Note Added: 0030394
2014-07-23 17:26 mkv Note Added: 0030395
2014-07-23 17:26 mkv Assigned To mkv => bugmaster
2014-07-23 17:26 mkv Status feedback => tested
2014-07-25 14:45 bugmaster Changeset attached => occt master 1fa7cb8c
2014-07-25 14:45 bugmaster Status tested => verified
2014-07-25 14:45 bugmaster Resolution open => fixed
2014-07-28 16:22 git Note Added: 0030436
2014-11-11 12:46 aiv Fixed in Version => 6.8.0
2014-11-11 12:53 aiv Status verified => closed
2022-07-05 13:28 dpasukhi Relationship added parent of 0033053