Пример #1
0
        public new void AddMaterialLayer(XbimMaterial material, double thickness, bool isVentilated, XbimMaterialFunctionEnum function)
        {
            if (!CanHaveOwnGeometry) throw new Exception("Roof has decomposing elements so it can not have its own material layers specified");

            IfcMaterialLayer matLayer = _document.Model.Instances.New<IfcMaterialLayer>();
            matLayer.Material = material.Material;
            matLayer.LayerThickness = thickness;

            if (IfcMaterialLayerSetUsage == null)
            {
                IfcMaterialLayerSet matLayerSet = _document.Model.Instances.New<IfcMaterialLayerSet>();
                //create new material layer set and set its usage
                _ifcBuildingElement.SetMaterialLayerSetUsage(matLayerSet, IfcLayerSetDirectionEnum.AXIS1, IfcDirectionSenseEnum.POSITIVE, 0);
            }

            IfcMaterialLayerSet layerSet = IfcMaterialLayerSetUsage.ForLayerSet;
            layerSet.MaterialLayers.Add_Reversible(matLayer);
        }
Пример #2
0
        public void AddMaterialLayer(XbimMaterial material, double thickness, bool isVentilated, XbimMaterialFunctionEnum function)
        {

            IfcMaterialLayerSet materialLayerSet = _ifcBuildingElement.GetMaterial() as IfcMaterialLayerSet;
            if (materialLayerSet == null)
            {
                materialLayerSet = _document.Model.Instances.New<IfcMaterialLayerSet>(/*set => set.LayerSetName = _ifcTypeProduct.Name*/);
                _ifcBuildingElement.SetMaterial(materialLayerSet);
            }
            IfcMaterialLayer matLayer = _document.Model.Instances.New<IfcMaterialLayer>();
            matLayer.LayerThickness = thickness;
            matLayer.Material = material;
            matLayer.IsVentilated = isVentilated;
            materialLayerSet.MaterialLayers.Add_Reversible(matLayer);

            int materialIndex = materialLayerSet.MaterialLayers.IndexOf(matLayer);
            if (materialIndex < 0) return; //check if material exists in the material layer set
            _ifcBuildingElement.SetPropertyTableItemValue("xbim_MaterialFunctionAssignment", "MaterialFunctionAssignment", (IfcInteger)materialIndex, (IfcLabel)Enum.GetName(typeof(XbimMaterialFunctionEnum), function));
      

        }
Пример #3
0
 public void SetMaterialFunction(XbimMaterial material, XbimMaterialFunctionEnum function)
 {
     IfcBuildingElement.SetPropertyTableItemValue("xbim_MaterialFunctionAssignment", "MaterialFunctionAssignment", (IfcLabel)material.Name, (IfcLabel)Enum.GetName(typeof(XbimMaterialFunctionEnum), function));
 }