For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Get names from STEP file.

Cauchy Ding's picture

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.


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());
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?


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 -
If the problem is critical for you, you may contact us via the Contact Form