#include <cadex/LicenseManager_Activate.h>
#include <cadex/ModelAlgo_BRepMesher.hxx>
#include <cadex/ModelAlgo_BRepMesherParameters.hxx>
#include <cadex/ModelAlgo_TopoPrimitives.hxx>
#include <cadex/ModelData_BRepRepresentation.hxx>
#include <cadex/ModelData_Model.hxx>
#include <cadex/ModelData_Body.hxx>
#include <cadex/ModelData_IndexedTriangleSet.hxx>
#include <cadex/ModelData_Part.hxx>
#include <cadex/ModelData_PolyRepresentation.hxx>
#include <cadex/ModelData_PolyShapeList.hxx>
#include <cadex/ModelData_PolyVertexSet.hxx>
#include <cadex/ModelData_Solid.hxx>
#include <iostream>
#include "../../cadex_license.cxx"
{
int trianglesNb = 0;
const ModelData_PolyShapeList& aList = thePoly.
Get();
for (size_t i = 0; i < aList.Size (); ++i) {
}
}
return trianglesNb;
}
{
ModelData_Solid aSphere = ModelAlgo_TopoPrimitives::CreateSphere (thePosition, theRadius);
return aBRep;
}
{
cout << "A polygonal representation with " << NumberOfTriangles (aPoly) << " triangles has been added." << endl;
}
int main()
{
auto aKey = LicenseKey::Value();
if (!CADExLicense_Activate (aKey)) {
cerr << "Failed to activate CAD Exchanger license." << endl;
return 1;
}
AddPolyToPart (aPart, ModelAlgo_BRepMesherParameters::Coarse);
AddPolyToPart (aPart, ModelAlgo_BRepMesherParameters::Medium);
AddPolyToPart (aPart, ModelAlgo_BRepMesherParameters::Fine);
if (!aModel.
Save (
"SphereWithLODs.xml")) {
cout << "Unable to save the model!" << endl;
return 1;
}
return 0;
}