From 183f752d7f84399c4004bb56a51da510eac62e83 Mon Sep 17 00:00:00 2001 From: kovacsv Date: Sat, 26 Jun 2021 23:57:10 +0200 Subject: [PATCH] Use property groups. --- source/external/ifcimporter.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/external/ifcimporter.js b/source/external/ifcimporter.js index bdde408..25cbcd7 100644 --- a/source/external/ifcimporter.js +++ b/source/external/ifcimporter.js @@ -134,10 +134,7 @@ OV.ImporterIfc = class extends OV.ImporterBase } let propSetDef = rel.RelatingPropertyDefinition; let propSet = obj.ifc.GetLine (modelID, propSetDef.value, true); - // TODO: same property can exist in different sets - if (!propSet.Name.value.endsWith ('Common')) { - return; - } + let propertyGroup = new OV.PropertyGroup (propSet.Name.value); propSet.HasProperties.forEach (function (property) { let meshProperty = null; if (property.NominalValue.label === 'IFCLABEL' || property.NominalValue.label === 'IFCIDENTIFIER') { @@ -147,9 +144,12 @@ OV.ImporterIfc = class extends OV.ImporterBase meshProperty = new OV.Property (OV.PropertyType.Text, property.Name.value, property.NominalValue.value === 'T' ? 'Yes' : 'No'); } if (meshProperty !== null) { - foundMesh.AddProperty (meshProperty); + propertyGroup.AddProperty (meshProperty); } }); + if (propertyGroup.PropertyCount () > 0) { + foundMesh.AddPropertyGroup (propertyGroup); + } }); } }