public void Export(Mesh mesh, string filename, int width)
{
// Check file name
if (String.IsNullOrWhiteSpace(filename))
{
filename = String.Format("mesh-{0}.eps", DateTime.Now.ToString("yyyy-M-d-hh-mm-ss"));
}
if (!filename.EndsWith(".eps"))
{
filename = Path.ChangeExtension(filename, ".eps");
}
UpdateMetrics(mesh.Bounds);
using (StreamWriter eps = new StreamWriter(filename))
{
WriteHeader(filename, eps);
DrawClip(eps);
DrawTriangles(eps, mesh, false);
DrawSegments(eps, mesh);
DrawPoints(eps, mesh, false);
WriteTrailer(eps);
}
}