ETABSProperty2D Property2DToSpeckle(string area, string property)
        {
            eAreaDesignOrientation areaDesignOrientation = eAreaDesignOrientation.Null;

            Model.AreaObj.GetDesignOrientation(area, ref areaDesignOrientation);
            eDeckType     deckType     = eDeckType.Filled;
            eSlabType     slabType     = eSlabType.Drop;
            eWallPropType wallPropType = eWallPropType.Specified;
            eShellType    shellType    = eShellType.Layered;
            string        matProp      = "";
            double        thickness    = 0;
            int           color        = 0;
            string        notes        = "";
            string        GUID         = "";

            switch (areaDesignOrientation)
            {
            case eAreaDesignOrientation.Wall:
                return(WallPropertyToSpeckle(property));

                break;

            case eAreaDesignOrientation.Floor:
                return(FloorPropertyToSpeckle(property));

                break;
            }

            double[] value = null;

            return(null);
        }
예제 #2
0
 internal Slab_Section(string secName, string secMat, double Th, Shell_Stiffness_Modifier sSM, eSlabType slabType, eShellType shellType)
 {
     SecName   = secName;
     SecMat    = secMat;
     H         = Th;
     SSM       = sSM;
     SlabType  = slabType;
     ShellType = shellType;
 }
예제 #3
0
 public void SetSlab(string name,
                     double thickness,
                     eSlabType slabType,
                     eShellType shellType,
                     string nameMaterial,
                     int color    = -1,
                     string notes = "",
                     string GUID  = "")
 {
 }
예제 #4
0
 public void GetSlab(string name,
                     ref double thickness,
                     ref eSlabType slabType,
                     ref eShellType shellType,
                     ref string nameMaterial,
                     ref int color,
                     ref string notes,
                     ref string GUID)
 {
 }
예제 #5
0
        GetSlab(this cPropArea obj, string Name)
        {
            eSlabType SlabType;

            SlabType = default(eSlabType);
            eShellType ShellType;

            ShellType = default(eShellType);
            string MatProp, notes, GUID;

            MatProp = notes = GUID = default(string);
            double Thickness;

            Thickness = default(double);
            int color;

            color = default(int);
            var res = obj.GetSlab(Name, ref SlabType, ref ShellType, ref MatProp, ref Thickness, ref color, ref notes, ref GUID);

            return(SlabType, ShellType, MatProp, Thickness, color, notes, GUID);
        }
예제 #6
0
        /***************************************************/
        /***    Read Methods                             ***/
        /***************************************************/

        private List <ISurfaceProperty> ReadSurfaceProperty(List <string> ids = null)
        {
            List <ISurfaceProperty> propertyList = new List <ISurfaceProperty>();

            Dictionary <string, IMaterialFragment> bhomMaterials = ReadMaterial().ToDictionary(x => GetAdapterId <string>(x));

            int nameCount = 0;

            string[] nameArr = { };
            m_model.PropArea.GetNameList(ref nameCount, ref nameArr);

            ids = FilterIds(ids, nameArr);

            foreach (string id in ids)
            {
                eSlabType     slabType        = eSlabType.Slab;
                eShellType    shellType       = eShellType.ShellThin;
                eWallPropType wallType        = eWallPropType.Specified;
                string        material        = "";
                double        thickness       = 0;
                int           colour          = 0;
                string        notes           = "";
                string        guid            = null;
                double        depth           = 0;
                double        stemWidthTop    = 0;
                double        stemWidthBottom = 0;//not used
                double        ribSpacing      = 0;
                double        ribSpacing2nd   = 0;
                int           direction       = 0;
                double[]      modifiers       = new double[] { };


                int ret = m_model.PropArea.GetSlab(id, ref slabType, ref shellType, ref material, ref thickness, ref colour, ref notes, ref guid);
                if (ret != 0)
                {
                    m_model.PropArea.GetWall(id, ref wallType, ref shellType, ref material, ref thickness, ref colour, ref notes, ref guid);
                }

                SurfacePropertyModifier modifier = null;
                if (m_model.PropArea.GetModifiers(id, ref modifiers) == 0 && modifiers != null && modifiers.Length == 10 && modifiers.Any(x => x != 1))
                {
                    modifier = new SurfacePropertyModifier
                    {
                        FXX    = modifiers[0],
                        FYY    = modifiers[1],
                        FXY    = modifiers[2],
                        MXX    = modifiers[3],
                        MYY    = modifiers[4],
                        MXY    = modifiers[5],
                        VXZ    = modifiers[6],
                        VYZ    = modifiers[7],
                        Mass   = modifiers[8],
                        Weight = modifiers[9]
                    };
                }

                IMaterialFragment bhMaterial = null;

                try
                {
                    bhMaterial = bhomMaterials[material];
                }
                catch (Exception)
                {
                    Engine.Base.Compute.RecordNote("Could not get material from ETABS. Material for surface property " + id + " will be null");
                }

                if (wallType == eWallPropType.AutoSelectList)
                {
                    string[] propList        = null;
                    string   currentProperty = "";

                    m_model.PropArea.GetWallAutoSelectList(id, ref propList, ref currentProperty);
                    m_model.PropArea.GetWall(currentProperty, ref wallType, ref shellType, ref material, ref thickness, ref colour, ref notes, ref guid);

                    ConstantThickness panelConstant = new ConstantThickness();
                    panelConstant.Name      = currentProperty;
                    panelConstant.Material  = bhMaterial;
                    panelConstant.Thickness = thickness;
                    panelConstant.PanelType = PanelType.Wall;
                    SetShellType(panelConstant, shellType);
                    if (modifier != null)
                    {
                        panelConstant.Fragments.Add(modifier);
                    }

                    SetAdapterId(panelConstant, id);
                    propertyList.Add(panelConstant);
                }
                else
                {
                    switch (slabType)
                    {
                    case eSlabType.Ribbed:
                        Ribbed panelRibbed = new Ribbed();

                        m_model.PropArea.GetSlabRibbed(id, ref depth, ref thickness, ref stemWidthTop, ref stemWidthBottom, ref ribSpacing, ref direction);
                        panelRibbed.Name       = id;
                        panelRibbed.Material   = bhMaterial;
                        panelRibbed.Thickness  = thickness;
                        panelRibbed.PanelType  = PanelType.Slab;
                        panelRibbed.Direction  = (PanelDirection)direction;
                        panelRibbed.Spacing    = ribSpacing;
                        panelRibbed.StemWidth  = stemWidthTop;
                        panelRibbed.TotalDepth = depth;
                        SetShellType(panelRibbed, shellType);
                        if (modifier != null)
                        {
                            panelRibbed.Fragments.Add(modifier);
                        }

                        SetAdapterId(panelRibbed, id);
                        propertyList.Add(panelRibbed);
                        break;

                    case eSlabType.Waffle:
                        Waffle panelWaffle = new Waffle();

                        m_model.PropArea.GetSlabWaffle(id, ref depth, ref thickness, ref stemWidthTop, ref stemWidthBottom, ref ribSpacing, ref ribSpacing2nd);
                        panelWaffle.Name        = id;
                        panelWaffle.Material    = bhMaterial;
                        panelWaffle.SpacingX    = ribSpacing;
                        panelWaffle.SpacingY    = ribSpacing2nd;
                        panelWaffle.StemWidthX  = stemWidthTop;
                        panelWaffle.StemWidthY  = stemWidthTop;    //ETABS does not appear to support direction dependent stem width
                        panelWaffle.Thickness   = thickness;
                        panelWaffle.TotalDepthX = depth;
                        panelWaffle.TotalDepthY = depth;     // ETABS does not appear to to support direction dependent depth
                        panelWaffle.PanelType   = PanelType.Slab;
                        SetShellType(panelWaffle, shellType);
                        if (modifier != null)
                        {
                            panelWaffle.Fragments.Add(modifier);
                        }

                        SetAdapterId(panelWaffle, id);
                        propertyList.Add(panelWaffle);
                        break;

                    case eSlabType.Slab:
                    case eSlabType.Drop:
                    case eSlabType.Stiff_DO_NOT_USE:
                    default:
                        ConstantThickness panelConstant = new ConstantThickness();
                        panelConstant.Name      = id;
                        panelConstant.Material  = bhMaterial;
                        panelConstant.Thickness = thickness;
                        panelConstant.Name      = id;
                        panelConstant.PanelType = PanelType.Slab;
                        SetShellType(panelConstant, shellType);
                        if (modifier != null)
                        {
                            panelConstant.Fragments.Add(modifier);
                        }

                        SetAdapterId(panelConstant, id);
                        propertyList.Add(panelConstant);
                        break;
                    }
                }
            }

            return(propertyList);
        }
예제 #7
0
        /***************************************************/

        private List <ISurfaceProperty> ReadProperty2d(List <string> ids = null)
        {
            List <ISurfaceProperty> propertyList = new List <ISurfaceProperty>();
            int nameCount = 0;

            string[] nameArr = { };

            if (ids == null)
            {
                m_model.PropArea.GetNameList(ref nameCount, ref nameArr);
                ids = nameArr.ToList();
            }

            foreach (string id in ids)
            {
                ISurfaceProperty bhProperty = null;
                eSlabType        slabType   = eSlabType.Slab;
                eShellType       shellType  = eShellType.ShellThin;
                eWallPropType    wallType   = eWallPropType.Specified;
                string           material   = "";
                double           thickness  = 0;
                int      colour             = 0;
                string   notes           = "";
                string   guid            = "";
                double   depth           = 0;
                double   stemWidthTop    = 0;
                double   stemWidthBottom = 0;//not used
                double   ribSpacing      = 0;
                double   ribSpacing2nd   = 0;
                int      direction       = 0;
                double[] modifiers       = new double[] { };
                bool     hasModifiers    = false;

                int ret = m_model.PropArea.GetSlab(id, ref slabType, ref shellType, ref material, ref thickness, ref colour, ref notes, ref guid);
                if (ret != 0)
                {
                    m_model.PropArea.GetWall(id, ref wallType, ref shellType, ref material, ref thickness, ref colour, ref notes, ref guid);
                }

                if (m_model.PropArea.GetModifiers(id, ref modifiers) == 0)
                {
                    hasModifiers = true;
                }

                if (wallType == eWallPropType.AutoSelectList)
                {
                    string[] propList        = null;
                    string   currentProperty = "";

                    m_model.PropArea.GetWallAutoSelectList(id, ref propList, ref currentProperty);
                    m_model.PropArea.GetWall(currentProperty, ref wallType, ref shellType, ref material, ref thickness, ref colour, ref notes, ref guid);

                    ConstantThickness panelConstant = new ConstantThickness();
                    panelConstant.Name = currentProperty;
                    panelConstant.CustomData[AdapterId] = id;
                    panelConstant.Material = ReadMaterials(new List <string>()
                    {
                        material
                    })[0];
                    panelConstant.Thickness = thickness;
                    panelConstant.PanelType = PanelType.Wall;
                    SetShellType(panelConstant, shellType);
                    if (hasModifiers)
                    {
                        panelConstant.CustomData.Add("Modifiers", modifiers);
                    }

                    propertyList.Add(panelConstant);
                }
                else
                {
                    switch (slabType)
                    {
                    case eSlabType.Ribbed:
                        Ribbed panelRibbed = new Ribbed();

                        m_model.PropArea.GetSlabRibbed(id, ref depth, ref thickness, ref stemWidthTop, ref stemWidthBottom, ref ribSpacing, ref direction);
                        panelRibbed.Name = id;
                        panelRibbed.CustomData[AdapterId] = id;
                        panelRibbed.Material = ReadMaterials(new List <string>()
                        {
                            material
                        })[0];
                        panelRibbed.Thickness  = thickness;
                        panelRibbed.PanelType  = PanelType.Slab;
                        panelRibbed.Direction  = (PanelDirection)direction;
                        panelRibbed.Spacing    = ribSpacing;
                        panelRibbed.StemWidth  = stemWidthTop;
                        panelRibbed.TotalDepth = depth;
                        SetShellType(panelRibbed, shellType);
                        if (hasModifiers)
                        {
                            panelRibbed.CustomData.Add("Modifiers", modifiers);
                        }

                        propertyList.Add(panelRibbed);
                        break;

                    case eSlabType.Waffle:
                        Waffle panelWaffle = new Waffle();

                        m_model.PropArea.GetSlabWaffle(id, ref depth, ref thickness, ref stemWidthTop, ref stemWidthBottom, ref ribSpacing, ref ribSpacing2nd);
                        panelWaffle.Name = id;
                        panelWaffle.CustomData[AdapterId] = id;
                        panelWaffle.Material = ReadMaterials(new List <string>()
                        {
                            material
                        })[0];
                        panelWaffle.SpacingX    = ribSpacing;
                        panelWaffle.SpacingY    = ribSpacing2nd;
                        panelWaffle.StemWidthX  = stemWidthTop;
                        panelWaffle.StemWidthY  = stemWidthTop;    //ETABS does not appear to support direction dependent stem width
                        panelWaffle.Thickness   = thickness;
                        panelWaffle.TotalDepthX = depth;
                        panelWaffle.TotalDepthY = depth;     // ETABS does not appear to to support direction dependent depth
                        panelWaffle.PanelType   = PanelType.Slab;
                        SetShellType(panelWaffle, shellType);
                        if (hasModifiers)
                        {
                            panelWaffle.CustomData.Add("Modifiers", modifiers);
                        }

                        propertyList.Add(panelWaffle);
                        break;

                    case eSlabType.Slab:
                    case eSlabType.Drop:
                    case eSlabType.Stiff_DO_NOT_USE:
                    default:
                        ConstantThickness panelConstant = new ConstantThickness();
                        panelConstant.CustomData[AdapterId] = id;
                        panelConstant.Name     = id;
                        panelConstant.Material = ReadMaterials(new List <string>()
                        {
                            material
                        })[0];
                        panelConstant.Thickness = thickness;
                        panelConstant.Name      = id;
                        panelConstant.PanelType = PanelType.Slab;
                        SetShellType(panelConstant, shellType);
                        if (hasModifiers)
                        {
                            panelConstant.CustomData.Add("Modifiers", modifiers);
                        }

                        propertyList.Add(panelConstant);
                        break;
                    }
                }
            }

            return(propertyList);
        }
예제 #8
0
        public ETABSProperty2D FloorPropertyToSpeckle(string property)
        {
            eDeckType  deckType  = eDeckType.Filled;
            eSlabType  slabType  = eSlabType.Drop;
            eShellType shellType = eShellType.Layered;
            string     matProp   = "";
            double     thickness = 0;
            int        color     = 0;
            string     notes     = "";
            string     GUID      = "";

            int d = Model.PropArea.GetDeck(property, ref deckType, ref shellType, ref matProp, ref thickness, ref color, ref notes, ref GUID);

            if (d == 0)
            {
                var    speckleProperties2D = new ETABSProperty2D();
                double slabDepth           = 0;
                double shearStudDia        = 0;
                double shearStudFu         = 0;
                double shearStudHt         = 0;
                double ribDepth            = 0;
                double ribWidthTop         = 0;
                double ribWidthBot         = 0;
                double ribSpacing          = 0;
                double shearThickness      = 0;
                double unitWeight          = 0;
                var    speckleShellType    = ConvertShellType(shellType);
                if (deckType == eDeckType.Filled)
                {
                    var speckleProperty2D = new ETABSProperty2D.DeckFilled();
                    Model.PropArea.GetDeckFilled(property,
                                                 ref slabDepth,
                                                 ref ribDepth,
                                                 ref ribWidthTop,
                                                 ref ribWidthBot,
                                                 ref ribSpacing,
                                                 ref shearThickness,
                                                 ref unitWeight,
                                                 ref shearStudDia,
                                                 ref shearStudHt,
                                                 ref shearStudFu);
                    speckleProperty2D.SlabDepth      = slabDepth;
                    speckleProperty2D.ShearStudDia   = shearStudDia;
                    speckleProperty2D.ShearStudFu    = shearStudFu;
                    speckleProperty2D.RibDepth       = ribDepth;
                    speckleProperty2D.RibWidthTop    = ribWidthTop;
                    speckleProperty2D.RibWidthBot    = ribWidthBot;
                    speckleProperty2D.RibSpacing     = ribSpacing;
                    speckleProperty2D.ShearThickness = shearThickness;
                    speckleProperty2D.UnitWeight     = unitWeight;
                    speckleProperty2D.ShearStudHt    = shearStudHt;
                    speckleProperty2D.deckType       = Structural.ETABS.Analysis.DeckType.Filled;
                    setProperties(speckleProperty2D, matProp, thickness, property);
                    speckleProperty2D.type2D        = Structural.ETABS.Analysis.ETABSPropertyType2D.Deck;
                    speckleProperty2D.shellType     = speckleShellType;
                    speckleProperty2D.applicationId = GUID;
                    return(speckleProperty2D);
                }
                else if (deckType == eDeckType.Unfilled)
                {
                    var speckleProperty2D = new ETABSProperty2D.DeckUnFilled();
                    Model.PropArea.GetDeckUnfilled(property,
                                                   ref ribDepth,
                                                   ref ribWidthTop,
                                                   ref ribWidthBot,
                                                   ref ribSpacing,
                                                   ref shearThickness,
                                                   ref unitWeight);
                    speckleProperty2D.RibDepth       = ribDepth;
                    speckleProperty2D.RibWidthTop    = ribWidthTop;
                    speckleProperty2D.RibWidthBot    = ribWidthBot;
                    speckleProperty2D.RibSpacing     = ribSpacing;
                    speckleProperty2D.ShearThickness = shearThickness;
                    speckleProperty2D.UnitWeight     = unitWeight;
                    speckleProperty2D.deckType       = Structural.ETABS.Analysis.DeckType.Filled;
                    setProperties(speckleProperty2D, matProp, thickness, property);
                    speckleProperty2D.type2D        = Structural.ETABS.Analysis.ETABSPropertyType2D.Deck;
                    speckleProperty2D.shellType     = speckleShellType;
                    speckleProperty2D.applicationId = GUID;
                    return(speckleProperty2D);
                }
                else if (deckType == eDeckType.SolidSlab)
                {
                    var speckleProperty2D = new ETABSProperty2D.DeckSlab();
                    Model.PropArea.GetDeckSolidSlab(property, ref slabDepth, ref shearStudDia, ref shearStudDia, ref shearStudFu);
                    speckleProperty2D.SlabDepth    = slabDepth;
                    speckleProperty2D.ShearStudDia = shearStudDia;
                    speckleProperty2D.ShearStudFu  = shearStudFu;
                    speckleProperty2D.ShearStudHt  = shearStudHt;
                    speckleProperty2D.deckType     = Structural.ETABS.Analysis.DeckType.SolidSlab;
                    setProperties(speckleProperty2D, matProp, thickness, property);
                    speckleProperty2D.type2D        = Structural.ETABS.Analysis.ETABSPropertyType2D.Deck;
                    speckleProperty2D.shellType     = speckleShellType;
                    speckleProperty2D.applicationId = GUID;
                    return(speckleProperty2D);
                }
            }
            int s = Model.PropArea.GetSlab(property, ref slabType, ref shellType, ref matProp, ref thickness, ref color, ref notes, ref GUID);

            if (s == 0)
            {
                var specklePropery2DSlab = new ETABSProperty2D();
                setProperties(specklePropery2DSlab, matProp, thickness, property);
                specklePropery2DSlab.type2D = Structural.ETABS.Analysis.ETABSPropertyType2D.Slab;
                double overallDepth     = 0;
                double slabThickness    = 0;
                double stemWidthTop     = 0;
                double stemWidthBot     = 0;
                double ribSpacingDir1   = 0;
                double ribSpacingDir2   = 0;
                double ribSpacing       = 0;
                int    ribParrallelTo   = 0;
                var    speckleShellType = ConvertShellType(shellType);
                if (slabType == eSlabType.Waffle)
                {
                    var speckleProperty2D = new ETABSProperty2D.WaffleSlab();
                    Model.PropArea.GetSlabWaffle(property, ref overallDepth, ref slabThickness, ref stemWidthTop, ref stemWidthBot, ref ribSpacingDir1, ref ribSpacingDir2);
                    speckleProperty2D.OverAllDepth   = overallDepth;
                    speckleProperty2D.StemWidthBot   = stemWidthBot;
                    speckleProperty2D.StemWidthTop   = stemWidthTop;
                    speckleProperty2D.RibSpacingDir1 = ribSpacingDir1;
                    speckleProperty2D.RibSpacingDir2 = ribSpacingDir2;
                    speckleProperty2D.slabType       = Structural.ETABS.Analysis.SlabType.Waffle;
                    speckleProperty2D.deckType       = Structural.ETABS.Analysis.DeckType.Null;
                    setProperties(speckleProperty2D, matProp, thickness, property);
                    speckleProperty2D.shellType     = speckleShellType;
                    speckleProperty2D.applicationId = GUID;
                    return(speckleProperty2D);
                }
                else if (slabType == eSlabType.Ribbed)
                {
                    var speckleProperty2D = new ETABSProperty2D.RibbedSlab();
                    Model.PropArea.GetSlabRibbed(property, ref overallDepth, ref slabThickness, ref stemWidthTop, ref stemWidthBot, ref ribSpacing, ref ribParrallelTo);
                    speckleProperty2D.OverAllDepth   = overallDepth;
                    speckleProperty2D.StemWidthBot   = stemWidthBot;
                    speckleProperty2D.StemWidthTop   = stemWidthTop;
                    speckleProperty2D.RibSpacing     = ribSpacing;
                    speckleProperty2D.RibsParallelTo = ribParrallelTo;
                    speckleProperty2D.slabType       = Structural.ETABS.Analysis.SlabType.Ribbed;
                    speckleProperty2D.deckType       = Structural.ETABS.Analysis.DeckType.Null;
                    setProperties(speckleProperty2D, matProp, thickness, property);
                    speckleProperty2D.shellType     = speckleShellType;
                    speckleProperty2D.applicationId = GUID;
                    return(speckleProperty2D);
                }
                else
                {
                    switch (slabType)
                    {
                    case eSlabType.Slab:
                        specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Slab;
                        break;

                    case eSlabType.Drop:
                        specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Drop;
                        break;

                    case eSlabType.Mat:
                        specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Mat;
                        break;

                    case eSlabType.Footing:
                        specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Footing;
                        break;

                    default:
                        specklePropery2DSlab.slabType = Structural.ETABS.Analysis.SlabType.Null;
                        break;
                    }
                    specklePropery2DSlab.deckType      = Structural.ETABS.Analysis.DeckType.Null;
                    specklePropery2DSlab.shellType     = speckleShellType;
                    specklePropery2DSlab.applicationId = GUID;
                    return(specklePropery2DSlab);
                }
            }
            return(null);
        }
예제 #9
0
        //Define a new Slab_Section object
        public static Slab_Section DefineSlabSection(string SectionName, string MaterialProperty, double Thickness, Shell_Stiffness_Modifier Stiffness_Modifier, eSlabType SlabType, eShellType ShellType)
        {
            Slab_Section SlabSec = new Slab_Section(SectionName, MaterialProperty, Thickness, Stiffness_Modifier, SlabType, ShellType);

            return(SlabSec);
        }
예제 #10
0
 // eSlabType
 internal static CSiProgram.eSlabType ToCSi(eSlabType enumValue)
 {
     return((CSiProgram.eSlabType)enumValue);
 }