From 2859c1ef176a74ce943b42416696fd02aef115fd Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 8 Aug 2026 14:21:10 +0200 Subject: [PATCH] Use value serialization in sphere example Update the stale pointer-form example and pass the IFC file required by the current serialization API. Generated with the assistance of an AI coding tool. --- src/examples/IfcAdvancedHouse.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/examples/IfcAdvancedHouse.cpp b/src/examples/IfcAdvancedHouse.cpp index 7e5580afea..20aae0fc7c 100644 --- a/src/examples/IfcAdvancedHouse.cpp +++ b/src/examples/IfcAdvancedHouse.cpp @@ -131,13 +131,13 @@ int main() { setSurfaceColour(file, ground_representation.as(), 0.15, 0.25, 0.05); /* - // Note that IFC lacks elementary surfaces that STEP does have, such as spherical_surface. - // BRepBuilderAPI_NurbsConvert can be used to serialize such surfaces as nurbs surfaces. + // Note that IFC lacks elementary surfaces that STEP does have, such as spherical_surface. + // BRepBuilderAPI_NurbsConvert can be used to serialize such surfaces as nurbs surfaces. TopoDS_Shape sphere = BRepPrimAPI_MakeSphere(gp_Pnt(), 1000.).Shape(); - IfcSchema::IfcProductDefinitionShape* sphere_representation = ifcopenshell::geom::serialise(sphere, true); + auto sphere_representation = ifcopenshell::geom::serialise(file, sphere, true); if (S(IfcSchema::Identifier) == "IFC4") { sphere = BRepBuilderAPI_NurbsConvert(sphere, true).Shape(); - sphere_representation = ifcopenshell::geom::serialise(sphere, true); + sphere_representation = ifcopenshell::geom::serialise(file, sphere, true); } */