public GsaMember1d Duplicate()
        {
            GsaMember1d dup = new GsaMember1d
            {
                m_member = m_member //add clone or duplicate if available
            };

            if (m_crv != null)
            {
                dup.m_crv = m_crv.DuplicatePolyCurve();
            }

            Point3dList point3Ds = new Point3dList(m_topo);

            dup.Topology     = new List <Point3d>(point3Ds.Duplicate());
            dup.TopologyType = m_topoType.ToList();

            dup.ID = m_id;

            if (m_rel1 != null)
            {
                dup.ReleaseStart = m_rel1.Duplicate();
            }
            if (m_rel2 != null)
            {
                dup.ReleaseEnd = m_rel2.Duplicate();
            }
            if (m_section != null)
            {
                dup.Section = m_section.Duplicate();
            }

            return(dup);
        }
        public GsaMember2d Duplicate()
        {
            GsaMember2d dup = new GsaMember2d
            {
                m_member = m_member //add clone or duplicate if available
            };

            if (m_brep != null)
            {
                dup.m_brep = m_brep.DuplicateBrep();
            }
            if (m_crv != null)
            {
                dup.m_crv = m_crv.DuplicatePolyCurve();
            }

            Point3dList point3Ds = new Point3dList(m_topo);

            dup.Topology     = new List <Point3d>(point3Ds.Duplicate());
            dup.TopologyType = m_topoType.ToList();

            if (void_crvs != null)
            {
                dup.void_crvs     = new List <PolyCurve>();
                dup.void_topo     = new List <List <Point3d> >();
                dup.void_topoType = new List <List <string> >();
                for (int i = 0; i < void_crvs.Count; i++)
                {
                    dup.void_crvs.Add(void_crvs[i].DuplicatePolyCurve());
                    Point3dList voidpoint3Ds = new Point3dList(void_topo[i]);
                    dup.void_topo.Add(new List <Point3d>(voidpoint3Ds.Duplicate()));
                    dup.void_topoType.Add(void_topoType[i].ToList());
                }
            }

            if (incl_Lines != null)
            {
                dup.incl_Lines         = new List <PolyCurve>();
                dup.incLines_topo      = new List <List <Point3d> >();
                dup.inclLines_topoType = new List <List <string> >();
                for (int i = 0; i < incl_Lines.Count; i++)
                {
                    dup.incl_Lines.Add(incl_Lines[i].DuplicatePolyCurve());
                    Point3dList inclLinepoint3Ds = new Point3dList(incLines_topo[i]);
                    dup.incLines_topo.Add(new List <Point3d>(inclLinepoint3Ds.Duplicate()));
                    dup.inclLines_topoType.Add(inclLines_topoType[i].ToList());
                }
            }
            if (m_prop != null)
            {
                dup.Property = m_prop.Duplicate();
            }

            Point3dList inclpoint3Ds = new Point3dList(incl_pts);

            dup.incl_pts = new List <Point3d>(inclpoint3Ds.Duplicate());

            dup.ID = m_id;

            if (m_prop != null)
            {
                dup.Property = m_prop.Duplicate();
            }

            return(dup);
        }
        public GsaMember2d Duplicate()
        {
            if (this == null)
            {
                return(null);
            }
            GsaMember2d dup = new GsaMember2d()
            {
                Member = new Member()
                {
                    Group            = m_member.Group,
                    IsDummy          = m_member.IsDummy,
                    MeshSize         = m_member.MeshSize,
                    Name             = m_member.Name.ToString(),
                    Offset           = m_member.Offset,
                    OrientationAngle = m_member.OrientationAngle,
                    OrientationNode  = m_member.OrientationNode,
                    Property         = m_member.Property,
                    Topology         = m_member.Topology.ToString(),
                    Type             = m_member.Type,  // GsaToModel.Member2dType((int)Member.Type),
                    Type2D           = m_member.Type2D //GsaToModel.AnalysisOrder((int) Member.Type2D)
                }
            };

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

            dup.Member.Offset.X1 = m_member.Offset.X1;
            dup.Member.Offset.X2 = m_member.Offset.X2;
            dup.Member.Offset.Y  = m_member.Offset.Y;
            dup.Member.Offset.Z  = m_member.Offset.Z;

            if (m_brep == null)
            {
                return(dup);
            }

            if (m_brep != null)
            {
                dup.m_brep = Brep.DuplicateBrep();
            }
            if (m_crv != null)
            {
                dup.m_crv = PolyCurve.DuplicatePolyCurve();
            }

            Point3dList point3Ds = new Point3dList(Topology);

            dup.Topology     = new List <Point3d>(point3Ds.Duplicate());
            dup.TopologyType = TopologyType.ToList();

            if (void_crvs != null)
            {
                dup.void_crvs     = new List <PolyCurve>();
                dup.void_topo     = new List <List <Point3d> >();
                dup.void_topoType = new List <List <string> >();
                for (int i = 0; i < void_crvs.Count; i++)
                {
                    dup.void_crvs.Add(void_crvs[i].DuplicatePolyCurve());
                    Point3dList voidpoint3Ds = new Point3dList(void_topo[i]);
                    dup.void_topo.Add(new List <Point3d>(voidpoint3Ds.Duplicate()));
                    dup.void_topoType.Add(void_topoType[i].ToList());
                }
            }

            if (incl_Lines != null)
            {
                dup.incl_Lines         = new List <PolyCurve>();
                dup.incLines_topo      = new List <List <Point3d> >();
                dup.inclLines_topoType = new List <List <string> >();
                for (int i = 0; i < incl_Lines.Count; i++)
                {
                    dup.incl_Lines.Add(incl_Lines[i].DuplicatePolyCurve());
                    Point3dList inclLinepoint3Ds = new Point3dList(incLines_topo[i]);
                    dup.incLines_topo.Add(new List <Point3d>(inclLinepoint3Ds.Duplicate()));
                    dup.inclLines_topoType.Add(inclLines_topoType[i].ToList());
                }
            }
            if (m_prop != null)
            {
                dup.Property = Property.Duplicate();
            }

            Point3dList inclpoint3Ds = new Point3dList(incl_pts);

            dup.incl_pts = new List <Point3d>(inclpoint3Ds.Duplicate());

            dup.ID = ID;

            return(dup);
        }
        public GsaMember1d Duplicate()
        {
            if (this == null)
            {
                return(null);
            }

            GsaMember1d dup = new GsaMember1d
            {
                Member = new Member
                {
                    Group            = m_member.Group,
                    IsDummy          = m_member.IsDummy,
                    MeshSize         = m_member.MeshSize,
                    Name             = m_member.Name.ToString(),
                    Offset           = m_member.Offset,
                    OrientationAngle = m_member.OrientationAngle,
                    OrientationNode  = m_member.OrientationNode,
                    Property         = m_member.Property,
                    Topology         = m_member.Topology.ToString(),
                    Type             = m_member.Type,  //GsaToModel.Member1dType((int)Member.Type),
                    Type1D           = m_member.Type1D //GsaToModel.Element1dType((int)Member.Type1D)
                }
            };

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

            dup.Member.Offset.X1 = m_member.Offset.X1;
            dup.Member.Offset.X2 = m_member.Offset.X2;
            dup.Member.Offset.Y  = m_member.Offset.Y;
            dup.Member.Offset.Z  = m_member.Offset.Z;

            if (m_crv != null)
            {
                dup.m_crv = m_crv.DuplicatePolyCurve();
            }

            Point3dList point3Ds = new Point3dList(m_topo);

            dup.Topology     = new List <Point3d>(point3Ds.Duplicate());
            dup.TopologyType = m_topoType.ToList();

            dup.ID = m_id;

            if (m_rel1 != null)
            {
                dup.ReleaseStart = m_rel1.Duplicate();
            }
            if (m_rel2 != null)
            {
                dup.ReleaseEnd = m_rel2.Duplicate();
            }
            if (m_section != null)
            {
                dup.Section = m_section.Duplicate();
            }

            return(dup);
        }