Refer to the Netgen Mesher Example.
#include <cadex/LicenseManager_Activate.h>
#include <cadex/MeshAlgo_NetgenFactory.hxx>
#include <cadex/ModelAlgo_BRepMesher.hxx>
#include <cadex/ModelAlgo_BRepMesherParameters.hxx>
#include <cadex/ModelData_ModelReader.hxx>
#include <cadex/ModelData_ModelWriter.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 != 2) {
cerr << "Usage: " << argv[0] << " <input_file>, where:" << endl;
cerr << " <input_file> is a name of the XML file to be read" << endl;
return 1;
}
const char* aSource = argv[1];
cerr << "Failed to read the file " << aSource << endl;
return 1;
}
cout << "Unable to save the model!" << endl;
return 1;
}
return 0;
}
Computes a polygonal representation from a B-Rep one.
Definition: ModelAlgo_BRepMesher.hxx:47
Defines parameters used by the B-Rep mesher.
Definition: ModelAlgo_BRepMesherParameters.hxx:32
void SetParameters(const Parameters &theParam)
Sets parameters to be used by the factory.
Definition: MeshAlgo_NetgenFactory.cxx:263
Defines parameters used by the Netgen meshing algorithm.
Definition: MeshAlgo_NetgenFactory.hxx:30
const internal::Base_MeshAlgoFactory & ComputationalMeshAlgo() const
Returns a computational mesher algorithm.
Definition: ModelAlgo_BRepMesherParameters.cxx:414
void Compute(const ModelData_Model &theModel, bool theEnforceAddition=false) const
Computes polygonal representations for all parts in the model.
Definition: ModelAlgo_BRepMesher.cxx:462
Provides CAD Exchanger data model.
Definition: ModelData_Model.hxx:40
Reads any format that CAD Exchanger can import.
Definition: ModelData_ModelReader.hxx:31
Writes any format that CAD Exchanger can export.
Definition: ModelData_ModelWriter.hxx:31
Defines classes, types, and global functions related to CAD Exchanger.
Definition: A3DSTestLib.hxx:22
Creates a meshing algorithm based on the Netgen library.
Definition: MeshAlgo_NetgenFactory.hxx:27
Defines classes, types, and global functions related to standard C++ library.
void SetGranularity(Granularity theVal)
Sets mesh granularity policy.
Definition: MeshAlgo_NetgenFactory.hxx:50