Mesher Class
NOTE: This member is now obsolete. Mesher class is deprecated, please use UtilityEx.Triangulate() method instead.
2D meshing.
Mesher class is deprecated, please use UtilityEx.Triangulate method instead.
Name | Description | |
---|---|---|
Mesher(ICurve, IList<ICurve>, double, mesherSmoothingType, int) | Element size and smoothing control constructor. | |
Mesher(ICurve, IList<ICurve>, IList<ICurve>, double, mesherSmoothingType, int) | Smoothing control constructor. | |
Mesher(ICurve, IList<ICurve>, IList<ICurve>, double) | Element size and internal curves constructor. | |
Mesher(ICurve, IList<ICurve>, double) | Element size constructor. | |
Mesher(Region, double) | Element size constructor. | |
Mesher(Region, double, mesherSmoothingType, int) | Element size and smoothing control constructor. |
Name | Description | |
---|---|---|
ComputeMeshQuality | If true, mesh quality will be computed. | |
ExecutionTime | Gets the (last) work execution time in milliseconds. (inherited from WorkUnit). | |
Log | Gets the list of errors and warnings generated during execution. (inherited from WorkUnit). | |
OutputType | Gets or sets the triangulation output type. (inherited from Delaunay). | |
Result | Gets the resulting mesh. (inherited from Delaunay). | |
SmoothingText | Gets or sets the progress bar text displayed when executed asynchronously. | |
Status | Gets the WorkUnit status. (inherited from WorkUnit). | |
TriangulatingText | Gets or sets the progress bar text displayed when executed asynchronously. (inherited from Delaunay). |
Name | Description | |
---|---|---|
AddPointsAlongEdge(IndexLine, ref int) | Adds points along the edge if possible (not too close to the others). | |
Cancelled(BackgroundWorker, DoWorkEventArgs) | Checks if the user has requested cancellation of the background operation. (inherited from WorkUnit). | |
DoSmoothing(BackgroundWorker, DoWorkEventArgs) | ||
DoWork(BackgroundWorker, DoWorkEventArgs) | Does the actual work allowing progress bar update and cancellation. (inherited from Delaunay). | |
Equals(Object) | Determines whether the specified object is equal to the current object. (inherited from Object). | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object). | |
GetHashCode | Serves as the default hash function. (inherited from Object). | |
GetType | Gets the Type of the current instance. (inherited from Object). | |
MakeMesh() | (inherited from Delaunay). | |
MemberwiseClone | Creates a shallow copy of the current Object. (inherited from Object). | |
ProcessContours(IList<Point3D>, IList<Point3D>, IList<IList<Point3D>>, IList<IList<Point3D>>, bool) | (inherited from Delaunay). | |
ProcessTriangulation(int, int, string, bool, BackgroundWorker, DoWorkEventArgs) | Triangulate the points with indices between startFrom and endAt indices. (inherited from Delaunay). | |
ResetProgressParallel(int) | Resets the progress bar for a parallel loop. (inherited from WorkUnit). | |
StartContinuousAnimation(string, BackgroundWorker, params string[]) | Start the animation for the continuous progress bar. (inherited from WorkUnit). | |
StopContinuousAnimation(BackgroundWorker) | Stop the animation for the continuous progress bar. (inherited from WorkUnit). | |
ToString | Returns a string that represents the current object. (inherited from Object). | |
Triangulate(BackgroundWorker, DoWorkEventArgs) | ||
Triangulate(out Point3D[], out IndexTriangle[]) | Performs triangulation. | |
TriangulateInternal(BackgroundWorker, DoWorkEventArgs) | (inherited from Delaunay). | |
UpdateProgress(double, double, string, BackgroundWorker, bool, params string[]) | Updates the progress bar value. (inherited from WorkUnit). | |
UpdateProgress(int, int, string, BackgroundWorker, bool, params string[]) | Updates the progress bar value. (inherited from WorkUnit). | |
UpdateProgressAndCheckCancelled(int, int, string, BackgroundWorker, DoWorkEventArgs, bool, params string[]) | Updates the progress bar value and checks if the worker thread has been canceled. (inherited from WorkUnit). | |
UpdateProgressAndCheckCancelledParallel(int, string, BackgroundWorker, DoWorkEventArgs, params string[]) | Updates the progress bar value and checks if the worker thread has been canceled, for a parallel loop. (inherited from WorkUnit). | |
UpdateProgressParallel(double, string, BackgroundWorker, params string[]) | Updates the progress bar value for a parallel loop. (inherited from WorkUnit). | |
UpdateProgressTo100(string, BackgroundWorker, params string[]) | Set the progress bar to 100% and forces screen update. (inherited from WorkUnit). | |
WorkCancelled(Environment) | Called when the work is cancelled. (inherited from WorkUnit). | |
WorkCompleted(Environment) | Called when the work has completed. In the case you are modeling something, the environment parameter allows you to easily add the model to the entities collection. (inherited from WorkUnit). | |
WorkFailed(Environment) | Called when the work has failed. (inherited from WorkUnit). |
Name | Description | |
---|---|---|
ProgressChanged | Occurs when the DoWork() is called synchronously and the progress has changed. (inherited from WorkUnit). |
Name | Description | |
---|---|---|
adjacency | (inherited from Delaunay). | |
boundaryVertexCount | ||
brMin | Min corner of the problem bounding rectangle. (inherited from Delaunay). | |
brRange | Size of the bounding rectangle. (inherited from Delaunay). | |
elementSize | ||
gridSize | (inherited from Delaunay). | |
log | (inherited from WorkUnit). | |
loops | (inherited from Delaunay). | |
smoothing | ||
smoothingMode | ||
smoothingPasses | ||
triangles | (inherited from Delaunay). |
The following sample summarizes the steps needed to perform an asynchronous composite curve meshing.
public partial class Form1 : Form { public Form1() { InitializeComponent(); // adds event handler for WorkCompleted event viewport1.WorkCompleted += new Viewport.WorkCompletedEventHandler(viewport1_WorkCompleted); } protected override void OnShown(EventArgs e) { viewport1.DisplayMode = displayType.Shaded; CompositeCurve outer = new CompositeCurve(); outer.CurveList.Add(new Line(0, 0, 10, 0)); outer.CurveList.Add(new Line(10, 0, 10, 6)); outer.CurveList.Add(new Line(10, 6, 0, 6)); outer.CurveList.Add(new Line(0, 6, 0, 0)); CompositeCurve inner1 = new CompositeCurve(); inner1.CurveList.Add(new Line(2, 2, 6, 2)); inner1.CurveList.Add(new Line(6, 2, 2, 3)); inner1.CurveList.Add(new Line(2, 3, 2, 2)); CompositeCurve inner2 = new CompositeCurve(); inner2.CurveList.Add(new Circle(8, 4, 0, 1)); CompositeCurve inner3 = new CompositeCurve(); inner3.CurveList.Add(new Circle(6, 4, 0, .75)); Mesher me = new Mesher(outer, new CompositeCurve[] { inner1, inner2, inner3 }, .15, mesherSmoothingType.AreaCentroidWeighted, 2); viewport1.StartWork(me); base.OnShown(e); } public void viewport1_WorkCompleted(object sender, WorkCompletedEventArgs e) { // checks the WorkUnit type, more than one can be present in the same application if (e.WorkUnit is Mesher) { Mesher me = (Mesher)e.WorkUnit; Mesh m = me.Result; // adds the mesh to the viewport viewport1.Entities.Add(m, 0, Color.Coral); viewport1.SetView(viewType.Trimetric); viewport1.ZoomFit(); viewport1.Invalidate(); } } }
This language is not supported or no code example is available.
Public Partial Class Form1 Inherits Form Public Sub New() InitializeComponent() ' adds event handler for WorkCompleted event Viewport1.WorkCompleted += New Viewport.WorkCompletedEventHandler(Viewport1_WorkCompleted) End Sub Protected Overrides Sub OnShown(e As EventArgs) Viewport1.DisplayMode = displayType.Shaded Dim outer As New CompositeCurve() outer.CurveList.Add(New Line(0, 0, 10, 0)) outer.CurveList.Add(New Line(10, 0, 10, 6)) outer.CurveList.Add(New Line(10, 6, 0, 6)) outer.CurveList.Add(New Line(0, 6, 0, 0)) Dim inner1 As New CompositeCurve() inner1.CurveList.Add(New Line(2, 2, 6, 2)) inner1.CurveList.Add(New Line(6, 2, 2, 3)) inner1.CurveList.Add(New Line(2, 3, 2, 2)) Dim inner2 As New CompositeCurve() inner2.CurveList.Add(New Circle(8, 4, 0, 1)) Dim inner3 As New CompositeCurve() inner3.CurveList.Add(New Circle(6, 4, 0, 0.75)) Dim [me] As New Mesher(outer, New CompositeCurve() {inner1, inner2, inner3}, 0.15, mesherSmoothingType.AreaCentroidWeighted, 2) Viewport1.StartWork([me]) MyBase.OnShown(e) End Sub Public Sub Viewport1_WorkCompleted(sender As Object, e As WorkCompletedEventArgs) ' checks the WorkUnit type, more than one can be present in the same application If TypeOf e.WorkUnit Is Mesher Then Dim [me] As Mesher = DirectCast(e.WorkUnit, Mesher) Dim m As Mesh = [me].Result ' adds the mesh to the viewport Viewport1.Entities.Add(m, 0, Color.Coral) Viewport1.SetView(viewType.Trimetric) Viewport1.ZoomFit() Viewport1.Invalidate() End If End Sub End Class
This language is not supported or no code example is available.
devDept.Eyeshot.Triangulation.Mesher