Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Library for Mesh Generation in .Net?

Tags:

c#

.net

wpf

Is there any library(.dll) available in .Net or available as Third party Library.

Which provide following functionality?

We just add as input points cloud or Points in 3D Space (with X, Y and Z Co-Ordinate)

And it display 3D object in ViewPort3D. Means automatically generate MESH from Point Cloud and give us the output as 3D object in ViewPort3D.

Note: Consider object would be Convex object.

Thanks..........

like image 761
Pritesh Avatar asked Feb 04 '11 10:02

Pritesh


People also ask

What is mesh generation in FEM?

Mesh generation is the practice of creating a mesh, a subdivision of a continuous geometric space into discrete geometric and topological cells. Often these cells form a simplicial complex. Usually the cells partition the geometric input domain. Mesh cells are used as discrete local approximations of the larger domain.

Why do we generate mesh?

Creating a high-quality mesh is one of the most critical factors that should be considered to ensure simulation accuracy. Creating the most appropriate mesh is the foundation of engineering simulations because the mesh influences the accuracy, convergence, and speed of the simulation.


1 Answers

I've recently been wondering the same thing and arrived at the conclusion that OpenTK is easy to use for that. I think it gives more or less direct access to the OpenGL API and doesn't require loads of dependencies.

This is a bit copy'n'paste from my own question and answer, which is the result of me having tested a lot of different libraries over the past few days with the aim of making a point cloud based on the data I receive from my Kinect.

It does not provide an output to ViewPort3D, but from my tests it was way faster than using WPF. I was not able to display (and keep updating) a 640x480 point cloud in WPF at an acceptable speed.

It is comparatively easy to understand. It requires few (and understandable) lines of code to get started. It doesn't hold the objects for me so I'm free to change anything for each pass, which is great because I'm mainly working with unsafe pointers to memory.

It is of course difficult to combine speed with ease of use. Speed requires talking directly to the 3D API while ease of use requres abstraction. Therefore this must be considered a lower level API than some of the others I've tried. If I wanted to do some prefab character animation then XNA would probably be a better choice, but for point clouds this seems very promising so far (4-5 hours of hacking).

Some sample code:

private void Render()
{
   // Every frame
   GL.Begin(BeginMode.Points);
   GL.MatrixMode(MatrixMode.Modelview);
   GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
   GL.LoadMatrix(ref cameraMatrix);

   GL.Begin(BeginMode.Points);

   // Here I can add lots of points. I add 200k without any big problem.
   // It seems these points could have been passed in as an array pointer too,
   //  but I'll look at that later.
   GL.Vertex3(x2, y2, z2);

   GL.End();
   glControl.SwapBuffers();
}
like image 129
Tedd Hansen Avatar answered Oct 05 '22 13:10

Tedd Hansen