#define __CADEX_PREVIEW_VISUALIZATION 1
#include <cadex/Base_Exception.hxx>
#include <cadex/Base_String.hxx>
#include <cadex/Base_Settings.hxx>
#include <cadex/LicenseManager_Activate.h>
#include <cadex/ModelData_Model.hxx>
#include <cadex/ModelPrs_OffscreenViewPort.hxx>
#include <cadex/ModelPrs_Scene.hxx>
#include <cadex/ModelPrs_SceneNode.hxx>
#include <cadex/ModelPrs_SceneNodeFactory.hxx>
#include <cadex/ModelPrs_SceneNodeFactoryParameters.hxx>
#include <cadex/ModelPrs_BackgroundStyle.hxx>
#include <cadex/STEP_Reader.hxx>
#include <cadex/STEP_ReaderParameters.hxx>
#include <iostream>
#include "../../cadex_license.cxx"
int main (int argc, char *argv[])
{
auto aKey = LicenseKey::Value();
if (!CADExLicense_Activate (aKey)) {
cerr << "Failed to activate CAD Exchanger license." << endl;
return 1;
}
if (argc != 3) {
cerr << "Usage: " << argv[0] << " <input_file> <output_file>, where:" << endl;
cerr << " <input_file> is a name of the STEP file to be read" << endl;
cerr << " <output_file> is a name of the PNG file to be write" << endl;
return 1;
}
const char* aSource = argv[1];
const char* aDest = argv[2];
cerr << "Failed to read the file " << aSource << endl;
return 1;
}
cerr << "Failed to transfer the file into inner format." << endl;
return 1;
}
Base_Settings::Default()->SetValue (Base_Settings::UseExceptions, true);
try {
auto aRootNode = aFactory.
Create (aModel);
cerr << "Unable to attach viewport to scene" << endl;
return 1;
}
cerr << "Failed to write the file " << aDest << endl;
return 1;
}
cerr << theEx.
What() << endl;
return 1;
}
return 0;
}