Restructure and rename

This commit is contained in:
Thomas Krijnen
2026-03-31 15:32:36 +02:00
parent 724cdb446e
commit a07f56db6f
237 changed files with 72532 additions and 72535 deletions
+11 -11
View File
@@ -6,13 +6,13 @@
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include "../../ifcparse/IfcFile.h"
#include "../../ifcparse/file.h"
#define EXTERNAL_DEFS_1(r, data, elem) \
express::Base BOOST_PP_CAT(tesselate_Ifc, elem)(IfcParse::IfcFile&, const TopoDS_Shape& shape, double deflection);
express::Base BOOST_PP_CAT(tesselate_Ifc, elem)(ifcopenshell::file&, const TopoDS_Shape& shape, double deflection);
#define EXTERNAL_DEFS_2(r, data, elem) \
express::Base BOOST_PP_CAT(serialise_Ifc, elem)(IfcParse::IfcFile&, const TopoDS_Shape& shape, bool advanced);
express::Base BOOST_PP_CAT(serialise_Ifc, elem)(ifcopenshell::file&, const TopoDS_Shape& shape, bool advanced);
#define CONDITIONAL_CALL(r, data, elem) \
if (schema_name_lower == BOOST_PP_STRINGIZE(BOOST_PP_CAT(elem,))) { \
@@ -24,36 +24,36 @@ BOOST_PP_SEQ_FOR_EACH(EXTERNAL_DEFS_2, , SCHEMA_SEQ);
#define METHOD_NAME tesselate_Ifc
express::Base IfcGeom::tesselate(IfcParse::IfcFile& f, const TopoDS_Shape& shape, double arg_2) {
express::Base IfcGeom::tesselate(ifcopenshell::file& f, const TopoDS_Shape& shape, double arg_2) {
auto schema_name = f.schema()->name();
// @todo an ugly hack to guarantee schemas are initialised.
// @todo is this still needed? parsing a file should have initialized the schemas already.
try {
IfcParse::schema_by_name("IFC2X3");
} catch (IfcParse::IfcException&) {}
ifcopenshell::schema_by_name("IFC2X3");
} catch (ifcopenshell::exception&) {}
const std::string schema_name_lower = boost::to_lower_copy(schema_name.substr(3));
BOOST_PP_SEQ_FOR_EACH(CONDITIONAL_CALL, , SCHEMA_SEQ);
throw IfcParse::IfcException("No geometry serialization available for " + schema_name);
throw ifcopenshell::exception("No geometry serialization available for " + schema_name);
}
#undef METHOD_NAME
#define METHOD_NAME serialise_Ifc
express::Base IfcGeom::serialise(IfcParse::IfcFile& f, const TopoDS_Shape& shape, bool arg_2) {
express::Base IfcGeom::serialise(ifcopenshell::file& f, const TopoDS_Shape& shape, bool arg_2) {
auto schema_name = f.schema()->name();
// @todo an ugly hack to guarantee schemas are initialised.
try {
IfcParse::schema_by_name("IFC2X3");
} catch (IfcParse::IfcException&) {}
ifcopenshell::schema_by_name("IFC2X3");
} catch (ifcopenshell::exception&) {}
const std::string schema_name_lower = boost::to_lower_copy(schema_name.substr(3));
BOOST_PP_SEQ_FOR_EACH(CONDITIONAL_CALL, , SCHEMA_SEQ);
throw IfcParse::IfcException("No geometry serialization available for " + schema_name);
throw ifcopenshell::exception("No geometry serialization available for " + schema_name);
}