From 3dbc1fddcbea6dd692986c9ef181affa082d3a8b Mon Sep 17 00:00:00 2001 From: Osyotr Date: Tue, 12 Aug 2025 16:12:07 +0300 Subject: [PATCH] Fix IfcGeom build without OpenCascade (#7007) --- src/ifcgeom/IfcGeomRepresentation.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomRepresentation.cpp b/src/ifcgeom/IfcGeomRepresentation.cpp index 5de3ac00b6..822ce05feb 100644 --- a/src/ifcgeom/IfcGeomRepresentation.cpp +++ b/src/ifcgeom/IfcGeomRepresentation.cpp @@ -170,12 +170,15 @@ IfcGeom::Representation::Serialization::Serialization(const BRep& brep) } if (brep.begin() != brep.end()) { +#ifdef IFOPSH_WITH_OPENCASCADE if (std::dynamic_pointer_cast(brep.begin()->Shape())) { ConversionResultShape* shape = brep.as_compound(); ifcopenshell::geometry::taxonomy::matrix4 identity; shape->Serialize(identity, brep_data_); delete shape; - } else { + } else +#endif + { for (auto it = brep.begin(); it != brep.end(); ++it) { std::string part; it->Shape()->Serialize(*it->Placement(), part);