using System;
using System.Runtime.InteropServices;
namespace brepprimitives
{
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("Unable to save the model!");
return 1;
}
return 0;
}
{
}
double Dx,
double Dy,
double Dz,
{
AttachPrimitiveToModel("Box", aBox, theModel);
}
double theRadius,
{
AttachPrimitiveToModel("Sphere", aSphere, theModel);
}
{
AttachPrimitiveToModel("Cylinder", aCylinder, theModel);
}
{
AttachPrimitiveToModel("Cone", aCone, theModel);
}
{
AttachPrimitiveToModel("Torus", aTorus, theModel);
}
}
}
Defines a Unicode (UTF-16) string wrapping a standard string.
Definition: Base_UTF16String.hxx:34
Creates B-Rep solid primitives.
Definition: ModelAlgo_TopoPrimitives.hxx:43
static ModelData_Solid CreateSphere(double theRadius, double theU=2 *M_PI, double theVmin=-M_PI_2, double theVmax=M_PI_2)
Creates a sphere.
Definition: ModelAlgo_TopoPrimitives.cxx:148
static ModelData_Solid CreateBox(double theDx, double theDy, double theDz)
Creates a box.
Definition: ModelAlgo_TopoPrimitives.cxx:86
static ModelData_Solid CreateCone(double theRadius1, double theRadius2, double theHeight, double theAngle=2 *M_PI)
Creates a cone.
Definition: ModelAlgo_TopoPrimitives.cxx:228
static ModelData_Solid CreateTorus(double theRadius1, double theRadius2, double theU=2 *M_PI, double theVmin=0., double theVmax=2 *M_PI)
Creates a torus.
Definition: ModelAlgo_TopoPrimitives.cxx:265
static ModelData_Solid CreateCylinder(double theRadius, double theHeight, double theAngle=2 *M_PI)
Creates a cylinder.
Definition: ModelAlgo_TopoPrimitives.cxx:196
Defines a right-hand axis placement in 3D.
Definition: ModelData_Axis2Placement.hxx:38
Defines precise Boundary Representation of part.
Definition: ModelData_BRepRepresentation.hxx:39
Defines a 3D direction.
Definition: ModelData_Direction.hxx:180
Provides CAD Exchanger data model.
Definition: ModelData_Model.hxx:43
const ModelData_SceneGraphElement & AddRoot(const ModelData_SceneGraphElement &theElement)
Adds new root element into the scene graph.
Definition: ModelData_Model.cxx:830
Writes any format that CAD Exchanger can export.
Definition: ModelData_ModelWriter.hxx:33
bool Write(const ModelData_Model &theModel, const Base_UTF16String &theFilePath)
Writes the specified model to the file at the specified path.
Definition: ModelData_ModelWriter.cxx:143
Defines a leaf node in the scene graph hiearchy.
Definition: ModelData_Part.hxx:35
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