private void BuildMeshes(String fileName) { // Read Input XML and build geometry this.geo = new Mesh.Geometry(directoryPath + fileName); // Subscribe to add and remove triangle events this.geo.TriangleAdded += geo_TriangleAdded; try { this.geo.Load(); } catch (ApplicationException appEx) { MessageBox.Show(appEx.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); } catch (Exception) { MessageBox.Show("Error while reading input file", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } // Build meshes based on geometry try { this.geo.BuildMeshes(); } catch (ApplicationException appEx) { MessageBox.Show(appEx.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); } catch (Exception) { MessageBox.Show("Error while building mesh", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } this.geo.SaveVTK(); }
public Region(Geometry geo) { this.Contours = new List<Contour>(); this.Geo = geo; }