Beispiel #1
0
        /***************************************************/
        /**** Private methods                           ****/
        /***************************************************/

        private bool CreateCollection(IEnumerable <ISurfaceProperty> srfProps)
        {
            foreach (ISurfaceProperty srfProp in srfProps)
            {
                RAMId RAMId = new RAMId();
                if (srfProp is Ribbed)
                {
                    Ribbed        compProp = (Ribbed)srfProp;
                    ICompDeckProp ramProp;

                    //Validity check for ribbed properties thickness above flutes
                    if (compProp.Thickness < 2.0.FromInch())
                    {
                        Engine.Base.Compute.RecordError("Deck property " + srfProp.Name + " has an invalid thickness. Thickness was automatically changed to 2 inches in order to ensure required shear stud engagement per RAM.");
                        compProp.Thickness = 2.0.FromInch();
                    }
                    ICompDeckProps compDeckProps = m_Model.GetCompositeDeckProps();
                    try
                    {
                        ramProp = compDeckProps.Add2(compProp.Name, Engine.Base.Query.PropertyValue(compProp, "DeckProfileName").ToString(), compProp.Thickness.ToInch(), compProp.TotalDepth.ToInch() - 1.5);
                    }
                    catch
                    {
                        Engine.Base.Compute.RecordWarning("Deck label for surface property " + srfProp.Name + " not found or invalid for specified thickness. Using default deck profile. Please provide a valid deck name from the RAM Deck Table as a property on the SurfaceProperty named DeckProfileName.");
                        ramProp = compDeckProps.Add2(compProp.Name, "ASC 3W", compProp.Thickness.ToInch(), 4.5);
                    }
                    RAMId.Id = ramProp.lUID;
                }
                else if (srfProp is ConstantThickness && !(srfProp.Material is Steel))
                {
                    ConstantThickness prop = (ConstantThickness)srfProp;
                    if (prop.PanelType != PanelType.Wall)  //Wall surface properties are created on a per wall element basis
                    {
                        IConcSlabProps concSlabProps = m_Model.GetConcreteSlabProps();
                        IConcSlabProp  ramProp;
                        ramProp  = concSlabProps.Add(prop.Name, prop.Thickness.ToInch(), prop.Material.Density.ToPoundPerCubicFoot());
                        RAMId.Id = ramProp.lUID;
                    }
                }
                else if (srfProp is ConstantThickness && srfProp.Material is Steel)
                {
                    ConstantThickness prop = (ConstantThickness)srfProp;
                    if (prop.PanelType != PanelType.Wall)  //Wall surface properties are created on a per wall element basis
                    {
                        INonCompDeckProps nonCompDeckProps = m_Model.GetNonCompDeckProps();
                        INonCompDeckProp  ramProp;

                        ramProp = nonCompDeckProps.Add(prop.Name);
                        ramProp.dEffectiveThickness = prop.Thickness.ToInch();
                        RAMId.Id = ramProp.lUID;
                    }
                }
                srfProp.SetAdapterId(RAMId);
            }

            //Save file
            m_IDBIO.SaveDatabase();

            return(true);
        }
Beispiel #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);
        }