Use mesh generator from other C# code?
Closed this issue · 1 comments
Congratulations, the examples that you post look very good.
I'd like to create some meshes using constrained Delauney triangulation from within another C# project, so I'd like to use your software as a library (without the GUI).
What would be the starting point, i.e., what are the relevant classes that I can use to define a polygon and to compute a mesh?
Hi,
To generate a mesh from other C# code, you will need to follow these steps:
Copy the file constrained_delaunay_triangle_main.cs located in the following folder:
https://github.com/Samson-Mano/2DTriangle_Mesh_Generator/tree/master/2DTriangle_Mesh_Generator/mesh_control
Copy the entire contents of this folder:
https://github.com/Samson-Mano/2DTriangle_Mesh_Generator/tree/master/2DTriangle_Mesh_Generator/mesh_control/delaunay_triangulation
That's all you need to do!
The main call to generate the mesh can be found in the file [constrained_delaunay_triangle_main.cs]. The input is a string value with format shown in the same file.
I hope this clarifies the process. If you have any further questions, feel free to ask.
Best regards,
Samson Mano