Esempio n. 1
0
        public void AssociateTo(BbElement element)
        {
            if (IfcRelAssociatesMaterial == null)
            {
                IfcRelAssociatesMaterial = new IfcRelAssociatesMaterial
                {
                    GlobalId = IfcGloballyUniqueId.NewGuid(),
                    OwnerHistory = BbHeaderSetting.Setting3D.IfcOwnerHistory,
                    RelatingMaterial = new IfcMaterialSelect(),
                    RelatedObjects = new List<IfcRoot>(),
                };
                IfcRelAssociatesMaterial.RelatingMaterial.Value = IfcMaterial;
            }

            if (elements == null)
            {
                elements = new List<BbElement>();
            }

            elements.Add(element);
            IfcRelAssociatesMaterial.RelatedObjects.Add(element.IfcObject);

            AssignTo(element);
        }