From 88c8bcf119b6a6e362576cab626b916ca06d7160 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 19 Jun 2024 14:44:52 +0200 Subject: [PATCH] Pin OCCT serialization version to v2 #4393 --- .../opencascade/OpenCascadeConversionResult.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ifcgeom/kernels/opencascade/OpenCascadeConversionResult.cpp b/src/ifcgeom/kernels/opencascade/OpenCascadeConversionResult.cpp index 4e48a6ce72..1660f5928b 100644 --- a/src/ifcgeom/kernels/opencascade/OpenCascadeConversionResult.cpp +++ b/src/ifcgeom/kernels/opencascade/OpenCascadeConversionResult.cpp @@ -13,6 +13,12 @@ #include "base_utils.h" #include "boolean_utils.h" +#include + +#if OCC_VERSION_HEX >= 0x70600 +#include +#endif + using IfcGeom::OpaqueNumber; using IfcGeom::OpaqueCoordinate; using IfcGeom::NumberNativeDouble; @@ -242,7 +248,11 @@ void ifcopenshell::geometry::OpenCascadeShape::Triangulate(ifcopenshell::geometr 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; +#if OCC_VERSION_HEX >= 0x70600 + BRepTools::Write(s, sstream, false, false, TopTools_FormatVersion_VERSION_2); +#else BRepTools::Write(s, sstream); +#endif r = sstream.str(); }