From fcb6057f3dfdb334a0a004850fb491c24b0a34b1 Mon Sep 17 00:00:00 2001 From: "SND\\wo80_cp" Date: Wed, 20 Jun 2012 19:24:53 +0000 Subject: [PATCH] Code cleanup for Beta 2 git-svn-id: https://triangle.svn.codeplex.com/svn@68260 0e2699bc-83d4-4a8f-98e7-55e24ab8c7a5 --- .../TestApp/Controls/AngleHistogram.cs | 21 +- Triangle.NET/TestApp/Controls/ColorScheme.cs | 4 +- Triangle.NET/TestApp/Controls/DarkButton.cs | 35 ++- Triangle.NET/TestApp/Controls/DarkCheckBox.cs | 13 +- Triangle.NET/TestApp/Controls/DarkListBox.cs | 22 +- Triangle.NET/TestApp/Controls/DarkSlider.cs | 9 +- .../TestApp/Controls/DarkTabControl.cs | 28 +- Triangle.NET/TestApp/Controls/DarkTextBox.cs | 11 +- .../TestApp/Controls/DarkToolStripRenderer.cs | 4 +- .../TestApp/Controls/RendererControl.cs | 44 ++- Triangle.NET/TestApp/FormExport.cs | 7 +- Triangle.NET/TestApp/FormMain.Designer.cs | 292 +++++++++--------- Triangle.NET/TestApp/FormMain.cs | 19 +- Triangle.NET/TestApp/Generators/IGenerator.cs | 2 +- .../TestApp/Generators/RandomPoints.cs | 2 +- .../TestApp/Generators/RandomPointsCircle.cs | 6 +- .../TestApp/Generators/RingPolygon.cs | 6 +- Triangle.NET/TestApp/Generators/StarInBox.cs | 4 +- Triangle.NET/TestApp/IO/EpsImage.cs | 29 +- Triangle.NET/TestApp/IO/FileProcessor.cs | 18 +- Triangle.NET/TestApp/IO/Formats/DatFile.cs | 4 +- Triangle.NET/TestApp/IO/Formats/JsonFile.cs | 4 +- .../TestApp/IO/Formats/TriangleFile.cs | 4 +- Triangle.NET/TestApp/IO/IMeshFile.cs | 4 +- Triangle.NET/TestApp/IO/RasterImage.cs | 12 +- Triangle.NET/TestApp/IO/SvgImage.cs | 46 +-- .../TestApp/Rendering/MeshRenderer.cs | 132 ++++---- .../TestApp/Rendering/RenderColors.cs | 2 +- Triangle.NET/TestApp/Rendering/RenderData.cs | 14 +- .../TestApp/Rendering/VoronoiRenderer.cs | 14 +- Triangle.NET/TestApp/Rendering/Zoom.cs | 74 ++--- Triangle.NET/TestApp/Settings.cs | 4 +- Triangle.NET/TestApp/Util.cs | 2 +- Triangle.NET/Triangle/Algorithm/Dwyer.cs | 4 +- .../Triangle/Algorithm/ITriangulator.cs | 2 +- .../Triangle/Algorithm/Incremental.cs | 2 +- Triangle.NET/Triangle/Algorithm/SweepLine.cs | 2 +- Triangle.NET/Triangle/BadTriQueue.cs | 2 +- Triangle.NET/Triangle/Behavior.cs | 2 +- Triangle.NET/Triangle/Carver.cs | 2 +- Triangle.NET/Triangle/Data/BadSubseg.cs | 2 +- Triangle.NET/Triangle/Data/BadTriangle.cs | 2 +- Triangle.NET/Triangle/Data/Osub.cs | 2 +- Triangle.NET/Triangle/Data/Otri.cs | 2 +- Triangle.NET/Triangle/Data/Segment.cs | 9 +- Triangle.NET/Triangle/Data/Triangle.cs | 18 +- Triangle.NET/Triangle/Data/Vertex.cs | 2 +- Triangle.NET/Triangle/Enums.cs | 2 +- Triangle.NET/Triangle/Geometry/BoundingBox.cs | 4 +- Triangle.NET/Triangle/Geometry/Edge.cs | 2 +- .../Triangle/Geometry/EdgeEnumerator.cs | 2 +- Triangle.NET/Triangle/Geometry/ITriangle.cs | 16 +- .../Triangle/Geometry/InputGeometry.cs | 2 +- Triangle.NET/Triangle/Geometry/Point.cs | 4 +- .../Triangle/Geometry/RegionPointer.cs | 2 +- Triangle.NET/Triangle/IO/DataReader.cs | 4 +- Triangle.NET/Triangle/IO/DebugWriter.cs | 2 +- Triangle.NET/Triangle/IO/FileReader.cs | 4 +- Triangle.NET/Triangle/IO/FileWriter.cs | 4 +- Triangle.NET/Triangle/IO/IGeometryFormat.cs | 4 +- Triangle.NET/Triangle/IO/IMeshFormat.cs | 2 +- Triangle.NET/Triangle/IO/InputTriangle.cs | 13 +- Triangle.NET/Triangle/IO/TriangleFormat.cs | 2 +- Triangle.NET/Triangle/Log/ILog.cs | 4 +- Triangle.NET/Triangle/Log/ILogItem.cs | 4 +- Triangle.NET/Triangle/Log/SimpleLog.cs | 4 +- Triangle.NET/Triangle/Log/SimpleLogItem.cs | 4 +- Triangle.NET/Triangle/Mesh.cs | 2 +- Triangle.NET/Triangle/NewLocation.cs | 2 +- Triangle.NET/Triangle/Primitives.cs | 2 +- Triangle.NET/Triangle/Quality.cs | 4 +- Triangle.NET/Triangle/Sampler.cs | 2 +- Triangle.NET/Triangle/Smoothing/ISmoother.cs | 8 +- Triangle.NET/Triangle/Tools/BoundedVoronoi.cs | 2 +- Triangle.NET/Triangle/Tools/QualityMeasure.cs | 6 +- Triangle.NET/Triangle/Tools/Statistic.cs | 2 +- Triangle.NET/Triangle/Tools/Voronoi.cs | 2 +- 77 files changed, 611 insertions(+), 451 deletions(-) diff --git a/Triangle.NET/TestApp/Controls/AngleHistogram.cs b/Triangle.NET/TestApp/Controls/AngleHistogram.cs index 1dac085..8bc8135 100644 --- a/Triangle.NET/TestApp/Controls/AngleHistogram.cs +++ b/Triangle.NET/TestApp/Controls/AngleHistogram.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -18,9 +18,9 @@ namespace MeshExplorer.Controls /// Displays an angle histogram. /// /// - /// The angle histogram is divided into two parts: - /// the minimum angles on the left side (0 to 60 degrees) and - /// the maximum angles on the right (60 to 180 degrees) + /// The angle histogram is divided into two parts: the minimum angles + /// on the left side (0 to 60 degrees) and the maximum angles on the + /// right (60 to 180 degrees). /// public class AngleHistogram : Control { @@ -70,12 +70,18 @@ namespace MeshExplorer.Controls // The maximum number of angles int maxAngleCount = 0; + /// + /// Initializes a new instance of the control. + /// public AngleHistogram() { this.BackColor = ColorScheme.ColorGray78; InitializeComponent(); } + /// + /// Updates the histogram data and invalidates the control. + /// public void SetData(int[] dataMin, int[] dataMax) { maxAngleCount = 0; @@ -89,7 +95,6 @@ namespace MeshExplorer.Controls if (maxAngleCount == 0) { this.maxAngles = null; - return; } this.Invalidate(); @@ -144,7 +149,9 @@ namespace MeshExplorer.Controls } } - + /// + /// Draws the labels on the bottom. + /// private void DrawStrings(Graphics g, SizeF fSize, int size, int middle) { int fHeight = (int)(fSize.Height + 2); diff --git a/Triangle.NET/TestApp/Controls/ColorScheme.cs b/Triangle.NET/TestApp/Controls/ColorScheme.cs index 87af8ac..3486b90 100644 --- a/Triangle.NET/TestApp/Controls/ColorScheme.cs +++ b/Triangle.NET/TestApp/Controls/ColorScheme.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -13,7 +13,7 @@ namespace MeshExplorer.Controls using System.Drawing; /// - /// TODO: Update summary. + /// Dark user interface color scheme. /// public static class ColorScheme { diff --git a/Triangle.NET/TestApp/Controls/DarkButton.cs b/Triangle.NET/TestApp/Controls/DarkButton.cs index ac8c5e6..69d4f07 100644 --- a/Triangle.NET/TestApp/Controls/DarkButton.cs +++ b/Triangle.NET/TestApp/Controls/DarkButton.cs @@ -1,14 +1,18 @@ - +// ----------------------------------------------------------------------- +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- namespace MeshExplorer.Controls { - using System; - using System.Collections.Generic; - using System.ComponentModel; - using System.Drawing; - using System.Drawing.Drawing2D; - using System.Text; - using System.Windows.Forms; + using System; + using System.Collections.Generic; + using System.ComponentModel; + using System.Drawing; + using System.Drawing.Drawing2D; + using System.Text; + using System.Windows.Forms; public class DarkButton : Button { @@ -50,20 +54,23 @@ namespace MeshExplorer.Controls enum eButtonState { Normal, MouseOver, Down } eButtonState m_State = eButtonState.Normal; - // make sure the control is invalidated(repainted) when the text is changed + // Make sure the control is invalidated when the text is changed. public override string Text { get { return base.Text; } set { base.Text = value; this.Invalidate(); } } - //-------------------------------------------------------------------------------- + /// + /// Initializes a new instance of the control. + /// public DarkButton() { InitializeComponent(); } - //-------------------------------------------------------------------------------- + #region Control overrides + protected override void OnPaint(PaintEventArgs e) { e.Graphics.SmoothingMode = SmoothingMode.HighQuality; @@ -150,7 +157,6 @@ namespace MeshExplorer.Controls brushBorder.Dispose(); } - //-------------------------------------------------------------------------------- protected override void OnMouseLeave(System.EventArgs e) { m_State = eButtonState.Normal; @@ -158,7 +164,6 @@ namespace MeshExplorer.Controls base.OnMouseLeave(e); } - //-------------------------------------------------------------------------------- protected override void OnMouseEnter(System.EventArgs e) { m_State = eButtonState.MouseOver; @@ -166,7 +171,6 @@ namespace MeshExplorer.Controls base.OnMouseEnter(e); } - //-------------------------------------------------------------------------------- protected override void OnMouseUp(System.Windows.Forms.MouseEventArgs e) { m_State = eButtonState.MouseOver; @@ -174,12 +178,13 @@ namespace MeshExplorer.Controls base.OnMouseUp(e); } - //-------------------------------------------------------------------------------- protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e) { m_State = eButtonState.Down; this.Invalidate(); base.OnMouseDown(e); } + + #endregion } } \ No newline at end of file diff --git a/Triangle.NET/TestApp/Controls/DarkCheckBox.cs b/Triangle.NET/TestApp/Controls/DarkCheckBox.cs index 3dae1cd..eb786c9 100644 --- a/Triangle.NET/TestApp/Controls/DarkCheckBox.cs +++ b/Triangle.NET/TestApp/Controls/DarkCheckBox.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -11,11 +11,11 @@ namespace MeshExplorer.Controls using System.Text; using System.Drawing; using System.Drawing.Drawing2D; - using System.Drawing.Text; using System.Windows.Forms; + using System.Drawing.Text; /// - /// TODO: Update summary. + /// Dark checkbox control. /// public class DarkCheckBox : ButtonBase { @@ -74,14 +74,14 @@ namespace MeshExplorer.Controls } /// - /// Constructor. + /// Initializes a new instance of the control. /// public DarkCheckBox() { this.BackColor = Color.FromArgb(76, 76, 76); InitializeComponent(); } - + #region Control overrides protected override void OnPaint(PaintEventArgs e) @@ -158,6 +158,7 @@ namespace MeshExplorer.Controls if (this.isChecked) { e.Graphics.SmoothingMode = SmoothingMode.HighQuality; + e.Graphics.DrawLine(checkMark, 4, newRect.Bottom - boxSize / 2, newRect.Left + boxSize / 2.5f, newRect.Bottom - 2); e.Graphics.DrawLine(checkMark, newRect.Left + boxSize / 2.6f, newRect.Bottom - 2, newRect.Right, newRect.Top); } diff --git a/Triangle.NET/TestApp/Controls/DarkListBox.cs b/Triangle.NET/TestApp/Controls/DarkListBox.cs index 5bc1918..a927deb 100644 --- a/Triangle.NET/TestApp/Controls/DarkListBox.cs +++ b/Triangle.NET/TestApp/Controls/DarkListBox.cs @@ -1,15 +1,27 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Windows.Forms; -using System.Drawing; +// ----------------------------------------------------------------------- +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ +// +// ----------------------------------------------------------------------- namespace MeshExplorer.Controls { + using System; + using System.Collections.Generic; + using System.Text; + using System.Windows.Forms; + using System.Drawing; + + /// + /// Dark listbox control. + /// public class DarkListBox : ListBox { Font _boldFont; + /// + /// Initializes a new instance of the control. + /// public DarkListBox() { _boldFont = new Font(base.Font.FontFamily, base.Font.Size, FontStyle.Bold); diff --git a/Triangle.NET/TestApp/Controls/DarkSlider.cs b/Triangle.NET/TestApp/Controls/DarkSlider.cs index d0da2d0..d2f67ac 100644 --- a/Triangle.NET/TestApp/Controls/DarkSlider.cs +++ b/Triangle.NET/TestApp/Controls/DarkSlider.cs @@ -1,6 +1,7 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ +// Original code on CodeProject: Owner-drawn trackbar (slider), Michal Brylka // // ----------------------------------------------------------------------- @@ -14,8 +15,6 @@ namespace MeshExplorer.Controls using System.Drawing; using System.Drawing.Drawing2D; - // CodeProject: Owner-drawn trackbar (slider), Michal Brylka - /// /// Encapsulates control that visualy displays certain integer value and allows user to change /// it within desired range. It imitates as far as @@ -194,7 +193,7 @@ namespace MeshExplorer.Controls #region Constructors /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the control. /// public DarkSlider() { diff --git a/Triangle.NET/TestApp/Controls/DarkTabControl.cs b/Triangle.NET/TestApp/Controls/DarkTabControl.cs index b191563..addea6c 100644 --- a/Triangle.NET/TestApp/Controls/DarkTabControl.cs +++ b/Triangle.NET/TestApp/Controls/DarkTabControl.cs @@ -1,16 +1,21 @@ -using System; -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; -using System.Drawing.Text; - -// CodeProject: A .NET Flat TabControl (CustomDraw), Oscar Londono +// ----------------------------------------------------------------------- +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ +// Original code on CodeProject: A .NET Flat TabControl (CustomDraw), Oscar Londono +// +// ----------------------------------------------------------------------- namespace MeshExplorer.Controls { - /// - /// Summary description for FlatTabControl. - /// + using System; + using System.ComponentModel; + using System.Drawing; + using System.Windows.Forms; + using System.Drawing.Text; + + /// + /// Summary description for FlatTabControl. + /// public class DarkTabControl : System.Windows.Forms.TabControl { #region Designer @@ -51,6 +56,9 @@ namespace MeshExplorer.Controls private const int margin = 5; private Color backColor = ColorScheme.ColorGray68; + /// + /// Initializes a new instance of the control. + /// public DarkTabControl() { // This call is required by the Windows.Forms Form Designer. diff --git a/Triangle.NET/TestApp/Controls/DarkTextBox.cs b/Triangle.NET/TestApp/Controls/DarkTextBox.cs index 4d68107..bfd759b 100644 --- a/Triangle.NET/TestApp/Controls/DarkTextBox.cs +++ b/Triangle.NET/TestApp/Controls/DarkTextBox.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -13,9 +13,11 @@ namespace MeshExplorer.Controls using System.Drawing.Drawing2D; using System.Windows.Forms; + /// + /// Dark textbox control. + /// public class DarkTextBox : Control { - #region Designer /// @@ -73,6 +75,9 @@ namespace MeshExplorer.Controls TextBox textBox; + /// + /// Initializes a new instance of the control. + /// public DarkTextBox() { InitializeComponent(); diff --git a/Triangle.NET/TestApp/Controls/DarkToolStripRenderer.cs b/Triangle.NET/TestApp/Controls/DarkToolStripRenderer.cs index 2d09d35..c0ce39e 100644 --- a/Triangle.NET/TestApp/Controls/DarkToolStripRenderer.cs +++ b/Triangle.NET/TestApp/Controls/DarkToolStripRenderer.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -15,7 +15,7 @@ namespace MeshExplorer.Controls using System.Drawing.Drawing2D; /// - /// TODO: Update summary. + /// Toolstrip render for dark menu. /// public class DarkToolStripRenderer : ToolStripRenderer { diff --git a/Triangle.NET/TestApp/Controls/RendererControl.cs b/Triangle.NET/TestApp/Controls/RendererControl.cs index 6f75362..9eb49e2 100644 --- a/Triangle.NET/TestApp/Controls/RendererControl.cs +++ b/Triangle.NET/TestApp/Controls/RendererControl.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -42,7 +42,17 @@ namespace MeshExplorer.Controls Timer timer; - public RenderData Data { get { return data; } } + /// + /// Gets the currently displayed . + /// + public RenderData Data + { + get { return data; } + } + + /// + /// Indicates whether to show the voronoi diagram or not. + /// public bool ShowVoronoi { get { return showVoronoi; } @@ -59,6 +69,9 @@ namespace MeshExplorer.Controls } } + /// + /// Initializes a new instance of the class. + /// public RendererControl() { SetStyle(ControlStyles.ResizeRedraw, true); @@ -81,6 +94,9 @@ namespace MeshExplorer.Controls }; } + /// + /// Initialize the graphics buffer (should be called in the forms load event). + /// public void Initialize() { zoom.Initialize(this.ClientRectangle, this.ClientRectangle); @@ -91,9 +107,12 @@ namespace MeshExplorer.Controls this.Invalidate(); } - public void SetData(InputGeometry mesh) + /// + /// Updates the displayed input data. + /// + public void SetData(InputGeometry geometry) { - data.SetData(mesh); + data.SetData(geometry); meshRenderer = new MeshRenderer(data); @@ -105,6 +124,10 @@ namespace MeshExplorer.Controls this.Render(); } + /// + /// Updates the displayed mesh data. + /// + /// If true, the zoom will be reset. public void SetData(Mesh mesh, bool initZoom) { data.SetData(mesh); @@ -128,11 +151,19 @@ namespace MeshExplorer.Controls this.Render(); } + /// + /// Updates the displayed input data. + /// public void SetData(Mesh mesh) { SetData(mesh, false); } + /// + /// Zoom to the given location. + /// + /// The zoom focus. + /// Indicates whether to zoom in or out. public void Zoom(PointF location, int delta) { if (!initialized) return; @@ -144,6 +175,9 @@ namespace MeshExplorer.Controls } } + /// + /// Update graphics buffer and zoom after a resize. + /// public void HandleResize() { zoom.Resize(this.ClientRectangle, data.Bounds); diff --git a/Triangle.NET/TestApp/FormExport.cs b/Triangle.NET/TestApp/FormExport.cs index 370ca8d..5cc7dcd 100644 --- a/Triangle.NET/TestApp/FormExport.cs +++ b/Triangle.NET/TestApp/FormExport.cs @@ -26,11 +26,8 @@ namespace MeshExplorer { get { - string s = lbSize.Text; - s = s.Substring(0, s.Length - 3); - int size = 0; - int.TryParse(s, out size); - return size; + int size = (int)darkSlider1.Value; + return 18 * size + 200; } } diff --git a/Triangle.NET/TestApp/FormMain.Designer.cs b/Triangle.NET/TestApp/FormMain.Designer.cs index 1d865ff..ba37d72 100644 --- a/Triangle.NET/TestApp/FormMain.Designer.cs +++ b/Triangle.NET/TestApp/FormMain.Designer.cs @@ -29,21 +29,6 @@ private void InitializeComponent() { this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.menuFile = new System.Windows.Forms.ToolStripMenuItem(); - this.menuFileOpen = new System.Windows.Forms.ToolStripMenuItem(); - this.menuFileSave = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); - this.menuFileExport = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.menuFileQuit = new System.Windows.Forms.ToolStripMenuItem(); - this.menuView = new System.Windows.Forms.ToolStripMenuItem(); - this.menuViewVoronoi = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.menuViewLog = new System.Windows.Forms.ToolStripMenuItem(); - this.menuTools = new System.Windows.Forms.ToolStripMenuItem(); - this.menuToolsGen = new System.Windows.Forms.ToolStripMenuItem(); - this.menuToolsCheck = new System.Windows.Forms.ToolStripMenuItem(); this.btnSmooth = new MeshExplorer.Controls.DarkButton(); this.flatTabControl1 = new MeshExplorer.Controls.DarkTabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); @@ -101,17 +86,32 @@ this.label18 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); this.lbShortcuts = new System.Windows.Forms.Label(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.menuFile = new System.Windows.Forms.ToolStripMenuItem(); + this.menuFileOpen = new System.Windows.Forms.ToolStripMenuItem(); + this.menuFileSave = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); + this.menuFileExport = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.menuFileQuit = new System.Windows.Forms.ToolStripMenuItem(); + this.menuView = new System.Windows.Forms.ToolStripMenuItem(); + this.menuViewVoronoi = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.menuViewLog = new System.Windows.Forms.ToolStripMenuItem(); + this.menuTools = new System.Windows.Forms.ToolStripMenuItem(); + this.menuToolsGen = new System.Windows.Forms.ToolStripMenuItem(); + this.menuToolsCheck = new System.Windows.Forms.ToolStripMenuItem(); this.btnMesh = new MeshExplorer.Controls.DarkButton(); this.renderControl1 = new MeshExplorer.Controls.RendererControl(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); - this.menuStrip1.SuspendLayout(); this.flatTabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.tabPage3.SuspendLayout(); + this.menuStrip1.SuspendLayout(); this.SuspendLayout(); // // splitContainer1 @@ -140,133 +140,6 @@ this.splitContainer1.SplitterWidth = 1; this.splitContainer1.TabIndex = 0; // - // menuStrip1 - // - this.menuStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.menuStrip1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.menuStrip1.GripMargin = new System.Windows.Forms.Padding(0); - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.menuFile, - this.menuView, - this.menuTools}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Padding = new System.Windows.Forms.Padding(0); - this.menuStrip1.Size = new System.Drawing.Size(280, 24); - this.menuStrip1.TabIndex = 0; - this.menuStrip1.Text = "menuStrip1"; - // - // menuFile - // - this.menuFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.menuFile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.menuFileOpen, - this.menuFileSave, - this.toolStripSeparator3, - this.menuFileExport, - this.toolStripSeparator2, - this.menuFileQuit}); - this.menuFile.Name = "menuFile"; - this.menuFile.Size = new System.Drawing.Size(37, 24); - this.menuFile.Text = "File"; - // - // menuFileOpen - // - this.menuFileOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.menuFileOpen.Name = "menuFileOpen"; - this.menuFileOpen.Size = new System.Drawing.Size(141, 22); - this.menuFileOpen.Text = "Open"; - this.menuFileOpen.Click += new System.EventHandler(this.menuFileOpen_Click); - // - // menuFileSave - // - this.menuFileSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.menuFileSave.Enabled = false; - this.menuFileSave.Name = "menuFileSave"; - this.menuFileSave.Size = new System.Drawing.Size(141, 22); - this.menuFileSave.Text = "Save"; - this.menuFileSave.Click += new System.EventHandler(this.menuFileSave_Click); - // - // toolStripSeparator3 - // - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.Size = new System.Drawing.Size(138, 6); - // - // menuFileExport - // - this.menuFileExport.Enabled = false; - this.menuFileExport.Name = "menuFileExport"; - this.menuFileExport.Size = new System.Drawing.Size(141, 22); - this.menuFileExport.Text = "Export Image"; - this.menuFileExport.Click += new System.EventHandler(this.menuFileExport_Click); - // - // toolStripSeparator2 - // - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.Size = new System.Drawing.Size(138, 6); - // - // menuFileQuit - // - this.menuFileQuit.Name = "menuFileQuit"; - this.menuFileQuit.Size = new System.Drawing.Size(141, 22); - this.menuFileQuit.Text = "Quit"; - this.menuFileQuit.Click += new System.EventHandler(this.menuFileQuit_Click); - // - // menuView - // - this.menuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.menuViewVoronoi, - this.toolStripSeparator1, - this.menuViewLog}); - this.menuView.Name = "menuView"; - this.menuView.Size = new System.Drawing.Size(44, 24); - this.menuView.Text = "View"; - // - // menuViewVoronoi - // - this.menuViewVoronoi.Enabled = false; - this.menuViewVoronoi.Name = "menuViewVoronoi"; - this.menuViewVoronoi.Size = new System.Drawing.Size(162, 22); - this.menuViewVoronoi.Text = "Voronoi Diagram"; - this.menuViewVoronoi.Click += new System.EventHandler(this.menuViewVoronoi_Click); - // - // toolStripSeparator1 - // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(159, 6); - // - // menuViewLog - // - this.menuViewLog.Name = "menuViewLog"; - this.menuViewLog.Size = new System.Drawing.Size(162, 22); - this.menuViewLog.Text = "Show Log"; - this.menuViewLog.Click += new System.EventHandler(this.menuViewLog_Click); - // - // menuTools - // - this.menuTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.menuToolsGen, - this.menuToolsCheck}); - this.menuTools.Name = "menuTools"; - this.menuTools.Size = new System.Drawing.Size(46, 24); - this.menuTools.Text = "Tools"; - // - // menuToolsGen - // - this.menuToolsGen.Name = "menuToolsGen"; - this.menuToolsGen.Size = new System.Drawing.Size(157, 22); - this.menuToolsGen.Text = "Input Generator"; - this.menuToolsGen.Click += new System.EventHandler(this.menuToolsGenerator_Click); - // - // menuToolsCheck - // - this.menuToolsCheck.Enabled = false; - this.menuToolsCheck.Name = "menuToolsCheck"; - this.menuToolsCheck.Size = new System.Drawing.Size(157, 22); - this.menuToolsCheck.Text = "Check Mesh"; - this.menuToolsCheck.Click += new System.EventHandler(this.menuToolsCheck_Click); - // // btnSmooth // this.btnSmooth.Enabled = false; @@ -882,7 +755,7 @@ this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(134, 40); this.label19.TabIndex = 0; - this.label19.Text = "Beta 2 (2012-06-11)\r\nChristian Woltering\r\nMIT"; + this.label19.Text = "Beta 2 (2012-06-20)\r\nChristian Woltering\r\nMIT"; // // label18 // @@ -914,6 +787,133 @@ this.lbShortcuts.Text = "F3\r\nF4\r\nF5\r\n\r\nF8\r\nF9\r\n\r\nF12"; this.lbShortcuts.TextAlign = System.Drawing.ContentAlignment.TopRight; // + // menuStrip1 + // + this.menuStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.menuStrip1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.menuStrip1.GripMargin = new System.Windows.Forms.Padding(0); + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuFile, + this.menuView, + this.menuTools}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Padding = new System.Windows.Forms.Padding(0); + this.menuStrip1.Size = new System.Drawing.Size(280, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // menuFile + // + this.menuFile.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.menuFile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.menuFile.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuFileOpen, + this.menuFileSave, + this.toolStripSeparator3, + this.menuFileExport, + this.toolStripSeparator2, + this.menuFileQuit}); + this.menuFile.Name = "menuFile"; + this.menuFile.Size = new System.Drawing.Size(37, 24); + this.menuFile.Text = "File"; + // + // menuFileOpen + // + this.menuFileOpen.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.menuFileOpen.Name = "menuFileOpen"; + this.menuFileOpen.Size = new System.Drawing.Size(141, 22); + this.menuFileOpen.Text = "Open"; + this.menuFileOpen.Click += new System.EventHandler(this.menuFileOpen_Click); + // + // menuFileSave + // + this.menuFileSave.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.menuFileSave.Enabled = false; + this.menuFileSave.Name = "menuFileSave"; + this.menuFileSave.Size = new System.Drawing.Size(141, 22); + this.menuFileSave.Text = "Save"; + this.menuFileSave.Click += new System.EventHandler(this.menuFileSave_Click); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(138, 6); + // + // menuFileExport + // + this.menuFileExport.Enabled = false; + this.menuFileExport.Name = "menuFileExport"; + this.menuFileExport.Size = new System.Drawing.Size(141, 22); + this.menuFileExport.Text = "Export Image"; + this.menuFileExport.Click += new System.EventHandler(this.menuFileExport_Click); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(138, 6); + // + // menuFileQuit + // + this.menuFileQuit.Name = "menuFileQuit"; + this.menuFileQuit.Size = new System.Drawing.Size(141, 22); + this.menuFileQuit.Text = "Quit"; + this.menuFileQuit.Click += new System.EventHandler(this.menuFileQuit_Click); + // + // menuView + // + this.menuView.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuViewVoronoi, + this.toolStripSeparator1, + this.menuViewLog}); + this.menuView.Name = "menuView"; + this.menuView.Size = new System.Drawing.Size(44, 24); + this.menuView.Text = "View"; + // + // menuViewVoronoi + // + this.menuViewVoronoi.Enabled = false; + this.menuViewVoronoi.Name = "menuViewVoronoi"; + this.menuViewVoronoi.Size = new System.Drawing.Size(162, 22); + this.menuViewVoronoi.Text = "Voronoi Diagram"; + this.menuViewVoronoi.Click += new System.EventHandler(this.menuViewVoronoi_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(159, 6); + // + // menuViewLog + // + this.menuViewLog.Name = "menuViewLog"; + this.menuViewLog.Size = new System.Drawing.Size(162, 22); + this.menuViewLog.Text = "Show Log"; + this.menuViewLog.Click += new System.EventHandler(this.menuViewLog_Click); + // + // menuTools + // + this.menuTools.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.menuToolsGen, + this.menuToolsCheck}); + this.menuTools.Name = "menuTools"; + this.menuTools.Size = new System.Drawing.Size(46, 24); + this.menuTools.Text = "Tools"; + // + // menuToolsGen + // + this.menuToolsGen.Name = "menuToolsGen"; + this.menuToolsGen.Size = new System.Drawing.Size(157, 22); + this.menuToolsGen.Text = "Input Generator"; + this.menuToolsGen.Click += new System.EventHandler(this.menuToolsGenerator_Click); + // + // menuToolsCheck + // + this.menuToolsCheck.Enabled = false; + this.menuToolsCheck.Name = "menuToolsCheck"; + this.menuToolsCheck.Size = new System.Drawing.Size(157, 22); + this.menuToolsCheck.Text = "Check Mesh"; + this.menuToolsCheck.Click += new System.EventHandler(this.menuToolsCheck_Click); + // // btnMesh // this.btnMesh.Enabled = false; @@ -960,8 +960,6 @@ this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); this.flatTabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); @@ -969,6 +967,8 @@ this.tabPage2.PerformLayout(); this.tabPage3.ResumeLayout(false); this.tabPage3.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); this.ResumeLayout(false); } diff --git a/Triangle.NET/TestApp/FormMain.cs b/Triangle.NET/TestApp/FormMain.cs index 5308f1b..89ad7c1 100644 --- a/Triangle.NET/TestApp/FormMain.cs +++ b/Triangle.NET/TestApp/FormMain.cs @@ -73,6 +73,7 @@ namespace MeshExplorer if (input != null) { + settings.CurrentFile = "GEN"; HandleNewInput(); } } @@ -176,6 +177,22 @@ namespace MeshExplorer lbNumSeg.Text = input.Segments.Count().ToString(); lbNumTri.Text = "0"; //input.Triangles == null ? "0" : input.Triangles.Length.ToString(); + // Statistics labels + lbAreaMin.Text = "-"; + lbAreaMax.Text = "-"; + lbEdgeMin.Text = "-"; + lbEdgeMax.Text = "-"; + lbAngleMin.Text = "-"; + lbAngleMax.Text = "-"; + + // Quality labels + lbQualAlphaMin.Text = "-"; + lbQualAlphaAve.Text = "-"; + lbQualAspectMin.Text = "-"; + lbQualAspectAve.Text = "-"; + + angleHistogram1.SetData(null, null); + // Reset buttons btnMesh.Enabled = true; btnMesh.Text = "Triangulate"; @@ -402,7 +419,7 @@ namespace MeshExplorer if (cbQuality.Checked) { btnMesh.Text = "Refine"; - btnSmooth.Enabled = true; + //btnSmooth.Enabled = true; } } else if (cbQuality.Checked) diff --git a/Triangle.NET/TestApp/Generators/IGenerator.cs b/Triangle.NET/TestApp/Generators/IGenerator.cs index 623e4f6..426ba97 100644 --- a/Triangle.NET/TestApp/Generators/IGenerator.cs +++ b/Triangle.NET/TestApp/Generators/IGenerator.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/TestApp/Generators/RandomPoints.cs b/Triangle.NET/TestApp/Generators/RandomPoints.cs index 6bec853..15f6f8f 100644 --- a/Triangle.NET/TestApp/Generators/RandomPoints.cs +++ b/Triangle.NET/TestApp/Generators/RandomPoints.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/TestApp/Generators/RandomPointsCircle.cs b/Triangle.NET/TestApp/Generators/RandomPointsCircle.cs index eaac1d7..8abfa4d 100644 --- a/Triangle.NET/TestApp/Generators/RandomPointsCircle.cs +++ b/Triangle.NET/TestApp/Generators/RandomPointsCircle.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -13,7 +13,7 @@ namespace MeshExplorer.Generators using TriangleNet.Geometry; /// - /// Simple random points generator. + /// Simple random points generator (points distributed in a circle). /// public class RandomPointsCircle : IGenerator { diff --git a/Triangle.NET/TestApp/Generators/RingPolygon.cs b/Triangle.NET/TestApp/Generators/RingPolygon.cs index 7bb87aa..00049a1 100644 --- a/Triangle.NET/TestApp/Generators/RingPolygon.cs +++ b/Triangle.NET/TestApp/Generators/RingPolygon.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -13,7 +13,7 @@ namespace MeshExplorer.Generators using TriangleNet.Geometry; /// - /// TODO: Update summary. + /// Generates a ring polygon. /// public class RingPolygon : IGenerator { diff --git a/Triangle.NET/TestApp/Generators/StarInBox.cs b/Triangle.NET/TestApp/Generators/StarInBox.cs index e9f4307..ddfd762 100644 --- a/Triangle.NET/TestApp/Generators/StarInBox.cs +++ b/Triangle.NET/TestApp/Generators/StarInBox.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -13,7 +13,7 @@ namespace MeshExplorer.Generators using TriangleNet.Geometry; /// - /// TODO: Update summary. + /// Generates a star contained in a box. /// public class StarInBox : IGenerator { diff --git a/Triangle.NET/TestApp/IO/EpsImage.cs b/Triangle.NET/TestApp/IO/EpsImage.cs index 48ba990..851e334 100644 --- a/Triangle.NET/TestApp/IO/EpsImage.cs +++ b/Triangle.NET/TestApp/IO/EpsImage.cs @@ -1,5 +1,6 @@ // ----------------------------------------------------------------------- // +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // Original Matlab code by John Burkardt, Florida State University // // ----------------------------------------------------------------------- @@ -14,6 +15,7 @@ namespace MeshExplorer.IO using System.IO; using TriangleNet; using TriangleNet.Geometry; + using TriangleNet.Data; /// /// Writes a mesh to an EPS file. @@ -35,6 +37,12 @@ namespace MeshExplorer.IO double y_max, y_min; double x_scale, y_scale; + /// + /// Export the mesh to EPS format. + /// + /// The current mesh. + /// The EPS filename. + /// The desired width of the image (currently ignored). public void Export(Mesh mesh, string filename, int width) { // Check file name @@ -150,6 +158,7 @@ namespace MeshExplorer.IO StringBuilder labels = new StringBuilder(); + Vertex v1, v2, v3; double x1, y1, x2, y2, x3, y3, xa, ya; int x_ps, y_ps; @@ -157,22 +166,26 @@ namespace MeshExplorer.IO { eps.WriteLine("newpath"); - x1 = tri[0].X; y1 = tri[0].Y; - x2 = tri[1].X; y2 = tri[1].Y; - x3 = tri[2].X; y3 = tri[2].Y; + v1 = tri.GetVertex(0); + v2 = tri.GetVertex(1); + v3 = tri.GetVertex(2); + + x1 = v1.X; y1 = v1.Y; + x2 = v2.X; y2 = v2.Y; + x3 = v3.X; y3 = v3.Y; x_ps = (int)Math.Floor(((x_max - x1) * x_ps_min + (x1 - x_min) * x_ps_max) / (x_max - x_min)); y_ps = (int)Math.Floor(((y_max - y1) * y_ps_min + (y1 - y_min) * y_ps_max) / (y_max - y_min)); eps.WriteLine(" {0} {1} moveto", x_ps, y_ps); - + x_ps = (int)Math.Floor(((x_max - x2) * x_ps_min + (x2 - x_min) * x_ps_max) / (x_max - x_min)); y_ps = (int)Math.Floor(((y_max - y2) * y_ps_min + (y2 - y_min) * y_ps_max) / (y_max - y_min)); eps.WriteLine(" {0} {1} lineto", x_ps, y_ps); - + x_ps = (int)Math.Floor(((x_max - x3) * x_ps_min + (x3 - x_min) * x_ps_max) / (x_max - x_min)); y_ps = (int)Math.Floor(((y_max - y3) * y_ps_min + (y3 - y_min) * y_ps_max) / (y_max - y_min)); eps.WriteLine(" {0} {1} lineto", x_ps, y_ps); - + x_ps = (int)Math.Floor(((x_max - x1) * x_ps_min + (x1 - x_min) * x_ps_max) / (x_max - x_min)); y_ps = (int)Math.Floor(((y_max - y1) * y_ps_min + (y1 - y_min) * y_ps_max) / (y_max - y_min)); eps.WriteLine(" {0} {1} lineto", x_ps, y_ps); @@ -230,8 +243,8 @@ namespace MeshExplorer.IO { eps.WriteLine("newpath"); - x1 = seg[0].X; y1 = seg[0].Y; - x2 = seg[1].X; y2 = seg[1].Y; + x1 = seg.GetVertex(0).X; y1 = seg.GetVertex(0).Y; + x2 = seg.GetVertex(1).X; y2 = seg.GetVertex(1).Y; x_ps = (int)Math.Floor(((x_max - x1) * x_ps_min + (x1 - x_min) * x_ps_max) / (x_max - x_min)); y_ps = (int)Math.Floor(((y_max - y1) * y_ps_min + (y1 - y_min) * y_ps_max) / (y_max - y_min)); diff --git a/Triangle.NET/TestApp/IO/FileProcessor.cs b/Triangle.NET/TestApp/IO/FileProcessor.cs index 0f1d3c1..d1e03b5 100644 --- a/Triangle.NET/TestApp/IO/FileProcessor.cs +++ b/Triangle.NET/TestApp/IO/FileProcessor.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -21,6 +21,11 @@ namespace MeshExplorer.IO { static Dictionary container = new Dictionary(); + /// + /// Returns true, if the given file contains mesh information. + /// + /// + /// public static bool ContainsMeshData(string path) { IMeshFile provider = GetProviderInstance(path); @@ -28,6 +33,9 @@ namespace MeshExplorer.IO return provider.ContainsMeshData(path); } + /// + /// Read an input geometry from given file. + /// public static InputGeometry Read(string path) { IMeshFile provider = GetProviderInstance(path); @@ -35,6 +43,11 @@ namespace MeshExplorer.IO return provider.Read(path); } + /// + /// Read a mesh from given file. + /// + /// + /// public static Mesh Import(string path) { IMeshFile provider = GetProviderInstance(path); @@ -42,6 +55,9 @@ namespace MeshExplorer.IO return provider.Import(path); } + /// + /// Save the current mesh to given file. + /// public static void Save(string path, Mesh mesh) { IMeshFile provider = GetProviderInstance(path); diff --git a/Triangle.NET/TestApp/IO/Formats/DatFile.cs b/Triangle.NET/TestApp/IO/Formats/DatFile.cs index bd51e20..095084a 100644 --- a/Triangle.NET/TestApp/IO/Formats/DatFile.cs +++ b/Triangle.NET/TestApp/IO/Formats/DatFile.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -17,7 +17,7 @@ namespace MeshExplorer.IO.Formats using TriangleNet; /// - /// TODO: Update summary. + /// Read a polygon from DAT file (used by poly2tri). /// public class DatFile : IMeshFile { diff --git a/Triangle.NET/TestApp/IO/Formats/JsonFile.cs b/Triangle.NET/TestApp/IO/Formats/JsonFile.cs index 0f6d60a..ade67e5 100644 --- a/Triangle.NET/TestApp/IO/Formats/JsonFile.cs +++ b/Triangle.NET/TestApp/IO/Formats/JsonFile.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/TestApp/IO/Formats/TriangleFile.cs b/Triangle.NET/TestApp/IO/Formats/TriangleFile.cs index c45b704..1c44c98 100644 --- a/Triangle.NET/TestApp/IO/Formats/TriangleFile.cs +++ b/Triangle.NET/TestApp/IO/Formats/TriangleFile.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -16,7 +16,7 @@ namespace MeshExplorer.IO.Formats using TriangleNet; /// - /// TODO: Update summary. + /// Read and write files defined in classic Triangle format. /// public class TriangleFile : IMeshFile { diff --git a/Triangle.NET/TestApp/IO/IMeshFile.cs b/Triangle.NET/TestApp/IO/IMeshFile.cs index 4b577e6..4c077f1 100644 --- a/Triangle.NET/TestApp/IO/IMeshFile.cs +++ b/Triangle.NET/TestApp/IO/IMeshFile.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/TestApp/IO/RasterImage.cs b/Triangle.NET/TestApp/IO/RasterImage.cs index 0a64500..005e3ce 100644 --- a/Triangle.NET/TestApp/IO/RasterImage.cs +++ b/Triangle.NET/TestApp/IO/RasterImage.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -31,11 +31,11 @@ namespace MeshExplorer.IO } /// - /// Draws the mesh and writes the image file. + /// Export the mesh to PNG format. /// - /// The mesh to visualize. - /// The filename (only PNG supported). - /// The target width of the image (pixel). + /// The current mesh. + /// The PNG filename. + /// The desired width (pixel) of the image. public void Export(Mesh mesh, string filename, int width) { // Get mesh data -- TODO: Use RenderControl's RenderData diff --git a/Triangle.NET/TestApp/IO/SvgImage.cs b/Triangle.NET/TestApp/IO/SvgImage.cs index c1f8098..1ae0778 100644 --- a/Triangle.NET/TestApp/IO/SvgImage.cs +++ b/Triangle.NET/TestApp/IO/SvgImage.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -13,6 +13,8 @@ namespace MeshExplorer.IO using MeshExplorer.Rendering; using System.IO; using TriangleNet; + using TriangleNet.Data; + using TriangleNet.Geometry; /// /// Writes a mesh to an SVG file. @@ -21,9 +23,12 @@ namespace MeshExplorer.IO { float scale = 1f; - int x_offset = 0; - int y_offset = 0; - + /// + /// Export the mesh to SVG format. + /// + /// The current mesh. + /// The SVG filename. + /// The desired width of the image. public void Export(Mesh mesh, string filename, int width) { // Check file name @@ -45,11 +50,11 @@ namespace MeshExplorer.IO var bounds = mesh.Bounds; float margin = 0.05f * (float)bounds.Width; - + scale = width / ((float)bounds.Width + 2 * margin); - x_offset = -(int)((bounds.Xmin - margin) * scale); - y_offset = (int)((bounds.Ymax + margin) * scale); + int x_offset = -(int)((bounds.Xmin - margin) * scale); + int y_offset = (int)((bounds.Ymax + margin) * scale); int height = (int)((bounds.Height + 2 * margin) * scale); @@ -79,16 +84,21 @@ namespace MeshExplorer.IO StringBuilder labels = new StringBuilder(); + Vertex v1, v2, v3; double x1, y1, x2, y2, x3, y3, xa, ya; foreach (var tri in mesh.Triangles) { - x1 = scale * tri[0].X; - y1 = scale * tri[0].Y; - x2 = scale * tri[1].X; - y2 = scale * tri[1].Y; - x3 = scale * tri[2].X; - y3 = scale * tri[2].Y; + v1 = tri.GetVertex(0); + v2 = tri.GetVertex(1); + v3 = tri.GetVertex(2); + + x1 = scale * v1.X; + y1 = scale * v1.Y; + x2 = scale * v2.X; + y2 = scale * v2.Y; + x3 = scale * v3.X; + y3 = scale * v3.Y; svg.Write("M {0},{1} L {2},{3} {4},{5} Z ", x1.ToString("0.0", Util.Nfi), y1.ToString("0.0", Util.Nfi), @@ -128,10 +138,10 @@ namespace MeshExplorer.IO foreach (var seg in mesh.Segments) { - x1 = scale * seg[0].X; - y1 = scale * seg[0].Y; - x2 = scale * seg[1].X; - y2 = scale * seg[1].Y; + x1 = scale * seg.GetVertex(0).X; + y1 = scale * seg.GetVertex(0).Y; + x2 = scale * seg.GetVertex(1).X; + y2 = scale * seg.GetVertex(1).Y; svg.Write("M {0},{1} L {2},{3} ", x1.ToString("0.0", Util.Nfi), y1.ToString("0.0", Util.Nfi), @@ -159,7 +169,7 @@ namespace MeshExplorer.IO { circle_size = 2; } - + svg.WriteLine(" "); double x, y; diff --git a/Triangle.NET/TestApp/Rendering/MeshRenderer.cs b/Triangle.NET/TestApp/Rendering/MeshRenderer.cs index 217a2c0..423052e 100644 --- a/Triangle.NET/TestApp/Rendering/MeshRenderer.cs +++ b/Triangle.NET/TestApp/Rendering/MeshRenderer.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -22,11 +22,79 @@ namespace MeshExplorer.Rendering RenderData data; RenderColors renderColors; + /// + /// Initializes a new instance of the class. + /// public MeshRenderer(RenderData data) { this.data = data; } + /// + /// Renders the mesh. + /// + public void Render(Graphics g, Zoom zoom, RenderColors renderColors) + { + this.renderColors = renderColors; + this.zoom = zoom; + + if (data.Edges != null) + { + this.RenderEdges(g); + } + else if (data.Triangles != null) + { + this.RenderTriangles(g); + } + + if (data.Segments != null) + { + this.RenderSegments(g); + } + + if (data.Points != null) + { + this.RenderPoints(g); + } + } + + /// + /// Renders only the mesh edges (no points or segments). + /// + public void RenderMesh(Graphics g, Zoom zoom, RenderColors renderColors) + { + this.renderColors = renderColors; + this.zoom = zoom; + + if (data.Edges != null) + { + this.RenderEdges(g); + } + else if (data.Triangles != null) + { + this.RenderTriangles(g); + } + } + + /// + /// Renders only points and segments (no mesh triangles). + /// + public void RenderGeometry(Graphics g, Zoom zoom, RenderColors renderColors) + { + this.renderColors = renderColors; + this.zoom = zoom; + + if (data.Segments != null) + { + this.RenderSegments(g); + } + + if (data.Points != null) + { + this.RenderPoints(g); + } + } + private void RenderPoints(Graphics g) { PointF pt; @@ -121,67 +189,5 @@ namespace MeshExplorer.Rendering } } } - - public void Render(Graphics g, Zoom zoom, RenderColors renderColors) - { - this.renderColors = renderColors; - this.zoom = zoom; - - if (data.Edges != null) - { - this.RenderEdges(g); - } - else if (data.Triangles != null) - { - this.RenderTriangles(g); - } - - if (data.Segments != null) - { - this.RenderSegments(g); - } - - if (data.Points != null) - { - this.RenderPoints(g); - } - } - - /// - /// Renders only the mesh edges (no points or segments). - /// - public void RenderMesh(Graphics g, Zoom zoom, RenderColors renderColors) - { - this.renderColors = renderColors; - this.zoom = zoom; - - if (data.Edges != null) - { - this.RenderEdges(g); - } - else if (data.Triangles != null) - { - this.RenderTriangles(g); - } - } - - /// - /// Renders only points and segments (no mesh triangles). - /// - public void RenderGeometry(Graphics g, Zoom zoom, RenderColors renderColors) - { - this.renderColors = renderColors; - this.zoom = zoom; - - if (data.Segments != null) - { - this.RenderSegments(g); - } - - if (data.Points != null) - { - this.RenderPoints(g); - } - } } } diff --git a/Triangle.NET/TestApp/Rendering/RenderColors.cs b/Triangle.NET/TestApp/Rendering/RenderColors.cs index ee23b90..c9d092f 100644 --- a/Triangle.NET/TestApp/Rendering/RenderColors.cs +++ b/Triangle.NET/TestApp/Rendering/RenderColors.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/TestApp/Rendering/RenderData.cs b/Triangle.NET/TestApp/Rendering/RenderData.cs index 04a9de5..9e2fabc 100644 --- a/Triangle.NET/TestApp/Rendering/RenderData.cs +++ b/Triangle.NET/TestApp/Rendering/RenderData.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -16,6 +16,9 @@ namespace MeshExplorer.Rendering using TriangleNet.Data; using TriangleNet.Geometry; + /// + /// Stores the current mesh in GDI friendly data structure. + /// public class RenderData { public PointF[] Points; @@ -27,6 +30,9 @@ namespace MeshExplorer.Rendering public int NumberOfInputPoints; public RectangleF Bounds; + /// + /// Update input geometry data. + /// public void SetData(InputGeometry data) { int n = data.Count; @@ -55,10 +61,8 @@ namespace MeshExplorer.Rendering } /// - /// + /// Update mesh data. /// - /// - /// This methods assumes that the mesh.Renumber() has been called. public void SetData(Mesh mesh) { mesh.Renumber(); diff --git a/Triangle.NET/TestApp/Rendering/VoronoiRenderer.cs b/Triangle.NET/TestApp/Rendering/VoronoiRenderer.cs index 5757589..c0a7727 100644 --- a/Triangle.NET/TestApp/Rendering/VoronoiRenderer.cs +++ b/Triangle.NET/TestApp/Rendering/VoronoiRenderer.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -24,6 +24,9 @@ namespace MeshExplorer.Rendering BoundedVoronoi boundedVoro; RenderColors renderColors; + /// + /// Initializes a new instance of the class. + /// public VoronoiRenderer(Mesh mesh) { this.mesh = mesh; @@ -39,6 +42,9 @@ namespace MeshExplorer.Rendering } } + /// + /// Regenerates the voronoi diagram. + /// public void Update() { if (simpleVoro != null) @@ -52,12 +58,18 @@ namespace MeshExplorer.Rendering } } + /// + /// Resets the voronoi display. + /// public void Reset() { simpleVoro = null; boundedVoro = null; } + /// + /// Renders the voronoi diagram. + /// public void Render(Graphics g, Zoom zoom, RenderColors renderColors) { this.renderColors = renderColors; diff --git a/Triangle.NET/TestApp/Rendering/Zoom.cs b/Triangle.NET/TestApp/Rendering/Zoom.cs index b73581d..f04e334 100644 --- a/Triangle.NET/TestApp/Rendering/Zoom.cs +++ b/Triangle.NET/TestApp/Rendering/Zoom.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -13,30 +13,45 @@ namespace MeshExplorer.Rendering using System.Drawing; /// - /// Manages the current world to screen transformation + /// Manages the current world to screen transformation. /// public class Zoom { - // The complete mesh + /// + /// Gets the screen dimensions (render control). + /// Rectangle Screen { get; set; } - // The complete mesh + /// + /// Gets the world dimensions (mesh). + /// RectangleF World { get; set; } - // The current viewport (visible mesh) - public RectangleF Viewport { get; set; } + /// + /// Gets the current viewport (visible mesh). + /// + public RectangleF Viewport { get; private set; } - // Current scale (zoom level) - public int Level { get; set; } + /// + /// Gets the current scale (zoom level) + /// + public int Level { get; private set; } - // Add a margin to clip region (5% of viewport width on each side) - public float ClipMargin { get; set; } + public float ClipMargin { get; private set; } + /// + /// Initializes a new instance of the class. + /// public Zoom() { Level = -1; } + /// + /// Initialize the zoom. + /// + /// The screen dimensions. + /// The world dimensions. public void Initialize(Rectangle screen, RectangleF world) { this.Screen = screen; @@ -74,45 +89,15 @@ namespace MeshExplorer.Rendering public void Resize(Rectangle screen, RectangleF world) { - this.Screen = screen; - - this.World = world; - this.Level = 1; - - // Add a margin so there's some space around the border - float worldMargin = (World.Width < World.Height) ? World.Height * 0.05f : World.Width * 0.05f; - - // Get the initial viewport (complete mesh centered on the screen) - float screenRatio = screen.Width / (float)screen.Height; - float worldRatio = World.Width / World.Height; - - float scale = (World.Width + worldMargin) / screen.Width; - - if (screenRatio > worldRatio) - { - scale = (World.Height + worldMargin) / screen.Height; - } - - float centerX = World.X + World.Width / 2; - float centerY = World.Y + World.Height / 2; - - // TODO: Add initial margin - this.Viewport = new RectangleF(centerX - screen.Width * scale / 2, - centerY - screen.Height * scale / 2, - screen.Width * scale, - screen.Height * scale); - - this.ClipMargin = this.Viewport.Width * 0.05f; - - this.World = this.Viewport; + this.Initialize(screen, world); } /// /// Zoom in or out of the viewport. /// /// Zoom amount - /// Relative x point position - /// Relative y point position + /// Relative x point position (between 0 and 1) + /// Relative y point position (between 0 and 1) public bool Update(int amount, float focusX, float focusY) { float width, height; @@ -180,6 +165,9 @@ namespace MeshExplorer.Rendering return true; } + /// + /// Check current point (world coordinates) lies inside the viewport. + /// public bool ViewportContains(PointF pt) { return (pt.X > Viewport.X && pt.X < Viewport.Right diff --git a/Triangle.NET/TestApp/Settings.cs b/Triangle.NET/TestApp/Settings.cs index 164c3b8..ba9bb5d 100644 --- a/Triangle.NET/TestApp/Settings.cs +++ b/Triangle.NET/TestApp/Settings.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -14,7 +14,7 @@ namespace MeshExplorer using System.Windows.Forms; /// - /// TODO: Update summary. + /// Stores some of the data used in the main application. /// public class Settings { diff --git a/Triangle.NET/TestApp/Util.cs b/Triangle.NET/TestApp/Util.cs index d54f069..62a34da 100644 --- a/Triangle.NET/TestApp/Util.cs +++ b/Triangle.NET/TestApp/Util.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Christian Woltering, Triangle.NET, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Algorithm/Dwyer.cs b/Triangle.NET/Triangle/Algorithm/Dwyer.cs index f3d2a87..12e03c9 100644 --- a/Triangle.NET/Triangle/Algorithm/Dwyer.cs +++ b/Triangle.NET/Triangle/Algorithm/Dwyer.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- -// +// // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Algorithm/ITriangulator.cs b/Triangle.NET/Triangle/Algorithm/ITriangulator.cs index 0b34c43..fe9147b 100644 --- a/Triangle.NET/Triangle/Algorithm/ITriangulator.cs +++ b/Triangle.NET/Triangle/Algorithm/ITriangulator.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Algorithm/Incremental.cs b/Triangle.NET/Triangle/Algorithm/Incremental.cs index 65f3f48..788f560 100644 --- a/Triangle.NET/Triangle/Algorithm/Incremental.cs +++ b/Triangle.NET/Triangle/Algorithm/Incremental.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Algorithm/SweepLine.cs b/Triangle.NET/Triangle/Algorithm/SweepLine.cs index c106712..f299469 100644 --- a/Triangle.NET/Triangle/Algorithm/SweepLine.cs +++ b/Triangle.NET/Triangle/Algorithm/SweepLine.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/BadTriQueue.cs b/Triangle.NET/Triangle/BadTriQueue.cs index ac98753..6966a81 100644 --- a/Triangle.NET/Triangle/BadTriQueue.cs +++ b/Triangle.NET/Triangle/BadTriQueue.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Behavior.cs b/Triangle.NET/Triangle/Behavior.cs index 24a1cb8..ea76342 100644 --- a/Triangle.NET/Triangle/Behavior.cs +++ b/Triangle.NET/Triangle/Behavior.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Carver.cs b/Triangle.NET/Triangle/Carver.cs index 4496f3e..3fdbfbb 100644 --- a/Triangle.NET/Triangle/Carver.cs +++ b/Triangle.NET/Triangle/Carver.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Data/BadSubseg.cs b/Triangle.NET/Triangle/Data/BadSubseg.cs index d95d8b7..bc0341b 100644 --- a/Triangle.NET/Triangle/Data/BadSubseg.cs +++ b/Triangle.NET/Triangle/Data/BadSubseg.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Data/BadTriangle.cs b/Triangle.NET/Triangle/Data/BadTriangle.cs index bc68f1f..95982c7 100644 --- a/Triangle.NET/Triangle/Data/BadTriangle.cs +++ b/Triangle.NET/Triangle/Data/BadTriangle.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Data/Osub.cs b/Triangle.NET/Triangle/Data/Osub.cs index 4a7a334..cdfc9ef 100644 --- a/Triangle.NET/Triangle/Data/Osub.cs +++ b/Triangle.NET/Triangle/Data/Osub.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/index.html +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Data/Otri.cs b/Triangle.NET/Triangle/Data/Otri.cs index 339fc59..06eef19 100644 --- a/Triangle.NET/Triangle/Data/Otri.cs +++ b/Triangle.NET/Triangle/Data/Otri.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/index.html +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Data/Segment.cs b/Triangle.NET/Triangle/Data/Segment.cs index b440fc1..183cd39 100644 --- a/Triangle.NET/Triangle/Data/Segment.cs +++ b/Triangle.NET/Triangle/Data/Segment.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- -// +// // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -11,6 +11,7 @@ namespace TriangleNet.Data using System.Collections.Generic; using System.Linq; using System.Text; + using TriangleNet.Geometry; /// /// The subsegment data structure. @@ -71,9 +72,9 @@ namespace TriangleNet.Data /// /// Gets the segments endpoint. /// - public Vertex this[int index] + public Vertex GetVertex(int index) { - get { return this.vertices[index]; } // TODO: Check range? + return this.vertices[index]; // TODO: Check range? } /// diff --git a/Triangle.NET/Triangle/Data/Triangle.cs b/Triangle.NET/Triangle/Data/Triangle.cs index cf163c9..fef0b8e 100644 --- a/Triangle.NET/Triangle/Data/Triangle.cs +++ b/Triangle.NET/Triangle/Data/Triangle.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -98,11 +98,11 @@ namespace TriangleNet.Data } /// - /// Gets the specified corners vertex id. + /// Gets the specified corners vertex. /// - public Vertex this[int index] + public Vertex GetVertex(int index) { - get { return this.vertices[index]; } // TODO: Check range? + return this.vertices[index]; // TODO: Check range? } /// @@ -142,6 +142,16 @@ namespace TriangleNet.Data get { return this.neighbors[2].triangle.id; } } + /// + /// Gets a triangles' neighbor. + /// + /// The neighbor index (0, 1 or 2). + /// The triangles' neigbbor. + public ITriangle GetNeighbor(int index) + { + return neighbors[index].triangle == Mesh.dummytri ? null : neighbors[index].triangle; + } + /// /// Gets the triangle area constraint. /// diff --git a/Triangle.NET/Triangle/Data/Vertex.cs b/Triangle.NET/Triangle/Data/Vertex.cs index c933fd8..9394318 100644 --- a/Triangle.NET/Triangle/Data/Vertex.cs +++ b/Triangle.NET/Triangle/Data/Vertex.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Enums.cs b/Triangle.NET/Triangle/Enums.cs index 0c6d0d1..786b7b1 100644 --- a/Triangle.NET/Triangle/Enums.cs +++ b/Triangle.NET/Triangle/Enums.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Geometry/BoundingBox.cs b/Triangle.NET/Triangle/Geometry/BoundingBox.cs index 4d8cb0a..1f12aa4 100644 --- a/Triangle.NET/Triangle/Geometry/BoundingBox.cs +++ b/Triangle.NET/Triangle/Geometry/BoundingBox.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Geometry/Edge.cs b/Triangle.NET/Triangle/Geometry/Edge.cs index c48ffee..c754a0f 100644 --- a/Triangle.NET/Triangle/Geometry/Edge.cs +++ b/Triangle.NET/Triangle/Geometry/Edge.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Geometry/EdgeEnumerator.cs b/Triangle.NET/Triangle/Geometry/EdgeEnumerator.cs index 581abaf..5984e95 100644 --- a/Triangle.NET/Triangle/Geometry/EdgeEnumerator.cs +++ b/Triangle.NET/Triangle/Geometry/EdgeEnumerator.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Geometry/ITriangle.cs b/Triangle.NET/Triangle/Geometry/ITriangle.cs index dbf41df..78e8fae 100644 --- a/Triangle.NET/Triangle/Geometry/ITriangle.cs +++ b/Triangle.NET/Triangle/Geometry/ITriangle.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -34,10 +34,13 @@ namespace TriangleNet.Geometry /// Third vertex id of the triangle. /// int P2 { get; } + /// - /// Gets the vertex at specified index. + /// Gets a triangles vertex. /// - Vertex this[int index] { get; } + /// The vertex index (0, 1 or 2). + /// The vertex of the specified corner index. + Vertex GetVertex(int index); /// /// True if the triangle implementation contains neighbor information. @@ -57,6 +60,13 @@ namespace TriangleNet.Geometry /// int N2 { get; } + /// + /// Gets a triangles neighbor. + /// + /// The neighbor index (0, 1 or 2). + /// The triangles' neigbbor. + ITriangle GetNeighbor(int index); + /// /// Triangle area constraint. /// diff --git a/Triangle.NET/Triangle/Geometry/InputGeometry.cs b/Triangle.NET/Triangle/Geometry/InputGeometry.cs index e306329..7d44ec8 100644 --- a/Triangle.NET/Triangle/Geometry/InputGeometry.cs +++ b/Triangle.NET/Triangle/Geometry/InputGeometry.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Geometry/Point.cs b/Triangle.NET/Triangle/Geometry/Point.cs index 9ff76f0..ce2bc0b 100644 --- a/Triangle.NET/Triangle/Geometry/Point.cs +++ b/Triangle.NET/Triangle/Geometry/Point.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- -// +// // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Geometry/RegionPointer.cs b/Triangle.NET/Triangle/Geometry/RegionPointer.cs index aae795b..9e730cc 100644 --- a/Triangle.NET/Triangle/Geometry/RegionPointer.cs +++ b/Triangle.NET/Triangle/Geometry/RegionPointer.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/IO/DataReader.cs b/Triangle.NET/Triangle/IO/DataReader.cs index 1e44ac5..3586820 100644 --- a/Triangle.NET/Triangle/IO/DataReader.cs +++ b/Triangle.NET/Triangle/IO/DataReader.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- -// +// // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/IO/DebugWriter.cs b/Triangle.NET/Triangle/IO/DebugWriter.cs index 9b3bde5..2948f19 100644 --- a/Triangle.NET/Triangle/IO/DebugWriter.cs +++ b/Triangle.NET/Triangle/IO/DebugWriter.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/IO/FileReader.cs b/Triangle.NET/Triangle/IO/FileReader.cs index 4c5ec72..07deddf 100644 --- a/Triangle.NET/Triangle/IO/FileReader.cs +++ b/Triangle.NET/Triangle/IO/FileReader.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- -// +// // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/IO/FileWriter.cs b/Triangle.NET/Triangle/IO/FileWriter.cs index 0ded508..a9dd932 100644 --- a/Triangle.NET/Triangle/IO/FileWriter.cs +++ b/Triangle.NET/Triangle/IO/FileWriter.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- -// +// // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/IO/IGeometryFormat.cs b/Triangle.NET/Triangle/IO/IGeometryFormat.cs index 43e329d..2ee7532 100644 --- a/Triangle.NET/Triangle/IO/IGeometryFormat.cs +++ b/Triangle.NET/Triangle/IO/IGeometryFormat.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/IO/IMeshFormat.cs b/Triangle.NET/Triangle/IO/IMeshFormat.cs index 788d8ff..3971810 100644 --- a/Triangle.NET/Triangle/IO/IMeshFormat.cs +++ b/Triangle.NET/Triangle/IO/IMeshFormat.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/IO/InputTriangle.cs b/Triangle.NET/Triangle/IO/InputTriangle.cs index 36f8e47..917e889 100644 --- a/Triangle.NET/Triangle/IO/InputTriangle.cs +++ b/Triangle.NET/Triangle/IO/InputTriangle.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -60,11 +60,11 @@ namespace TriangleNet.IO } /// - /// Gets the specified corners vertex id. + /// Gets the specified corners vertex. /// - public Vertex this[int index] + public Vertex GetVertex(int index) { - get { return null; } // TODO: throw NotSupportedException? + return null; // TODO: throw NotSupportedException? } public bool SupportsNeighbors @@ -87,6 +87,11 @@ namespace TriangleNet.IO get { return -1; } } + public ITriangle GetNeighbor(int index) + { + return null; + } + /// /// Gets the triangle area constraint. /// diff --git a/Triangle.NET/Triangle/IO/TriangleFormat.cs b/Triangle.NET/Triangle/IO/TriangleFormat.cs index 06f47b2..fd49fbc 100644 --- a/Triangle.NET/Triangle/IO/TriangleFormat.cs +++ b/Triangle.NET/Triangle/IO/TriangleFormat.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Log/ILog.cs b/Triangle.NET/Triangle/Log/ILog.cs index 3675642..9111b6d 100644 --- a/Triangle.NET/Triangle/Log/ILog.cs +++ b/Triangle.NET/Triangle/Log/ILog.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Log/ILogItem.cs b/Triangle.NET/Triangle/Log/ILogItem.cs index 9bf755f..4581ddd 100644 --- a/Triangle.NET/Triangle/Log/ILogItem.cs +++ b/Triangle.NET/Triangle/Log/ILogItem.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Log/SimpleLog.cs b/Triangle.NET/Triangle/Log/SimpleLog.cs index 1f13403..8f05bdc 100644 --- a/Triangle.NET/Triangle/Log/SimpleLog.cs +++ b/Triangle.NET/Triangle/Log/SimpleLog.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Log/SimpleLogItem.cs b/Triangle.NET/Triangle/Log/SimpleLogItem.cs index b48828e..c344b86 100644 --- a/Triangle.NET/Triangle/Log/SimpleLogItem.cs +++ b/Triangle.NET/Triangle/Log/SimpleLogItem.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -12,7 +12,7 @@ namespace TriangleNet.Log using System.Text; /// - /// TODO: Update summary. + /// Represents an item stored in the log. /// public class SimpleLogItem : ILogItem { diff --git a/Triangle.NET/Triangle/Mesh.cs b/Triangle.NET/Triangle/Mesh.cs index ead94d0..814f0cb 100644 --- a/Triangle.NET/Triangle/Mesh.cs +++ b/Triangle.NET/Triangle/Mesh.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/NewLocation.cs b/Triangle.NET/Triangle/NewLocation.cs index fa1f7ca..62213d4 100644 --- a/Triangle.NET/Triangle/NewLocation.cs +++ b/Triangle.NET/Triangle/NewLocation.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original code by Hale Erten and Alper Üngör, http://www.cise.ufl.edu/~ungor/aCute/index.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Primitives.cs b/Triangle.NET/Triangle/Primitives.cs index 709fe97..e5b1db5 100644 --- a/Triangle.NET/Triangle/Primitives.cs +++ b/Triangle.NET/Triangle/Primitives.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Quality.cs b/Triangle.NET/Triangle/Quality.cs index 4c5af0f..1aa06f3 100644 --- a/Triangle.NET/Triangle/Quality.cs +++ b/Triangle.NET/Triangle/Quality.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -204,7 +204,7 @@ namespace TriangleNet { if (Primitives.NonRegular(triorg, tridest, triapex, oppoapex) > 0.0) { - logger.Warning(String.Format("Non-regular pair of triangles found (IDs {0}+{1}).", + logger.Warning(String.Format("Non-regular pair of triangles found (IDs {0}/{1}).", loop.triangle.id, oppotri.triangle.id), "Quality.CheckDelaunay()"); horrors++; } diff --git a/Triangle.NET/Triangle/Sampler.cs b/Triangle.NET/Triangle/Sampler.cs index 26bc93c..7d899d7 100644 --- a/Triangle.NET/Triangle/Sampler.cs +++ b/Triangle.NET/Triangle/Sampler.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Smoothing/ISmoother.cs b/Triangle.NET/Triangle/Smoothing/ISmoother.cs index 6ced65c..6bfc264 100644 --- a/Triangle.NET/Triangle/Smoothing/ISmoother.cs +++ b/Triangle.NET/Triangle/Smoothing/ISmoother.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- -// -// TODO: Update copyright text. +// +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -12,10 +12,10 @@ namespace TriangleNet.Smoothing using System.Text; /// - /// TODO: Update summary. + /// Interface for mesh smoothers. /// public interface ISmoother { void Smooth(); } -} +} \ No newline at end of file diff --git a/Triangle.NET/Triangle/Tools/BoundedVoronoi.cs b/Triangle.NET/Triangle/Tools/BoundedVoronoi.cs index 8ceff18..ad31964 100644 --- a/Triangle.NET/Triangle/Tools/BoundedVoronoi.cs +++ b/Triangle.NET/Triangle/Tools/BoundedVoronoi.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/index.html +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Tools/QualityMeasure.cs b/Triangle.NET/Triangle/Tools/QualityMeasure.cs index 363dd5e..cffd14e 100644 --- a/Triangle.NET/Triangle/Tools/QualityMeasure.cs +++ b/Triangle.NET/Triangle/Tools/QualityMeasure.cs @@ -1,6 +1,6 @@ // ----------------------------------------------------------------------- // -// TODO: Update copyright text. +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- @@ -248,11 +248,11 @@ namespace TriangleNet.Tools { for (int j = 0; j < 3; j++) { - gi = tri[j].id; + gi = tri.GetVertex(j).id; for (int k = 0; k < 3; k++) { - gj = tri[k].id; + gj = tri.GetVertex(k).id; mu = Math.Max(mu, gj - gi); ml = Math.Max(ml, gi - gj); diff --git a/Triangle.NET/Triangle/Tools/Statistic.cs b/Triangle.NET/Triangle/Tools/Statistic.cs index 620005e..9b9f007 100644 --- a/Triangle.NET/Triangle/Tools/Statistic.cs +++ b/Triangle.NET/Triangle/Tools/Statistic.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/triangle/ +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // ----------------------------------------------------------------------- diff --git a/Triangle.NET/Triangle/Tools/Voronoi.cs b/Triangle.NET/Triangle/Tools/Voronoi.cs index 435c992..cfc3629 100644 --- a/Triangle.NET/Triangle/Tools/Voronoi.cs +++ b/Triangle.NET/Triangle/Tools/Voronoi.cs @@ -1,7 +1,7 @@ // ----------------------------------------------------------------------- // // Original Triangle code by Jonathan Richard Shewchuk, http://www.cs.cmu.edu/~quake/triangle.html -// Triangle.NET code by Christian Woltering, http://home.edo.tu-dortmund.de/~woltering/index.html +// Triangle.NET code by Christian Woltering, http://triangle.codeplex.com/ // // -----------------------------------------------------------------------