Skip to content

Is there any way I can find the height of each layer of the wall? #4

@jojobs

Description

@jojobs

Hi All,

Is there anyway I can find the height of each layer of the wall?

Right now the code I am using is as follows:

IfcMaterialLayerSetUsage ifcMaterialLayerSetUsage = (IfcMaterialLayerSetUsage)ifcWall.GetMaterial();
                
                if (null != ifcMaterialLayerSetUsage)
                {
                    IfcMaterialLayerSet layerSet = ifcMaterialLayerSetUsage.ForLayerSet;
                    if (null != layerSet)
                    {
                        IItemSet<IfcMaterialLayer> lstMaterLayer = layerSet.MaterialLayers;


                        //If three layers, then it is external
                        if (null != lstMaterLayer)
                        {
                            int noOfLayers = lstMaterLayer.Count();
                            if (noOfLayers == 3)
                            {
                                var externalLayer = lstMaterLayer.First();
                                externalLayerThickness = externalLayer.LayerThickness;

                                var midLayer = lstMaterLayer.ElementAt(1);
                                cavityThickess = midLayer.LayerThickness;

                                var innerLayer = lstMaterLayer.ElementAt(2);
                                steelThickness = innerLayer.LayerThickness;
///**** doubt steelLayerHeight = innerLayer.????

                            }
                            //One layer assume it is steel, may be buggy but now this is an assumption
                            else
                            {
                                steelThickness = layerSet.TotalThickness;
                            }
                        }
                    }
                }

Best regards,
Jojo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions