Hi Martin,
Here is some code I have not tested neither compiled, give it a try if you still don't figure out how to do what you want with OpenCascade :
#include
#include
#include
#include
#include
void exportIgesFileToStepFile(const char* igesFilePath,
const char* stepFilePath)
{
Handle_TDocStd_Document document;
Handle_XCAFApp_Application app = XCAFApp_Application::GetApplication();
app->NewDocument("MDTV-XCAF", document);
IGESCAFControl_Reader reader;
reader.ReadFile(filePath);
bool readOk = reader.Transfer(document);
if (readOk)
{
STEPCAFControl_Writer writer;
bool writeOk = writer.Perform(document, stepFilePath);
if (!writeOk)
std::cerr << "Could not write : " << stepFilePath << std::endl;
}
else
std::cerr << "Could not read : " << igesFilePath << std::endl;
}
Hope this will help you.