Exemplo n.º 1
0
        public static global::Topologic.Face ToTopologic(this 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());
            }

            Rhino.Geometry.Extrusion ghExtrusion = surface as Rhino.Geometry.Extrusion;
            if (ghExtrusion != null)
            {
                return(ghExtrusion.ToTopologic());
            }

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


            return(null);
        }