public static void WritePoly(this SectionDefinition sec, string filename) { var poly = sec.BuildPolygon(); TriangleFile fne = new TriangleFile(); fne.Write(poly, filename); }
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); }
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); }