Пример #1
0
 public static double MassPerArea(this Ribbed ribbedProperty)
 {
     throw new NotImplementedException();
 }
Пример #2
0
        /***************************************************/
        /**** Private methods                           ****/
        /***************************************************/

        private List <ISurfaceProperty> ReadISurfaceProperties(List <string> ids = null)
        {
            List <ISurfaceProperty> propList      = new List <ISurfaceProperty>();
            ISteelCriteria          steelCriteria = m_Model.GetSteelCriteria();
            IDeckTableEntries       deckProfiles  = steelCriteria.GetDeckTableEntries();

            ICompDeckProps compDeckProps = m_Model.GetCompositeDeckProps();

            for (int i = 0; i < compDeckProps.GetCount(); i++)
            {
                ICompDeckProp   DeckProp        = compDeckProps.GetAt(i);
                string          deckLabel       = DeckProp.strLabel;
                string          deckProfileName = DeckProp.strDeckType;
                IDeckTableEntry profile         = null;

                for (int j = 0; j < deckProfiles.GetCount(); j++) // find ram deck profile to get props
                {
                    profile = deckProfiles.GetAt(j);
                    if (profile.strDeckName == deckLabel)
                    {
                        break;
                    }
                }

                double concThickness        = DeckProp.dThickAboveFlutes.FromInch();
                double deckProfileThickness = profile.dTD.FromInch();
                double deckThickness        = concThickness + deckProfileThickness;

                IMaterialFragment material = Engine.Structure.Create.Concrete("Concrete Over Deck");

                Ribbed deck2DProp = new Ribbed();
                deck2DProp.Name       = deckLabel;
                deck2DProp.Thickness  = concThickness;
                deck2DProp.PanelType  = PanelType.Slab;
                deck2DProp.Material   = material;
                deck2DProp.Spacing    = profile.dRSpac;
                deck2DProp.StemWidth  = profile.dWR;
                deck2DProp.TotalDepth = deckThickness;

                // Unique RAM ID
                RAMId RAMId = new RAMId();
                RAMId.Id = DeckProp.lUID;
                deck2DProp.SetAdapterId(RAMId);

                RAMDeckData ramDeckData = new RAMDeckData();
                ramDeckData.DeckProfileName = deckProfileName;
                deck2DProp.Fragments.Add(ramDeckData);

                propList.Add(deck2DProp);
            }

            IConcSlabProps concSlabProps = m_Model.GetConcreteSlabProps();

            for (int i = 0; i < concSlabProps.GetCount(); i++)
            {
                IConcSlabProp     DeckProp      = concSlabProps.GetAt(i);
                double            deckThickness = DeckProp.dThickness.FromInch();
                string            deckLabel     = DeckProp.strLabel;
                IMaterialFragment material      = Engine.Structure.Create.Concrete("Concrete");

                ConstantThickness deck2DProp = new ConstantThickness();
                deck2DProp.Name      = deckLabel;
                deck2DProp.Material  = material;
                deck2DProp.Thickness = deckThickness;
                deck2DProp.PanelType = PanelType.Slab;
                propList.Add(deck2DProp);

                // Unique RAM ID
                RAMId RAMId = new RAMId();
                RAMId.Id = DeckProp.lUID;
                deck2DProp.SetAdapterId(RAMId);
            }

            INonCompDeckProps nonCompDeckProps = m_Model.GetNonCompDeckProps();

            for (int i = 0; i < nonCompDeckProps.GetCount(); i++)
            {
                INonCompDeckProp  DeckProp      = nonCompDeckProps.GetAt(i);
                double            deckThickness = DeckProp.dEffectiveThickness.FromInch();
                string            deckLabel     = DeckProp.strLabel;
                IMaterialFragment material      = Engine.Structure.Create.Steel("Metal Deck");

                ConstantThickness deck2DProp = new ConstantThickness();
                deck2DProp.Name      = deckLabel;
                deck2DProp.Material  = material;
                deck2DProp.Thickness = deckThickness;
                deck2DProp.PanelType = PanelType.Slab;
                propList.Add(deck2DProp);

                // Unique RAM ID
                RAMId RAMId = new RAMId();
                RAMId.Id = DeckProp.lUID;
                deck2DProp.SetAdapterId(RAMId);
            }

            return(propList);
        }
Пример #3
0
        /***************************************************/
        /**** Public Methods                            ****/
        /***************************************************/

        public static ISurfaceProperty FromRFEM(this rf.SurfaceStiffness rfStiffness, IMaterialFragment material)
        {
            ISurfaceProperty surfaceProperty = null;


            switch (rfStiffness.Type)
            {
            case rf.OrthotropyType.ConstantThickness:
                surfaceProperty = new ConstantThickness {
                    Thickness = rfStiffness.Thickness, Material = material
                };
                break;

            case rf.OrthotropyType.UnidirectionalRibbedPlate:
                surfaceProperty = new Ribbed
                {
                    Thickness  = rfStiffness.Thickness,
                    TotalDepth = rfStiffness.GeometricProperties.Height,
                    Spacing    = rfStiffness.GeometricProperties.Spacing,
                    StemWidth  = rfStiffness.GeometricProperties.Width,
                    Material   = material
                };
                break;

            case rf.OrthotropyType.BidirectionalRibbedPlate:
                surfaceProperty = new Waffle
                {
                    Thickness   = rfStiffness.Thickness,
                    TotalDepthX = rfStiffness.GeometricProperties.HeightX,
                    TotalDepthY = rfStiffness.GeometricProperties.HeightY,
                    SpacingX    = rfStiffness.GeometricProperties.SpacingX,
                    SpacingY    = rfStiffness.GeometricProperties.SpacingY,
                    StemWidthX  = rfStiffness.GeometricProperties.WidthX,
                    StemWidthY  = rfStiffness.GeometricProperties.WidthY
                };
                break;

            case rf.OrthotropyType.UnknownOrthotropyType:
            case rf.OrthotropyType.EffectiveThickness:
            case rf.OrthotropyType.DefinedByStiffnessMatrix:
            case rf.OrthotropyType.Coupling:
            case rf.OrthotropyType.TrapezoidalSheet:
            case rf.OrthotropyType.HollowCoreSlab:
            case rf.OrthotropyType.Grillage:
            case rf.OrthotropyType.UnidirectionalBoxFloor:
            case rf.OrthotropyType.Glass:
            case rf.OrthotropyType.Laminate:
                surfaceProperty = new ConstantThickness {
                    Thickness = rfStiffness.Thickness, Material = material
                };
                Engine.Base.Compute.RecordError("could not create surface property for " + rfStiffness.ID);
                break;

            default:
                surfaceProperty = new ConstantThickness {
                    Thickness = rfStiffness.Thickness, Material = material
                };
                Engine.Base.Compute.RecordError("could not create surface property for " + rfStiffness.ID);
                break;
            }

            surfaceProperty.SetAdapterId(typeof(RFEMId), rfStiffness.No);
            return(surfaceProperty);
        }
Пример #4
0
        /***************************************************/

        private IFGeometricSurface CreateSurfraceProfile(Ribbed ribbed, string lusasName)
        {
            Engine.Base.Compute.RecordError("Ribbed not supported in Lusas_Toolkit");
            return(null);
        }
Пример #5
0
        /***************************************************/
        /**** Public Methods                            ****/
        /***************************************************/

        public static rf.SurfaceStiffness ToRFEM(this ISurfaceProperty surfaceProperty)
        {
            rf.SurfaceStiffness stiffness = new rf.SurfaceStiffness();



            if (surfaceProperty is LoadingPanelProperty)
            {
                Engine.Base.Compute.RecordWarning("sorry, Can't do loding panels");
            }
            else
            {
                if (surfaceProperty is ConstantThickness)
                {
                    ConstantThickness constantThickness = surfaceProperty as ConstantThickness;
                    stiffness.Type      = rf.OrthotropyType.ConstantThickness;
                    stiffness.Thickness = constantThickness.Thickness;

                    stiffness.MultiplicationFactors.K   = 1.0;
                    stiffness.MultiplicationFactors.K33 = 1.0;
                    stiffness.MultiplicationFactors.K44 = 1.0;
                    stiffness.MultiplicationFactors.K55 = 1.0;
                    stiffness.MultiplicationFactors.Kb  = 1.0;
                    stiffness.MultiplicationFactors.Ke  = 1.0;
                    stiffness.MultiplicationFactors.Km  = 1.0;
                    stiffness.MultiplicationFactors.Ks  = 1.0;
                }
                else if (surfaceProperty is Ribbed)
                {
                    Ribbed prop = surfaceProperty as Ribbed;
                    stiffness.Type      = rf.OrthotropyType.UnidirectionalRibbedPlate;
                    stiffness.Thickness = prop.Thickness;
                    stiffness.GeometricProperties.Height    = prop.TotalDepth;
                    stiffness.GeometricProperties.Spacing   = prop.Spacing;
                    stiffness.GeometricProperties.Width     = prop.StemWidth;
                    stiffness.GeometricProperties.Thickness = prop.Thickness;


                    stiffness.MultiplicationFactors.K   = 1.0;
                    stiffness.MultiplicationFactors.K33 = 1.0;
                    stiffness.MultiplicationFactors.K44 = 1.0;
                    stiffness.MultiplicationFactors.K55 = 1.0;
                    stiffness.MultiplicationFactors.Kb  = 1.0;
                    stiffness.MultiplicationFactors.Ke  = 1.0;
                    stiffness.MultiplicationFactors.Km  = 1.0;
                    stiffness.MultiplicationFactors.Ks  = 1.0;
                }
                else if (surfaceProperty is Waffle)
                {
                    Waffle prop = surfaceProperty as Waffle;
                    stiffness.Type      = rf.OrthotropyType.BidirectionalRibbedPlate;
                    stiffness.Thickness = prop.Thickness;
                    stiffness.GeometricProperties.HeightX   = prop.TotalDepthX;
                    stiffness.GeometricProperties.HeightY   = prop.TotalDepthY;
                    stiffness.GeometricProperties.SpacingX  = prop.SpacingX;
                    stiffness.GeometricProperties.SpacingY  = prop.SpacingY;
                    stiffness.GeometricProperties.WidthX    = prop.StemWidthX;
                    stiffness.GeometricProperties.WidthY    = prop.StemWidthY;
                    stiffness.GeometricProperties.Thickness = prop.Thickness;

                    stiffness.MultiplicationFactors.K   = 1.0;
                    stiffness.MultiplicationFactors.K33 = 1.0;
                    stiffness.MultiplicationFactors.K44 = 1.0;
                    stiffness.MultiplicationFactors.K55 = 1.0;
                    stiffness.MultiplicationFactors.Kb  = 1.0;
                    stiffness.MultiplicationFactors.Ke  = 1.0;
                    stiffness.MultiplicationFactors.Km  = 1.0;
                    stiffness.MultiplicationFactors.Ks  = 1.0;
                }
                else
                {
                    Engine.Base.Compute.RecordWarning("my responses are limited. I don't know: " + surfaceProperty.Name);
                }
            }
            return(stiffness);
        }
Пример #6
0
 public static string Description(this Ribbed property)
 {
     return($"Ribbed Depth: {property.TotalDepth:G3} Spacing: {property.Spacing:G3} sWidth: {property.StemWidth:G3}" +
            $" - {CheckGetMaterialName(property.Material)}");
 }
Пример #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
        /***************************************************/
        /***    Create Methods                           ***/
        /***************************************************/

        private bool CreateObject(ISurfaceProperty property2d)
        {
            bool success = true;
            int  retA    = 0;

            string propertyName = property2d.DescriptionOrName();

            SetAdapterId(property2d, propertyName);

            string materialName = "";

            if (CheckPropertyWarning(property2d, p => p.Material))
            {
                materialName = GetAdapterId <string>(property2d.Material) ?? "";
            }

            eShellType shellType = ShellTypeToCSI(property2d);

            if (property2d.GetType() == typeof(Waffle))
            {
                Waffle waffleProperty = (Waffle)property2d;
                m_model.PropArea.SetSlab(propertyName, eSlabType.Waffle, shellType, materialName, waffleProperty.Thickness);
                retA = m_model.PropArea.SetSlabWaffle(propertyName, waffleProperty.TotalDepthX, waffleProperty.Thickness, waffleProperty.StemWidthX, waffleProperty.StemWidthX, waffleProperty.SpacingX, waffleProperty.SpacingY);
            }
            else if (property2d.GetType() == typeof(Ribbed))
            {
                Ribbed ribbedProperty = (Ribbed)property2d;
                m_model.PropArea.SetSlab(propertyName, eSlabType.Ribbed, shellType, materialName, ribbedProperty.Thickness);
                retA = m_model.PropArea.SetSlabRibbed(propertyName, ribbedProperty.TotalDepth, ribbedProperty.Thickness, ribbedProperty.StemWidth, ribbedProperty.StemWidth, ribbedProperty.Spacing, (int)ribbedProperty.Direction);
            }
            else if (property2d.GetType() == typeof(LoadingPanelProperty))
            {
                retA = m_model.PropArea.SetSlab(propertyName, eSlabType.Slab, shellType, materialName, 0);
            }
            else if (property2d.GetType() == typeof(ConstantThickness))
            {
                ConstantThickness constantThickness = (ConstantThickness)property2d;
                if (constantThickness.PanelType == PanelType.Wall)
                {
                    retA = m_model.PropArea.SetWall(propertyName, eWallPropType.Specified, shellType, materialName, constantThickness.Thickness);
                }
                else
                {
                    retA = m_model.PropArea.SetSlab(propertyName, eSlabType.Slab, shellType, materialName, constantThickness.Thickness);
                }
            }

            SurfacePropertyModifier modifier = property2d.FindFragment <SurfacePropertyModifier>();

            if (modifier != null)
            {
                double[] modifiers = new double[] { modifier.FXX, modifier.FYY, modifier.FXY, modifier.MXX, modifier.MYY, modifier.MXY, modifier.VXZ, modifier.VYZ, modifier.Mass, modifier.Weight };
                m_model.PropArea.SetModifiers(propertyName, ref modifiers);
            }

            if (retA != 0)
            {
                success = false;
            }

            return(success);
        }