From 71b173a494e1c9ff381bee1439d62a7620459248 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 13 Dec 2013 10:41:22 +0000 Subject: [PATCH] IfcOpenHouse: Don't use a single opening element to create multiple openings --- src/examples/IfcOpenHouse.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/examples/IfcOpenHouse.cpp b/src/examples/IfcOpenHouse.cpp index 4dd28bc496..39db6a0c82 100644 --- a/src/examples/IfcOpenHouse.cpp +++ b/src/examples/IfcOpenHouse.cpp @@ -169,7 +169,12 @@ int main(int argc, char** argv) { // The west wall is assigned an opening element we created for the south wall, opening elements are // not shared accross building elements, even if they share the same representation. Hence, the east // wall will not feature this opening. - file.AddEntity(new Ifc2x3::IfcRelVoidsElement(guid(), file.getSingle(), null, null, west_wall, west_opening)); + // NB: an Opening Element can only be used to create a single void within a single Element, as per: + // http://www.buildingsmart-tech.org/ifc/IFC2x3/TC1/html/ifcproductextension/lexical/ifcfeatureelementsubtraction.htm + Ifc2x3::IfcOpeningElement* west_opening_copy = new Ifc2x3::IfcOpeningElement(guid(), file.getSingle(), + null, null, null, west_opening->ObjectPlacement(), west_opening->Representation(), null); + file.AddEntity(west_opening_copy); + file.AddEntity(new Ifc2x3::IfcRelVoidsElement(guid(), file.getSingle(), null, null, west_wall, west_opening_copy)); // Up until now we have only used simple extrusions for the creation of the geometry. For the // ground mesh of the IfcSite we will use a Nurbs surface created in Open Cascade. The surface