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

        public static UniformLoadSet ToBHoMObject(this ISurfaceLoadPropertySet ramSrfLoadPropSet)
        {
            RAMLiveLoadTypes liveType = RAMLiveLoadTypes.LiveUnReducibleLCa;

            if (ramSrfLoadPropSet.eLiveLoadType != ELoadCaseType.DeadLCa)
            {
                liveType = ramSrfLoadPropSet.eLiveLoadType.ToBHoM();
            }
            else
            {
                Engine.Base.Compute.RecordWarning($"Live Load type for load set {ramSrfLoadPropSet.strLabel} was set as Dead. This usually means that no live load is applied in RAM; check results.");
            }

            UniformLoadSet uniformLoadSet = Engine.Adapters.RAM.Create.RAMUniformLoadSet(
                ramSrfLoadPropSet.dDeadLoad.FromKilopoundForcePerSquareInch(),
                ramSrfLoadPropSet.dConstDeadLoad.FromKilopoundForcePerSquareInch(),
                ramSrfLoadPropSet.dConstLiveLoad.FromKilopoundForcePerSquareInch(),
                liveType,
                ramSrfLoadPropSet.dPartitionLoad.FromKilopoundForcePerSquareInch(),
                ramSrfLoadPropSet.dConstLiveLoad.FromKilopoundForcePerSquareInch(),
                ramSrfLoadPropSet.dMassDeadLoad.FromKilopoundForcePerSquareInch(),
                ramSrfLoadPropSet.strLabel
                );

            // Unique RAM ID
            RAMId RAMId = new RAMId();

            RAMId.Id = ramSrfLoadPropSet.lUID;
            uniformLoadSet.SetAdapterId(RAMId);

            return(uniformLoadSet);
        }
Ejemplo n.º 2
0
        /***************************************************/
        /**** Private methods                           ****/
        /***************************************************/

        private List <UniformLoadSet> ReadUniformLoadSets(List <string> ids = null)
        {
            List <UniformLoadSet> bhomUniformLoadSets = new List <UniformLoadSet>();

            ISurfaceLoadPropertySets RAMLoadSets = m_Model.GetSurfaceLoadPropertySets();

            for (int i = 0; i < RAMLoadSets.GetCount(); i++)
            {
                UniformLoadSet bhLoad = RAMLoadSets.GetAt(i).ToBHoMObject();
                bhomUniformLoadSets.Add(bhLoad);
            }

            return(bhomUniformLoadSets);
        }
Ejemplo n.º 3
0
        public static UniformLoadSet RAMUniformLoadSet(double sdl, double cdl, double liveLoad, RAMLiveLoadTypes llType, double partition, double cll, double massDl, string name = "")
        {
            UniformLoadSet loadSet = new UniformLoadSet
            {
                Name  = name,
                Loads = new List <UniformLoadSetRecord>
                {
                    new UniformLoadSetRecord()
                    {
                        Name = ELoadCaseType.DeadLCa.ToString(), Load = sdl
                    },
                    new UniformLoadSetRecord()
                    {
                        Name = ELoadCaseType.ConstructionDeadLCa.ToString(), Load = cdl
                    },
                    new UniformLoadSetRecord()
                    {
                        Name = ELoadCaseType.PartitionLCa.ToString(), Load = partition
                    },
                    new UniformLoadSetRecord()
                    {
                        Name = ELoadCaseType.ConstructionLiveLCa.ToString(), Load = cll
                    },
                    new UniformLoadSetRecord()
                    {
                        Name = ELoadCaseType.MassDeadLCa.ToString(), Load = massDl
                    },
                    //Live loads are special:
                    new UniformLoadSetRecord()
                    {
                        Name = llType.ToString(), Load = liveLoad
                    }
                }
            };

            return(loadSet);

            /***************************************************/
        }