1

What is the best way, to mesh a rectangular structure as you can see it here: Structure to mesh What is special here, is the large difference in size between the thin grey structures and the large white gaps. Hence, a regular recangle-grid might not be the best option.

I tried a Quadtree, where I started with a 10x10 Grid and splitted one cell into four, if the cell contains grey and white structure. But I get an unnecessary large number of cells.

Voronoi might also not be the best choise, since my shape is always perfectly rectangular.

Is there any way to take into account the shape of the structure from the beginning?

Pixel_95
  • 954
  • 2
  • 9
  • 21
  • Are you looking to create a structured grid or unstructured? What mesh element(s) do you want: triangles, rectangles, quads? Do you have to do it inside your code, or you can use a meshing software/library? Is your structure "fixed" or it is just a structure pattern? – Anton Menshov Aug 20 '19 at 18:16
  • @AntonMenshov: I guess rectangles are the best, since I only have recangular patterns. I have to do it inside my code, which is in C#. My structure is fixed. The user can set it in the beginning but then it wont't change anymore. – Pixel_95 Aug 21 '19 at 05:54

1 Answers1

0

What is the best way

Depends on what you mean by "best".

I wouldn't bother so much with the structure and just use any of the existing mesh generators, e.g.,

and perhaps throw optimesh on it. (Disclaimer: pygmsh, dmsh, optimesh are written by me.)

All of those methods should give you a good triangular mesh to start with.

Nico Schlömer
  • 53,797
  • 27
  • 201
  • 249