Esempio n. 1
0
        public static void WritePoly(this SectionDefinition sec, string filename)
        {
            var          poly = sec.BuildPolygon();
            TriangleFile fne  = new TriangleFile();

            fne.Write(poly, filename);
        }
Esempio n. 2
0
        public static void WriteMesh(this SectionDefinition sec, string filename)
        {
            var          poly = sec.BuildPolygon();
            var          mesh = sec.Triangulate(poly);
            TriangleFile fne  = new TriangleFile();

            fne.Write(mesh, filename);
        }
Esempio n. 3
0
        private static IMeshFile CreateProviderInstance(string ext)
        {
            // TODO: automate by using IMeshFormat's Extensions property.

            IMeshFile provider = null;

            if (ext == ".node" || ext == ".poly" || ext == ".ele")
            {
                provider = new TriangleFile();
            }

            if (provider == null)
            {
                throw new NotImplementedException("File format not implemented.");
            }

            container.Add(ext, provider);

            return(provider);
        }