Make occt optional

This commit is contained in:
Thomas Krijnen
2023-03-22 11:17:14 +01:00
parent cb35378a73
commit 2b1b79bf1c
28 changed files with 187 additions and 134 deletions
+8
View File
@@ -73,6 +73,8 @@
%include "../serializers/XmlSerializer.h"
%include "../serializers/GltfSerializer.h"
#ifdef IFOPSH_WITH_OPENCASCADE
%template(ray_intersection_results) std::vector<IfcGeom::ray_intersection_result>;
// A Template instantantation should be defined before it is used as a base class.
@@ -138,6 +140,8 @@
}
#endif
// A visitor
%{
struct ShapeRTTI : public boost::static_visitor<PyObject*>
@@ -551,6 +555,8 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
}
%}
#ifdef IFOPSH_WITH_OPENCASCADE
%inline %{
IfcUtil::IfcBaseClass* serialise(const std::string& schema_name, const std::string& shape_str, bool advanced=true) {
std::stringstream stream(shape_str);
@@ -571,6 +577,8 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
}
%}
#endif
%ignore svgfill::svg_to_line_segments;
%ignore svgfill::line_segments_to_polygons;
+8 -4
View File
@@ -80,9 +80,13 @@
%{
#include "../ifcgeom/Iterator.h"
#include "../ifcgeom/taxonomy.h"
#ifdef IFOPSH_WITH_OPENCASCADE
#include "../ifcgeom/Serialization/Serialization.h"
#include "../ifcgeom/kernels/opencascade/IfcGeomTree.h"
#include <BRepTools_ShapeSet.hxx>
#endif
#include "../serializers/SvgSerializer.h"
#include "../serializers/WavefrontObjSerializer.h"
#include "../serializers/HdfSerializer.h"
@@ -121,8 +125,6 @@
#include "../ifcparse/utils.h"
#include "../svgfill/src/svgfill.h"
#include <BRepTools_ShapeSet.hxx>
%}
// Create docstrings for generated python code.
@@ -137,8 +139,12 @@
%module ifcopenshell_wrapper %{
#include "../ifcgeom/Converter.h"
#include "../ifcgeom/taxonomy.h"
#ifdef IFOPSH_WITH_OPENCASCADE
#include "../ifcgeom/Serialization/Serialization.h"
#include "../ifcgeom/kernels/opencascade/IfcGeomTree.h"
#include <BRepTools_ShapeSet.hxx>
#endif
#include "../ifcgeom/Iterator.h"
#include "../serializers/SvgSerializer.h"
@@ -181,8 +187,6 @@
#include "../ifcparse/utils.h"
#include "../svgfill/src/svgfill.h"
#include <BRepTools_ShapeSet.hxx>
%}
%include "IfcGeomWrapper.i"