Ejemplo n.º 1
0
        /***************************************************/
        /**** Public Methods                            ****/
        /***************************************************/

        public static ISurfaceProperty ToSurfaceProperty(this IFAttribute lusasAttribute)
        {
            string attributeName = GetName(lusasAttribute);

            ISurfaceProperty surfaceProperty = new ConstantThickness
            {
                Name      = attributeName,
                Thickness = lusasAttribute.getValue("t")
            };

            int adapterNameId = lusasAttribute.getID();

            surfaceProperty.SetAdapterId(typeof(LusasId), adapterNameId);

            return(surfaceProperty);
        }
Ejemplo n.º 2
0
        /***************************************************/
        /**** Private 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)
            {
                int       shellType          = 0;
                bool      includeDrillingDOF = true;
                string    materialName       = "";
                double    matAng             = 0;
                double    thickness          = 0;
                double    bending            = 0;
                int       color     = 0;
                string    notes     = "";
                string    guid      = null;
                SAP2000Id sap2000id = new SAP2000Id();
                sap2000id.Id = id;


                if (m_model.PropArea.GetShell_1(id, ref shellType, ref includeDrillingDOF, ref materialName, ref matAng, ref thickness, ref bending, ref color, ref notes, ref guid) != 0)
                {
                    Engine.Base.Compute.RecordWarning($"Error while pulling Surface Property {id}. Check results carefully.");
                }

                ConstantThickness bhSurfProp = new ConstantThickness();

                bhSurfProp.Name      = id;
                bhSurfProp.Thickness = thickness;
                bhSurfProp.CustomData.Add("MaterialAngle", matAng);
                bhSurfProp.CustomData.Add("BendingThickness", bending);
                bhSurfProp.CustomData.Add("Color", color);
                bhSurfProp.CustomData.Add("Notes", notes);
                bhSurfProp.CustomData.Add("GUID", guid);

                IMaterialFragment bhMat = new GenericIsotropicMaterial();
                bhomMaterials.TryGetValue(materialName, out bhMat);
                bhSurfProp.Material = bhMat;

                double[] modifiers = new double[6];

                if (m_model.PropArea.GetModifiers(id, ref modifiers) == 0)
                {
                    SurfacePropertyModifier 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]
                    };
                    bhSurfProp.Fragments.Add(modifier);
                }

                bhSurfProp.SetAdapterId(sap2000id);
                propertyList.Add(bhSurfProp);
            }

            return(propertyList);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
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);
        }