예제 #1
0
        public GsaSection Clone()
        {
            GsaSection clone = this.Duplicate();

            clone.m_guid = Guid.NewGuid();
            return(clone);
        }
예제 #2
0
        public GsaMember1d()
        {
            m_member = new Member();
            m_crv    = new PolyCurve();

            m_section         = new GsaSection();
            m_section.Section = null;
        }
예제 #3
0
        public GsaElement1d()
        {
            m_element = new Element();
            m_line    = new LineCurve();

            m_section         = new GsaSection();
            m_section.Section = null;
        }
        public GsaSection Duplicate()
        {
            GsaSection dup = new GsaSection
            {
                Section = m_section,
                ID      = m_idd
            };

            return(dup);
        }
예제 #5
0
        public GsaElement1d(LineCurve line, int prop = 0)
        {
            m_element = new Element
            {
                Type     = ElementType.BEAM,
                Property = prop,
            };

            m_line = line;

            m_section         = new GsaSection();
            m_section.Section = null;
        }
예제 #6
0
        public GsaMaterial(GsaSection section)
        {
            if (section == null)
            {
                return;
            }
            if (section.Section == null)
            {
                return;
            }

            Type             = getType(section.Section.MaterialType);
            AnalysisProperty = section.Section.MaterialAnalysisProperty;
            Grade            = section.Section.MaterialGradeProperty;
        }
예제 #7
0
        public GsaMember1d(List <Point3d> topology, List <string> topo_type = null)
        {
            m_member = new Member
            {
                Type = MemberType.GENERIC_1D
            };
            m_crv      = Util.GH.Convert.BuildArcLineCurveFromPtsAndTopoType(topology, topo_type);
            m_topo     = topology;
            m_topoType = topo_type;

            m_section         = new GsaSection();
            m_section.Section = null;

            Topology     = m_topo;
            TopologyType = m_topoType;
        }
예제 #8
0
        public GsaMember1d(Curve crv, int prop = 0)
        {
            m_member = new Member
            {
                Type     = MemberType.GENERIC_1D,
                Property = prop
            };
            Tuple <PolyCurve, List <Point3d>, List <string> > convertCrv = Util.GH.Convert.ConvertMem1dCrv(crv);

            m_crv      = convertCrv.Item1;
            m_topo     = convertCrv.Item2;
            m_topoType = convertCrv.Item3;

            m_section         = new GsaSection();
            m_section.Section = null;

            Topology     = m_topo;
            TopologyType = m_topoType;
        }
예제 #9
0
        public GsaSection Duplicate()
        {
            if (this == null)
            {
                return(null);
            }
            GsaSection dup = new GsaSection();

            if (m_section != null)
            {
                dup.Section = new Section()
                {
                    MaterialAnalysisProperty = m_section.MaterialAnalysisProperty,
                    MaterialGradeProperty    = m_section.MaterialGradeProperty,
                    MaterialType             = m_section.MaterialType,
                    Name    = m_section.Name,
                    Pool    = m_section.Pool,
                    Profile = m_section.Profile
                };

                if ((System.Drawing.Color)m_section.Colour != System.Drawing.Color.FromArgb(0, 0, 0)) // workaround to handle that System.Drawing.Color is non-nullable type
                {
                    dup.m_section.Colour = m_section.Colour;
                }
            }
            else
            {
                dup.Section = null;
            }

            dup.ID = m_idd;

            if (Material != null)
            {
                dup.Material = m_material.Duplicate();
            }

            dup.m_guid = new Guid(m_guid.ToString());
            return(dup);
        }