Get names from STEP file.

Hi guys,

I have a STEP file which contains two solid shapes. One is named as "test", another named as "Boss-Extrude1". In SolidWorks2010, it can read all solid shapes' name. But in my OCC6.5.3, I can only read the compound shape "Assemb1" and compound shape "Part1".
The hierarchy of the step file seems:
Compound(Assemb1) -> Compound(Part1) --> Solid 1 and Solid 2. No matter how I try, I can't get two solids names. I am using STEPCAFControl_Reader.

Any suggestion is welcome. Thanks.

Ding

jeholl's picture

I have the same question.

WuXuan's picture

use STEPCAFControl_Reader to Transfer Handle(TDocStd_Document).
then (XCAFDoc_ShapeTool) myAssembly = XCAFDoc_DocumentTool::ShapeTool(doc->Main());
myAssembly->GetShapes(Labels);
and get a label from labels, use aLabel.FindAttribute(TDataStd_Name::GetID(), N) to get name.

Cauchy Ding's picture

Hi WuXuan,

Have you tried my attached .step file? Does it work for you?
Thanks.

Ding

WuXuan's picture

i try now, the same problem, the names are assembly1 and part1.

Forum supervisor's picture

Dear Ding,
Indeed the document structure doesn't contain names of the mentioned solids.
Probably it may be a bug.
I suggest you to register the issue in Mantis Bugtracker which is available via the Collaborative portal - http://dev.opencascade.org/index.php?q=home/get_involved.
If the problem is critical for you, you may contact us via the Contact Form http://www.opencascade.org/about/contacts/.
Regards