I'm devloping a CAD tool under visual 2005, with the interactivity (3D/2D, selection,...) managed by openGl.
I have already used the Occ libraries in this software to hollow the shapes (boolean operation) and to tesselate it.
Now, we would like to import 3D models in the STEP format.
I have devloped an STEP importer like this (summary) :
STEPControl_Reader* readerStep = new STEPControl_Reader();
TopoDS_Shape shape = readerStep->OneShape();
It works fine for the 3D parameters, but the hierarchy of the model is flat, and no name or color are imported...
I try with the CAF libraries :
reader.ReadFile( (Standard_CString) fichier);
Handle ( XCAFApp_Application ) anApp = XCAFApp_Application::GetApplication();
if ( reader.Transfer( doc ) )
But the execution crashes during the call of the "Transfer" function.
The STEP model is ok, so I think that the trouble comes from the initialization of the "anApp" or the "doc"
because I don't develop an OCC application, but a MFC-OpenGl application !
Could you help me or advise me, please !
Thank you very much