meshpro / pygalmesh

:spider_web: A Python interface to CGAL's meshing tools
GNU General Public License v3.0
580 stars 57 forks source link

generation from array #203

Open MHenrich1990 opened 1 year ago

MHenrich1990 commented 1 year ago

Hi, for the generation of microstructure models (representative volume elements) I'm using numpy arrays. The meshing with the generate_from_array function works fine. However, it would be great if there was an option to define feature edges which can be used to force the elemetnts on the edges of the array, to actually have a cube. otherwise the mesh looks like this:

Pygalmesh_test

Basically, what I need is a cubic shape for the surface of the array mesh as shown here:

Pygalmesh_pure_array

Is this somehow possible? Thanks!

hm7788 commented 1 year ago

I was also looking for the same feature edge solution. Has anyone figured it out yet?

lrineau commented 1 year ago

In CGAL_5.6-beta1, there is that feature. See section 4.6.3 Domains from Segmented 3D Images, with 1D Features of the Mesh_3 chapter.

Edit: sorry I thought that was an issue of https://github.com/CGAL/cgal. In pygalmesh, I do not know if that possibility is available, or will be soon.

hm7788 commented 1 year ago

thank you, good to know such function in CGAL. I don't see such a function in pygalmesh yet, I am not quite familiar with C++, so it might be challenging to implement for me. Hopefully someone could wrap it in a python version someday..

jmetancelin commented 7 months ago

I was also looking for proper edges detection. PR #210 is extending the python interface to support that 1D feature detection from CGAL C++.