#include <cadex/Base_String.hxx>
#include <cadex/LicenseManager_Activate.h>
#include <cadex/ModelData_Color.hxx>
#include <cadex/ModelData_IndexedTriangleSet.hxx>
#include <cadex/ModelData_Point2d.hxx>
#include <cadex/ModelData_PolyLineSet.hxx>
#include <cadex/ModelData_PolyPointSet.hxx>
#include <cadex/ModelData_PolyRepresentation.hxx>
#include <cadex/ModelData_Vector.hxx>
#include <array>
#include <iostream>
#include <vector>
#include "../../cadex_license.cxx"
{
vector<ModelData_Point> aPoints1, aPoints2;
for (int i = 0; i < 10; ++i) {
}
aPPS.
Add (aPoints1.data(), aPoints1.size());
aPPS.
Add (aPoints2.data(), aPoints2.size());
return aPPS;
}
{
vector<ModelData_Point> aPoints1, aPoints2;
for (int i = 0; i < 10; ++i) {
}
return aPLS;
}
{
array<ModelData_Point, 8> aCoords = {{
}};
array<int, 24> aVerticesIndices = {{
0, 1, 2, 3,
1, 0, 4, 5,
2, 1, 5, 6,
3, 2, 6, 7,
0, 3, 7, 4,
7, 6, 5, 4,
}};
array<int, 6> aCounts = {{4, 4, 4, 4, 4, 4}};
array<ModelData_Vectorf, 6> aNormals = {{
ModelData_Vectorf ( 0.f, 0.f, 1.f),
ModelData_Vectorf ( 0.f, 1.f, 0.f),
ModelData_Vectorf (-1.f, 0.f, 0.f),
ModelData_Vectorf ( 0.f, -1.f, 0.f),
ModelData_Vectorf ( 1.f, 0.f, 0.f),
ModelData_Vectorf ( 0.f, 0.f, -1.f),
}};
array<int, 24> aNormalsIndices = {{
0, 0, 0, 0,
1, 1, 1, 1,
2, 2, 2, 2,
3, 3, 3, 3,
4, 4, 4, 4,
5, 5, 5, 5,
}};
array<ModelData_Color, 6> aColors = {{
}};
array<int, 24> aColorsIndices = {{
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.
AddCoordinates (aCoords.data(), aCoords.size(), aVerticesIndices.data(), aCounts.data(), aCounts.size());
anITS.
AddNormals (aNormals.data(), aNormals.size(), aNormalsIndices.data(), aCounts.data(), aCounts.size());
anITS.
AddColors (aColors.data(), aColors.size(), aColorsIndices.data(), aCounts.data(), aCounts.size());
return anITS;
}
int main()
{
auto aKey = LicenseKey::Value();
if (!CADExLicense_Activate (aKey)) {
cerr << "Failed to activate CAD Exchanger license." << endl;
return 1;
}
aModel.
Save (
"Poly.xml");
return 0;
}