public class mefisto {
static {
try {
System.loadLibrary("CadExCore");
System.loadLibrary("CadExMesh");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load.\n" + e);
System.exit(1);
}
}
public static void main(String[] args) {
String aKey = LicenseKey.Value();
if (!LicenseManager.Activate(aKey)) {
System.out.println("Failed to activate CAD Exchanger license.");
System.exit(1);
}
if (args.length != 1) {
System.out.println("Usage: " + " <input_file>, where:");
System.out.println(" <input_file> is a name of the XML file to be read");
System.exit(1);
}
String aSource = args[0];
ModelData_Model aModel = new ModelData_Model();
if (!new ModelData_ModelReader().Read(new Base_UTF16String(aSource), aModel)) {
System.out.println("Failed to read the file");
System.exit(1);
}
ModelAlgo_BRepMesherParameters aParam = new ModelAlgo_BRepMesherParameters();
MeshAlgo_MefistoFactory aMF = new MeshAlgo_MefistoFactory();
MeshAlgo_MefistoFactory.Parameters aP =
new MeshAlgo_MefistoFactory.Parameters(
-1. , -1. , 0.1 );
aMF.SetParameters(aP);
aParam.SetComputationalMeshAlgo(aMF);
ModelAlgo_BRepMesher aMesher = new ModelAlgo_BRepMesher(aParam);
aMesher.Compute(aModel, true );
if (!new ModelData_ModelWriter().Write(aModel, new Base_UTF16String("mefisto.cdx"))) {
System.out.println("Unable to save the model!");
System.exit(1);
}
}
}
Defines classes, types, and global functions related to CAD Exchanger.
Definition: A3DSTestLib.hxx:22