Fix transformation in serialization element, accept geometry library in more geom functions

This commit is contained in:
Thomas Krijnen
2023-08-26 11:35:23 +02:00
parent 5336b2f987
commit 4bb3cc5c90
10 changed files with 67 additions and 35 deletions
@@ -2,6 +2,7 @@
#include "../../../ifcparse/IfcLogger.h"
#include "../../../ifcgeom/IfcGeomRepresentation.h"
#include "base_utils.h"
#include <TopoDS.hxx>
#include <Geom_SphericalSurface.hxx>
@@ -217,9 +218,10 @@ void ifcopenshell::geometry::OpenCascadeShape::Triangulate(const IfcGeom::Iterat
BRepTools::Clean(shape_);
}
void ifcopenshell::geometry::OpenCascadeShape::Serialize(std::string& r) const {
void ifcopenshell::geometry::OpenCascadeShape::Serialize(const ifcopenshell::geometry::taxonomy::matrix4& place, std::string& r) const {
auto s = IfcGeom::util::apply_transformation(shape_, place);
std::stringstream sstream;
BRepTools::Write(shape_, sstream);
BRepTools::Write(s, sstream);
r = sstream.str();
}