Work on serialization

This commit is contained in:
Thomas Krijnen
2017-12-22 17:37:58 +01:00
parent ddde7bc367
commit 24b46c1f43
6 changed files with 53 additions and 13 deletions
+6 -8
View File
@@ -439,27 +439,25 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
}
%}
/*
%inline %{
IfcUtil::IfcBaseClass* serialise(const std::string& s, bool advanced=true) {
std::stringstream stream(s);
IfcUtil::IfcBaseClass* serialise(const std::string& schema_name, const std::string& shape_str, bool advanced=true) {
std::stringstream stream(shape_str);
BRepTools_ShapeSet shapes;
shapes.Read(stream);
const TopoDS_Shape& shp = shapes.Shape(shapes.NbShapes());
return IfcGeom::serialise(shp, advanced);
return IfcGeom::serialise(schema_name, shp, advanced);
}
IfcUtil::IfcBaseClass* tesselate(const std::string& s, double d) {
std::stringstream stream(s);
IfcUtil::IfcBaseClass* tesselate(const std::string& schema_name, const std::string& shape_str, double d) {
std::stringstream stream(shape_str);
BRepTools_ShapeSet shapes;
shapes.Read(stream);
const TopoDS_Shape& shp = shapes.Shape(shapes.NbShapes());
return IfcGeom::tesselate(shp, d);
return IfcGeom::tesselate(schema_name, shp, d);
}
%}
*/
namespace IfcGeom {
%template(iterator_single_precision) Iterator<float>;
+2 -1
View File
@@ -71,8 +71,9 @@
%module ifcopenshell_wrapper %{
#include "../ifcgeom_schema_agnostic/IfcGeomIterator.h"
#include "../ifcgeom_schema_agnostic/Serialization.h"
#include "../ifcgeom/IfcGeomTree.h"
#include "../ifcparse/Ifc2x3.h"
#include "../ifcparse/Ifc4.h"
#include "../ifcparse/IfcBaseClass.h"