View Issue Details

IDProjectCategoryView StatusLast Update
0033815CommunityOCCT:Data Exchangepublic2024-11-12 12:23
ReporterMatthias Assigned Todish  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
PlatformWindowsOSVC++ 2019 
Summary0033815: Data Exchange, Step Export - No names in STEP file when writing in non-manifold mode
DescriptionHi,

in the example below shapes are written to STEP file and a name for the shape is set (written off the top of my head):

// read shape from BREP
BRep_Builder b;
TopoDS_Shape aShape;
BRepTools::Read(aShape, "C:/temp/shape.brep", b);

// write shape to STEP
STEPCAFControl_Writer aWriter;
Handle(TDocStd_Document) aDoc;
Handle(XCAFDoc_ShapeTool) aSTool = XCAFDoc_DocumentTool::ShapeTool( aDoc->Main() );

// uncomment next line and no name is written to STEP file anymore!
//Interface_Static::SetIVal("write.step.nonmanifold", 1);

TDF_Label aL = aSTool->AddShape(aShape); // add shape

TDataStd_Name::Set(aL, TCollection_ExtendedString("MY_NAME")); // add name

aWriter.Transfer(aDoc, STEPControl_StepModelType::STEPControl_AsIs);
aWriter.Write("C:/temp/shape.step");


The name occurs in the STEP file at `0000007`:

ISO-10303-21;
HEADER;
FILE_DESCRIPTION(('Open CASCADE Model'),'2;1');
FILE_NAME('Open CASCADE Shape Model','2024-08-28T09:26:22',('Author'),(
    'Open CASCADE'),'Open CASCADE STEP processor 7.6','Open CASCADE 7.6'
  ,'Unknown');
FILE_SCHEMA(('AUTOMOTIVE_DESIGN { 1 0 10303 214 1 1 1 1 }'));
ENDSEC;
DATA;
0000001 = APPLICATION_PROTOCOL_DEFINITION('international standard',
  'automotive_design',2000,0000002);
0000002 = APPLICATION_CONTEXT(
  'core data for automotive mechanical design processes');
#3 = SHAPE_DEFINITION_REPRESENTATION(#4,#10);
#4 = PRODUCT_DEFINITION_SHAPE('','',#5);
#5 = PRODUCT_DEFINITION('design','',#6,0000009);
#6 = PRODUCT_DEFINITION_FORMATION('','',0000007);
0000007 = PRODUCT('MY_NAME','MY_NAME','',(0000008));
0000008 = PRODUCT_CONTEXT('',0000002,'mechanical');
0000009 = PRODUCT_DEFINITION_CONTEXT('part definition',0000002,'design');


If the line `//Interface_Static::SetIVal("write.step.nonmanifold", 1);` is uncommented, no name is written to STEP anymore.

Also posted in https://dev.opencascade.org/content/no-names-step-file-when-writing-non-manifold-mode.
Additional information
and documentation updates
GH Issue: https://github.com/Open-Cascade-SAS/OCCT/issues/153
TagsNo tags attached.
Test case number

Attached Files

  • shape.brep (90,953 bytes)

Activities

Matthias

2024-09-04 13:55

developer  

shape.brep (90,953 bytes)

dpasukhi

2024-11-11 23:46

administrator   ~0116867

Regression after #31617

dpasukhi

2024-11-12 12:23

administrator   ~0116868

GH Issue: https://github.com/Open-Cascade-SAS/OCCT/issues/153

Issue History

Date Modified Username Field Change
2024-09-04 13:55 Matthias New Issue
2024-09-04 13:55 Matthias Assigned To => ika
2024-09-04 13:55 Matthias File Added: shape.brep
2024-09-04 13:56 Matthias Description Updated
2024-09-04 13:58 Matthias Description Updated
2024-09-04 14:14 dpasukhi Summary No names in STEP file when writing in non-manifold mode => Data Exchange, Step Export - No names in STEP file when writing in non-manifold mode
2024-11-04 19:12 ebelouso Assigned To ika => dish
2024-11-04 19:12 ebelouso Status new => assigned
2024-11-11 23:46 dpasukhi Note Added: 0116867
2024-11-12 12:23 dpasukhi Additional Information Updated
2024-11-12 12:23 dpasukhi Note Added: 0116868