Enable retargeting of example schema

This commit is contained in:
Thomas Krijnen
2026-06-12 11:04:18 +02:00
parent 3136c74c2f
commit 4d22a3fdb9
14 changed files with 294 additions and 132 deletions
+13 -2
View File
@@ -27,8 +27,15 @@
#include <fstream>
#include <optional>
#include "ifcparse/macros.h"
#ifndef IfcSchema
#define IfcSchema Ifc4
#include "ifcparse/Ifc4.h"
#endif
#include INCLUDE_SCHEMA(ifcparse, IfcSchema)
#include INCLUDE_SCHEMA_DEFINITIONS(ifcparse, IfcSchema)
#include "ifcparse/IfcHierarchyHelper.h"
#include "suzanne_geometry.h"
@@ -69,7 +76,11 @@ int main(int argc, char** argv) {
std::vector< std::vector< double > > vertices_vector = create_vector_from_array(vertices, sizeof(vertices) / sizeof(vertices[0]));
std::vector< std::vector< int > > indices_vector = create_vector_from_array(indices, sizeof(indices) / sizeof(indices[0]));
IfcSchema::IfcCartesianPointList3D* coordinates = new IfcSchema::IfcCartesianPointList3D(vertices_vector);
IfcSchema::IfcCartesianPointList3D* coordinates = new IfcSchema::IfcCartesianPointList3D(vertices_vector
#ifdef SCHEMA_IfcCartesianPointList3D_HAS_TagList
, boost::none
#endif
);
IfcSchema::IfcTriangulatedFaceSet* faceset = new IfcSchema::IfcTriangulatedFaceSet(coordinates, null, null, indices_vector, null);
items->push(faceset);