Hello,
I am writing a program that is supposed to read a Step file of an assembly, remove a part from that assembly and then write separate Step files for the removed part and the original assembly but with that part removed.
I use the following code snippet to remove the part from the original assembly:
removeL is the label of the location of the part in the assembly.
When I write the document to a Step file however, it is still the entire assembly without the part being removed.
I have verified that ShapeTool->GetShape(removeL) is the correct shape that I want.
I would greatly appreciate any help. Thank you!
Best regards, Kaiwen
Link to same question in occt forum as reference: https://dev.opencascade.org/content/removing-part-assembly
I am writing a program that is supposed to read a Step file of an assembly, remove a part from that assembly and then write separate Step files for the removed part and the original assembly but with that part removed.
I use the following code snippet to remove the part from the original assembly:
Code:
if(!ShapeTool->RemoveShape(removeL, false)){
ShapeTool->RemoveComponent(removeL);
}
ShapeTool->UpdateAssemblies();
removeL is the label of the location of the part in the assembly.
When I write the document to a Step file however, it is still the entire assembly without the part being removed.
I have verified that ShapeTool->GetShape(removeL) is the correct shape that I want.
I would greatly appreciate any help. Thank you!
Best regards, Kaiwen
Link to same question in occt forum as reference: https://dev.opencascade.org/content/removing-part-assembly