mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 14:33:28 +00:00
Hacky solution to disable schemas to speedup compilation
This commit is contained in:
@@ -472,21 +472,39 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
|
||||
%inline %{
|
||||
static boost::variant<IfcGeom::Element<double>*, IfcGeom::Representation::Representation*> create_shape(IfcGeom::IteratorSettings& settings, IfcUtil::IfcBaseClass* instance, IfcUtil::IfcBaseClass* representation = 0) {
|
||||
const std::string& schema_name = instance->declaration().schema()->name();
|
||||
|
||||
#ifdef HAS_SCHEMA_2x3
|
||||
if (schema_name == "IFC2X3") {
|
||||
return helper_fn_create_shape<Ifc2x3>(settings, instance, representation);
|
||||
} else if (schema_name == "IFC4") {
|
||||
return helper_fn_create_shape<Ifc4>(settings, instance, representation);
|
||||
} else if (schema_name == "IFC4X1") {
|
||||
return helper_fn_create_shape<Ifc4x1>(settings, instance, representation);
|
||||
} else if (schema_name == "IFC4X2") {
|
||||
return helper_fn_create_shape<Ifc4x2>(settings, instance, representation);
|
||||
} else if (schema_name == "IFC4X3_RC1") {
|
||||
return helper_fn_create_shape<Ifc4x3_rc1>(settings, instance, representation);
|
||||
} else if (schema_name == "IFC4X3_RC2") {
|
||||
return helper_fn_create_shape<Ifc4x3_rc2>(settings, instance, representation);
|
||||
} else {
|
||||
throw IfcParse::IfcException("No geometry support for " + schema_name);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4
|
||||
if (schema_name == "IFC4") {
|
||||
return helper_fn_create_shape<Ifc4>(settings, instance, representation);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x1
|
||||
if (schema_name == "IFC4X1") {
|
||||
return helper_fn_create_shape<Ifc4x1>(settings, instance, representation);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x2
|
||||
if (schema_name == "IFC4X2") {
|
||||
return helper_fn_create_shape<Ifc4x2>(settings, instance, representation);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_rc1
|
||||
if (schema_name == "IFC4X3_RC1") {
|
||||
return helper_fn_create_shape<Ifc4x3_rc1>(settings, instance, representation);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_rc2
|
||||
if (schema_name == "IFC4X3_RC2") {
|
||||
return helper_fn_create_shape<Ifc4x3_rc2>(settings, instance, representation);
|
||||
}
|
||||
#endif
|
||||
|
||||
throw IfcParse::IfcException("No geometry support for " + schema_name);
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
@@ -78,12 +78,25 @@
|
||||
#include "../ifcgeom_schema_agnostic/Serialization.h"
|
||||
#include "../ifcgeom/IfcGeomTree.h"
|
||||
|
||||
#ifdef HAS_SCHEMA_2x3
|
||||
#include "../ifcparse/Ifc2x3.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4
|
||||
#include "../ifcparse/Ifc4.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x1
|
||||
#include "../ifcparse/Ifc4x1.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x2
|
||||
#include "../ifcparse/Ifc4x2.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_rc1
|
||||
#include "../ifcparse/Ifc4x3_rc1.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_rc2
|
||||
#include "../ifcparse/Ifc4x3_rc2.h"
|
||||
#endif
|
||||
|
||||
#include "../ifcparse/IfcBaseClass.h"
|
||||
#include "../ifcparse/IfcFile.h"
|
||||
#include "../ifcparse/IfcSchema.h"
|
||||
@@ -106,12 +119,25 @@
|
||||
#include "../ifcgeom_schema_agnostic/Serialization.h"
|
||||
#include "../ifcgeom/IfcGeomTree.h"
|
||||
|
||||
#ifdef HAS_SCHEMA_2x3
|
||||
#include "../ifcparse/Ifc2x3.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4
|
||||
#include "../ifcparse/Ifc4.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x1
|
||||
#include "../ifcparse/Ifc4x1.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x2
|
||||
#include "../ifcparse/Ifc4x2.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_rc1
|
||||
#include "../ifcparse/Ifc4x3_rc1.h"
|
||||
#endif
|
||||
#ifdef HAS_SCHEMA_4x3_rc2
|
||||
#include "../ifcparse/Ifc4x3_rc2.h"
|
||||
#endif
|
||||
|
||||
#include "../ifcparse/IfcBaseClass.h"
|
||||
#include "../ifcparse/IfcFile.h"
|
||||
#include "../ifcparse/IfcSchema.h"
|
||||
|
||||
Reference in New Issue
Block a user