public Curve ToRhinoCrosssectionProfile(sFrame sb, double t)
        {
            sCrossSection scs      = sb.crossSection;
            List <sXYZ>   vertice  = new List <sXYZ>();
            sPlane        secPlane = new sPlane(sb.axis.PointAt(t), sb.localPlane.Xaxis, sb.localPlane.Yaxis);

            if (scs.sectionType == eSectionType.AISC_I_BEAM)
            {
                vertice = scs.GetWbeamFaceVertices(secPlane).ToList();
            }
            else if (scs.sectionType == eSectionType.HSS_REC)
            {
                vertice = scs.GetHSSRecFaceVertices_Simple(secPlane);
            }
            else if (scs.sectionType == eSectionType.HSS_ROUND)
            {
                vertice = scs.GetHSSRoundFaceVertices_Simple(secPlane);
            }
            else if (scs.sectionType == eSectionType.RECTANGLAR)
            {
                vertice = scs.GetRecFaceVertices_Simple(secPlane);
            }
            else if (scs.sectionType == eSectionType.SQUARE)
            {
                vertice = scs.GetSquareFaceVertices_Simple(secPlane);
            }
            else if (scs.sectionType == eSectionType.ROUND)
            {
                vertice = scs.GetRoundFaceVertices_Simple(secPlane);
            }

            Polyline pl = new Polyline();

            for (int i = 0; i < vertice.Count; ++i)
            {
                pl.Add(this.ToRhinoPoint3d(vertice[i]));
            }
            pl.Add(this.ToRhinoPoint3d(vertice[0]));
            Curve profile = pl.ToNurbsCurve();

            return(profile);
        }
示例#2
0
        internal Dyn.PolyCurve ToRhinoCrosssectionProfile(sFrame sb, double t)
        {
            sCrossSection scs      = sb.crossSection;
            List <sXYZ>   vertice  = new List <sXYZ>();
            sPlane        secPlane = new sPlane(sb.axis.PointAt(t), sb.localPlane.Xaxis, sb.localPlane.Yaxis);

            if (scs.sectionType == eSectionType.AISC_I_BEAM)
            {
                vertice = scs.GetWbeamFaceVertices(secPlane).ToList();
            }
            else if (scs.sectionType == eSectionType.HSS_REC)
            {
                vertice = scs.GetHSSRecFaceVertices_Simple(secPlane);
            }
            else if (scs.sectionType == eSectionType.HSS_ROUND)
            {
                vertice = scs.GetHSSRoundFaceVertices_Simple(secPlane);
            }
            else if (scs.sectionType == eSectionType.RECTANGLAR)
            {
                vertice = scs.GetRecFaceVertices_Simple(secPlane);
            }
            else if (scs.sectionType == eSectionType.SQUARE)
            {
                vertice = scs.GetSquareFaceVertices_Simple(secPlane);
            }
            else if (scs.sectionType == eSectionType.ROUND)
            {
                vertice = scs.GetRoundFaceVertices_Simple(secPlane);
            }

            List <Dyn.Point> dpts = new List <Autodesk.DesignScript.Geometry.Point>();

            for (int i = 0; i < vertice.Count; ++i)
            {
                dpts.Add(this.ToDynamoPoint(vertice[i]));
            }
            return(Dyn.PolyCurve.ByPoints(dpts, true));
        }