Save .STEP With a TDF_Label

Hello.
I want to save a part of a .SETP ,but When I save .step by a single label,The .STEP file still gb_assembly. How can i save a gb_part file with a sing label.I tried to use TDF_Label::ForgetAttribute to forget TreeNode ,But when i did it the label can't save.

Dmitrii Pasukhin's picture

Hello,

To write separeted label you need to choose TDF_Label that is not an assembly. In case, please check that the choosen label contains a simple shape.

Best regards, Dmitrii.

x xo's picture

The label has only a shape but it Is Reference,so when I save it I can only get assembly file.When i use XCAFDoc_ShapeTool::GetReferredShape() to get the final single label,the shape location was changed. I tried to use XCAFDoc_Location::Set(referred, Loc) to change the final label but it's look like not work,I don't know how to save a gb_part .step file with right location.