using System;
using System.Runtime.InteropServices;
namespace validationproperties
{
class Program
{
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
static extern bool SetDllDirectory(string lpPathName);
static int Main(string[] args)
{
SetDllDirectory("../../../../../../win64/vc14.1/bin");
string aKey = LicenseKey.Value();
if (!LicenseManager.Activate(aKey))
{
Console.WriteLine("Failed to activate CAD Exchanger license.");
return 1;
}
Console.WriteLine("Surface area: " + aSurfaceArea);
Console.WriteLine("Volume: " + aVolume);
Console.WriteLine("Centroid: (" + aCentroid.X() + ", " + aCentroid.Y() + ", " + aCentroid.Z() + ")");
Console.WriteLine(
"Bounding Box: (" + aBBox.
XRange() +
", " + aBBox.
YRange() +
", " + aBBox.
ZRange() +
")");
return 0;
}
}
}
Computes bounding box of the objects.
Definition: ModelAlgo_BoundingBox.hxx:37
static void Compute(const ModelData_Model &theSG, ModelData_Box &theBox, bool theForcedFlush=true)
Returns a bounding box of a scene graph.
Definition: ModelAlgo_BoundingBox.cxx:346
Creates B-Rep solid primitives.
Definition: ModelAlgo_TopoPrimitives.hxx:43
static ModelData_Solid CreateCylinder(double theRadius, double theHeight, double theAngle=2 *M_PI)
Creates a cylinder.
Definition: ModelAlgo_TopoPrimitives.cxx:196
Computes validation properties of the objects.
Definition: ModelAlgo_ValidationProperty.hxx:35
static void ComputeCentroid(const ModelData_Model &theModel, ModelData_Point &theValue)
Returns a center of mass of a scene graph.
Definition: ModelAlgo_ValidationProperty.cxx:450
static double ComputeSurfaceArea(const ModelData_Model &theModel, bool theUseProperty=false, bool theStoreProperty=false)
Returns a surface area of a scene graph.
Definition: ModelAlgo_ValidationProperty.cxx:362
static double ComputeVolume(const ModelData_Model &theModel, bool theUseProperty=false, bool theStoreProperty=false)
Returns a volume of a scene graph.
Definition: ModelAlgo_ValidationProperty.cxx:402
Defines precise Boundary Representation of part.
Definition: ModelData_BRepRepresentation.hxx:39
Defines a 3D axis-aligned bounding box.
Definition: ModelData_Box.hxx:31
double ZRange() const
Returns the length of range along Z axis.
Definition: ModelData_Box.hxx:91
double YRange() const
Returns the length of range along Y axis.
Definition: ModelData_Box.hxx:89
double XRange() const
Returns the length of range along X axis.
Definition: ModelData_Box.hxx:87
Defines a 3D point.
Definition: ModelData_Point.hxx:295
Defines a topological solid.
Definition: ModelData_Solid.hxx:31
Defines classes, types, and global functions related to CAD Exchanger.
Definition: A3DSTestLib.hxx:22