Copy selected object


I have STEP file. I use C++ and MFC samples.( I try to modify Import/Export sample). I want to save selected objects and the paste in different coordinates (after the click button PASTE)

I can select some objects and then I want to copy them. How can I do it?

I found how to copy TopoDS_Shape with 

BRepBuilderAPI_Copy A;


TopoDS_Shape ShapeCopy;

ShapeCopy = A.Shape();


But if I am not mistake, when I select parts of my step file then  I select AISInteractive_Objects. not shapes.

Benjamin Bihler's picture

You can check whether your AIS_InteractiveObject is an AIS_Shape, then downcast it and use its Shape() method to get the TopoDS_Shape out of it.


a.kliuchnikova_144191's picture

Thank you! I'll try it!