Refer to the Mefisto Mesher Example.
#include <cadex/LicenseManager_Activate.h>
#include <cadex/MeshAlgo_MefistoFactory.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;
}
-1. ,
-1. ,
0.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_MefistoFactory.cxx:53
Defines parameters used by the Mefisto meshing algorithm.
Definition: MeshAlgo_MefistoFactory.hxx:49
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
Creates an instance of the Mefisto meshing algorithm.
Definition: MeshAlgo_MefistoFactory.hxx:26
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
Defines classes, types, and global functions related to standard C++ library.