using System;
using System.Runtime.InteropServices;
namespace poly
{
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;
}
return 0;
}
{
ModelData_PointList aPoints1 = new ModelData_PointList();
ModelData_PointList aPoints2 = new ModelData_PointList();
for (int i = 0; i < 10; ++i)
{
}
return aPPS;
}
{
ModelData_PointList aPoints1 = new ModelData_PointList();
ModelData_PointList aPoints2 = new ModelData_PointList();
for (int i = 0; i < 10; ++i)
{
}
aPLS.AddPolyline(aPoints1);
aPLS.AddPolyline(aPoints2);
return aPLS;
}
{
ModelData_PointList aCoords = new ModelData_PointList
{
};
ModelData_IntList aVerticesIndices = new ModelData_IntList
{
0, 1, 2, 3,
1, 0, 4, 5,
2, 1, 5, 6,
3, 2, 6, 7,
0, 3, 7, 4,
7, 6, 5, 4
};
ModelData_IntList aCounts = new ModelData_IntList { 4, 4, 4, 4, 4, 4 };
ModelData_VectorfList aNormals = new ModelData_VectorfList
{
new ModelData_Vectorf ( 0f, 0f, 1f),
new ModelData_Vectorf ( 0f, 1f, 0f),
new ModelData_Vectorf (-1f, 0f, 0f),
new ModelData_Vectorf ( 0f, -1f, 0f),
new ModelData_Vectorf ( 1f, 0f, 0f),
new ModelData_Vectorf ( 0f, 0f, -1f),
};
ModelData_IntList aNormalsIndices = new ModelData_IntList
{
0, 0, 0, 0,
1, 1, 1, 1,
2, 2, 2, 2,
3, 3, 3, 3,
4, 4, 4, 4,
5, 5, 5, 5
};
ModelData_ColorList aColors = new ModelData_ColorList
{
};
ModelData_IntList aColorIndices = new ModelData_IntList
{
0, 0, 0, 0,
1, 1, 1, 1,
2, 2, 2, 2,
3, 3, 3, 3,
4, 4, 4, 4,
5, 5, 5, 5
};
anITS.
AddNormals(aNormals, aNormalsIndices, aCounts);
anITS.
AddColors(aColors, aColorIndices, aCounts);
return anITS;
}
}
}
Defines a Unicode (UTF-16) string wrapping a standard string.
Definition: Base_UTF16String.hxx:34
Defines an RGBA color (with alpha channel).
Definition: ModelData_Color.hxx:34
Defines a polygonal shape consisting of triangles.
Definition: ModelData_IndexedTriangleSet.hxx:35
void AddCoordinates(const CoordType theVertices[], size_t theVertexNb)
Adds vertex coordinates.
Definition: ModelData_IndexedTriangleSet.cxx:336
void AddNormals(const NormalType theNormals[], size_t theNormalNb, const IndexType theIndices[], size_t theIndexNb)
Adds vertex normals.
Definition: ModelData_IndexedTriangleSet.cxx:364
void AddColors(const ColorType theColors[], size_t theColorNb, const IndexType theIndices[], size_t theIndexNb)
Adds vertex colors.
Definition: ModelData_IndexedTriangleSet.cxx:382
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
void AddRepresentation(const ModelData_Representation &theRepresentation)
Adds a representation.
Definition: ModelData_Part.cxx:341
Defines a 3D point.
Definition: ModelData_Point.hxx:295
Defines a polygonal shape consisting of polylines.
Definition: ModelData_PolyLineSet.hxx:31
Defines a polygonal shape consisting of individual points.
Definition: ModelData_PolyPointSet.hxx:31
void Add(const CoordType *thePoints, size_t theSize)
Adds points into a point set.
Definition: ModelData_PolyPointSet.cxx:80
Defines polygonal (faceted or tessellated) representation of part.
Definition: ModelData_PolyRepresentation.hxx:39
Defines classes, types, and global functions related to CAD Exchanger.
Definition: A3DSTestLib.hxx:22