AXIS2_PLACEMENT_3D transfer from STEP – Forum Open Cascade Technology

I have what I believe is a fairly simple problem, but I can’t find a way about it after significant time spent which is quite perplexing. I have a step file which contains a coordinate system with a specific name that needs to be removed. So, I’d like to read the step file into OCC, delete that coordinate system and then write the step file back.

Most of reading examples contain transferring various objects but not coordinate systems. I was able to inspect all entities using

Handle(Interface_InterfaceModel) Model = aReader.Model();
Standard_Integer nb = Model->NbEntities();
Handle(Standard_Transient) enti = Model->Value(i);

and find the csys in question and then convert it to Handle(Geom_Axis2Placement) to get numerical info about the csys.

Writing tutorial contains Mapping Open CASCADE Technology shapes to STEP entities and for Geometrical objects the table gives

CASCADE object STEP entity
Geom_Axis2Placement axis2_placement_3d

but I don’t see how to create a shape a out of this which STEPControl_Writer requires for transfer. Is this even a proper way to aim for? I fell I am just shooting in the dark.

So, is there a way to load stuff from step file with AXIS2_PLACEMENT_3D objects, delete a specific one and then save the content back to step?

Read more here: Source link