I could not read advanced_brep_shape_representation's name from step files

I have a step file with many parts in it. These parts have names, as shown in Figure 1, stored in the advanced_brep_shape_representation.
But I don't know how to get the names. I used the CAD Assistant to read this file, and the result is shown in Figure 2. The CAD Assistant also couldn't read its name correctly.
The effect I want is to read its name correctly, as shown in Figure 3. Or just read the names and output them in the console.
I really need help.

Dmitrii Pasukhin's picture

Hello, extracting names from Step model(Advanced face and other, not assembly entities) into XCAF are not implemented.

You can do that by yourself, after reading XCAF. Please check the source: https://github.com/Open-Cascade-SAS/OCCT/blob/f39f9838e43879ca3a1582de71...

You need to iterate and found your step entities, extract their shape and then find a shape label. StepSession is available from WS.

Feature to extract names is already interested by community. It will be helpfull, if you write your suggesting in the next survey: Shape the Future of OCCT! Your Opinion Matters! - Forum Open Cascade Technology

Best regards, Dmitrii.

Zeping Li's picture

Thank you Very much, Dmitrii. I am trying to do that like you said. Before I succeed, I must first express my thanks to you.(Maybe I will get some new problems haha)
Best regards, Li.

Dmitrii Pasukhin's picture

You are free to consult with your prepared sample. I can review your code. So, if you will have any problems, welcome.

Best regards, Dmitrii.

x xo's picture

Did you finished this project,I need to fix this also

Dmitrii Pasukhin's picture

Extracting name as an attribute: https://dev.opencascade.org/node/84287#comment-23931 and https://dev.opencascade.org/node/84499#comment-24468

Previously I share where code be inserted to put information into XCAF. Additionally in Read name method you can found search shape by entity.

As for a common approach from OCCT side, extracting name from sub-shapes is very expensive task from performance side :(

Best regards, Dmitrii.