Yixin-Hu / TetWild

Robust Tetrahedral Meshing in the Wild.
https://yixin-hu.github.io/tetwild.pdf
GNU General Public License v3.0
612 stars 98 forks source link

Multi-Material Meshing #61

Closed jonathanhestroffer closed 4 years ago

jonathanhestroffer commented 4 years ago

Hi,

I have a "part" which is multi-material. I have an .STL file for every material surface mesh and I would like to perform volume meshing and output the tetmesh for each material. I attached an image of an example part and as you can see each unique material is colored.

Multimaterial

Using a different program, I can get a volume mesh in the form I need (tets assigned to a particular material Id), but the mesh quality isn't great. Do you think I can use TetWild for this?

Multimaterial2

Best :) Jonathan

Yixin-Hu commented 4 years ago

Hi Jonathan,

Yes, you can try tetwild on it. After you get the tetmesh, you can write a function to postprocess the mesh taking a 3d point (the centroid of a tet) as input and returning the material it belongs to.

Hope this helps, Yixin

jonathanhestroffer commented 4 years ago

After some research I came across Generalized Winding Number.

What do you think?

Best, Jonathan

On Tue, Feb 25, 2020 at 9:58 AM Jonathan Hestroffer < jonathanhestroffer@ucsb.edu> wrote:

Thank you Yixin!

I was thinking this might be the best option but I wasn't sure how computationally efficient it would be. Would you recommend a specific algorithm?

  • Testing whether point (x,y,z) is inside a geometry (.stl)

Best, Jonathan

On Tue, Feb 25, 2020 at 9:50 AM Yixin Hu notifications@github.com wrote:

Hi Jonathan,

Yes, you can try tetwild on it. After you get the tetmesh, you can write a function to postprocess the mesh taking a 3d point (the centroid of a tet) as input and returning the material it belongs to.

Hope this helps, Yixin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Yixin-Hu/TetWild/issues/61?email_source=notifications&email_token=ANK6HDQFOS44H3SEOHFIYILREVK6HA5CNFSM4K23V6X2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM42RQA#issuecomment-590981312, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANK6HDRS7BRWFO62HNGDZBTREVK6HANCNFSM4K23V6XQ .

Yixin-Hu commented 4 years ago

You can use winding number, but during this step (not meshing step) you need to make sure the faces of each component has same orientation (the face normals point outside of the component).

jonathanhestroffer commented 4 years ago

Thank you Yixin!

On Tue, Feb 25, 2020 at 3:43 PM Yixin Hu notifications@github.com wrote:

You can use winding number, but during this step (not meshing step) you need to make sure the faces of each component has same orientation (the face normals point outside of the component).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Yixin-Hu/TetWild/issues/61?email_source=notifications&email_token=ANK6HDSQGN2AFPAHAJ73XPTREWUKHA5CNFSM4K23V6X2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM6BWCQ#issuecomment-591141642, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANK6HDQFDTAIFPRO67N27W3REWUKHANCNFSM4K23V6XQ .

rossisimone commented 4 years ago

I am also interested in creating a multimaterial mesh. How can we do that with TetWild?

I have 3 complex "concentrical" tubes defined as STL files. I would like to define a volumetric mesh of the whole thing such that the final tet mesh "conforms" to the provided surface layers. I was able to create a separate tet mesh for each of the STLs, but I'm not sure how to use the multimaterial functionalities.

I can easily postprocess it to assign the materials in a second step.

Thanks, Simone

Yixin-Hu commented 4 years ago

Hi Simone,

TetWild preserves all faces both inside and outside. You can combine your STLs into one and run tetwild on it. After you get the tetmesh, do the postprocessing I mentioned above.