Exemplo n.º 1
0
            public static List <MaterialLib> ExtractMaterialData(IfcMaterialLayerSetUsage matusage)
            {
                List <MaterialLib> mats = new List <MaterialLib>();
                var layers = matusage.ForLayerSet.MaterialLayers;

                for (int i = 0; i < layers.Count; i++)
                {
                    var layer = layers[i];
                    var fmat  = new MaterialLib();
                    fmat.Name = layer.Material.Name;
                    fmat.Additional_Info.Add(new Data()
                    {
                        Name  = "Thickness",
                        Value = layer.LayerThickness.ToString()
                    });
                    List <Data> datas = new List <Data>();
                    layer.Material.HasProperties.ForEach(p =>
                    {
                        var dic = IfcConvert.ToIfcPropertyDic(p.Properties);
                        datas.AddRange(IfcData.ExtractProps(dic, fmat));
                    });
                }
                return(mats);
            }
Exemplo n.º 2
0
            static List <Data> ExtractData(IfcElement ifcele, Core model)
            {
                var props = ((IfcPropertySet)ifcele.IsDefinedBy.First().RelatingPropertyDefinition).HasProperties;

                return(IfcData.ExtractProps(props, model));
            }