Ejemplo n.º 1
0
        public GsaLoad Duplicate()
        {
            GsaLoad dup;

            switch (LoadType)
            {
            case LoadTypes.Gravity:
                dup = new GsaLoad(m_gravity);
                return(dup);

            case LoadTypes.Node:
                dup = new GsaLoad(m_node);
                return(dup);

            case LoadTypes.Beam:
                dup = new GsaLoad(m_beam);
                return(dup);

            case LoadTypes.Face:
                dup = new GsaLoad(m_face);
                return(dup);

            case LoadTypes.GridPoint:
                dup = new GsaLoad(m_gridpoint);
                return(dup);

            case LoadTypes.GridLine:
                dup = new GsaLoad(m_gridline);
                return(dup);

            case LoadTypes.GridArea:
                dup = new GsaLoad(m_gridarea);
                return(dup);
            }
            return(default);
Ejemplo n.º 2
0
        public GsaLoad Duplicate()
        {
            if (this == null)
            {
                return(null);
            }
            GsaLoad dup;

            switch (LoadType)
            {
            case LoadTypes.Gravity:
                dup = new GsaLoad(m_gravity.Duplicate());
                return(dup);

            case LoadTypes.Node:
                dup = new GsaLoad(m_node.Duplicate());
                return(dup);

            case LoadTypes.Beam:
                dup = new GsaLoad(m_beam.Duplicate());
                return(dup);

            case LoadTypes.Face:
                dup = new GsaLoad(m_face.Duplicate());
                return(dup);

            case LoadTypes.GridPoint:
                dup = new GsaLoad(m_gridpoint.Duplicate());
                if (m_gridpoint.GridPlaneSurface != null)
                {
                    dup.PointLoad.GridPlaneSurface = m_gridpoint.GridPlaneSurface.Duplicate();
                }
                return(dup);

            case LoadTypes.GridLine:
                dup = new GsaLoad(m_gridline.Duplicate());
                if (m_gridline.GridPlaneSurface != null)
                {
                    dup.LineLoad.GridPlaneSurface = m_gridline.GridPlaneSurface.Duplicate();
                }
                return(dup);

            case LoadTypes.GridArea:
                dup = new GsaLoad(m_gridarea.Duplicate());
                if (m_gridarea.GridPlaneSurface != null)
                {
                    dup.AreaLoad.GridPlaneSurface = m_gridarea.GridPlaneSurface.Duplicate();
                }
                return(dup);
            }
            return(default);