mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
Make occt optional
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user