wildmeshing / fTetWild

Fast Tetrahedral Meshing in the Wild
https://yixin-hu.github.io/ftetwild.pdf
Mozilla Public License 2.0
420 stars 82 forks source link

preserve stl surface solids? #62

Closed XuliaDS closed 1 year ago

XuliaDS commented 1 year ago

Hello ! Thanks for sharing this tool!! Looks very nice. I see that you can create conformal meshes coming from multi-regions. That's amazing!! I am curious about one thing: I would like to use this for a numerical simulation and prescribe different boundary conditions according to different regions (solids) of my .stl data files. For example: a simple cube split into top, sides, bottom would look like this: myCube.stl:

solid red ... some faces ... end solid red

solid gray ... some faces ... end solid gray

solid blue ... some faces ... end solid blue

image

if I run:


$tetwild -i myCube.stl -o tetCube.msh --no-binary


I get a nice meshed cube but the patches (physical Surface in GMSH) are not shown.

image

Lets say I want to use the resulting mesh and impose BCs:

red: myBC 1 gray: myBC 2 blue: myBC 3

how do you know which elements do these patches correspond to ? I've seen that when you perform union of two objects (or stl), you keep the parent body tagged and we know to which original region the elements belong to. Do you have a similar thing for the parent surfaces? Sorry if this already exists, I could not find it.

Thanks a lot !!

Xulia

Yixin-Hu commented 1 year ago

Hi,

fTetWild or TetWild does not output the correspondence of the input faces and the output faces. However, you may try to check the distance of the faces of the output tetmesh and the input object's facets to construct the correspondence on your own. The color of the output faces can be a way to visualize the correspondence, for which you can check the documentation of gmsh.

XuliaDS commented 1 year ago

thanks very much !