Пример #1
0
        public static global::Topologic.Face ToTopologic(this global::Rhino.Geometry.Surface surface)
        {
            if (surface == null)
            {
                return(null);
            }

            SumSurface sumSurface = surface as SumSurface;

            if (sumSurface != null)
            {
                return(sumSurface.ToTopologic());
            }

            RevSurface revSurface = surface as RevSurface;

            if (revSurface != null)
            {
                return(revSurface.ToTopologic());
            }

            PlaneSurface planeSurface = surface as PlaneSurface;

            if (planeSurface != null)
            {
                return(planeSurface.ToTopologic());
            }

            Extrusion ghExtrusion = surface as Extrusion;

            if (ghExtrusion != null)
            {
                return(ghExtrusion.ToTopologic());
            }

            global::Rhino.Geometry.NurbsSurface ghNurbsSurface = surface as global::Rhino.Geometry.NurbsSurface;
            if (ghNurbsSurface != null)
            {
                return(ghNurbsSurface.ToTopologic());
            }


            return(null);
        }