import java.util.*;
public class poly_projector {
static {
try {
System.loadLibrary("CadExMTK");
} 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 = MTKLicenseKey.Value();
if (!LicenseManager.Activate(aKey)) {
System.out.println("Failed to activate Manufacturing Toolkit 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 file to be read");
System.exit(1);
}
String aSource = args[0];
Model aModel = new Model();
ModelReader aReader = new ModelReader();
if (!aReader.Read(new UTF16String(aSource), aModel)) {
System.out.println("Failed to read the file " + aSource);
System.exit(1);
}
System.out.format("Model: %s\n\n", aModel.Name());
aModel.Accept(aProjector);
}
}
class ModelPolyProjector extends ModelElementVoidVisitor {
myDirection = theDirection;
}
@Override
public void Apply(Part thePart) {
Projector_PolyData aData = myProjector.Perform(thePart, myDirection);
System.out.println("Part projection [" + thePart.Name() + "] has:");
System.out.println(" area = " + aData.ProjectionArea() + " mm");
}
private Projector_PolyProjector myProjector = new Projector_PolyProjector();
}
Defines a 3D Direction.
Definition Direction.cs:17
Contains classes, types, enums, and functions related to geometric entities.
Definition Axis1d.cs:12
Defines classes, types, enums, and functions related to topological entities and scene graph elements...
Definition AngleUnit.cs:12
Contains classes, namespaces, enums, types, and global functions related to Manufacturing Toolkit.
Definition BaseObject.cs:12