tetgen

How to mark faces of a hole in Tetgen?


Using a .poly file, I created models with holes in them. I would like to mark/identify the faces bounding these holes. Is there a way? Maybe using regions?


Solution

  • You can do it using the [boundary marker] attribute. See the example below.

    Example (with arbitrary numbers):

    342 3 0 1
    - - -
    1 0.312500 0.000000 0.000000 1
    2 0.304126 0.000000 0.031250 1
     . . .
    303 -0.004873 -0.259999 -0.017013 2
    304 -0.008291 -0.267013 -0.008944 2
     . . .
    

    where the format is:

    [index] [x_coordinate] [y_coordinate] [z_cordinate] [boundary marker]
    

    So now, you have marked vertices. So in the next part of the .poly file, we'll specify faces.

    676 1
    - - -
    1 0 1
    3 15 16 13
    1 0 1
    3 13 16 17
      . . .
    1 0 2
    3 304 303 335
    1 0 2
    3 303 309 335
    

    where the format is:

    [# of polygons] [# of holes] [boundary marker]
    [# of corners] [corner 1] [corner 2] ... [corner #]