TetGenSetHoles
TetGenSetHoles[expr,points]
sets the holes in a TetGen expression.
Details and Options
- To use TetGenSetHoles, you first need to load it using Needs["TetGenLink`"].
- TetGenSetHoles indicates to TetGen where a hole is located in a mesh.
Examples
Basic Examples (1)Summary of the most common use cases
To use TetGenLink it must first be loaded:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-sj5jo2
You start by specifying the coordinates and displaying them:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-z39z7q

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-4usdkk

Then you create the input instance and set the points:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-1b8aq9


https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-dqblt6

Next, the list of facets is created. If a facet list has more than one entry, like the third facet in this example, the first facet represents the bounding facet and the subsequent facets indicate where the bounding facet should have an opening:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-cw89eb

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-xawom3

Here one facet is shown with an outline of where the facet should be open:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-wybsmf

Set the facets in the input instance of TetGen:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-sayam6

For TetGen to open the facet, you must set up a facet hole:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-0n4k9l
Then set the facet holes in the TetGen input instance with the TetGenSetFacetHoles command:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-u8ukpx

With TetGenGetFacetHoles you can retrieve the value set in the TetGen instance:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-h1akp0

Here is the bounding facet and the facet hole position:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-izf10j

TetGen works by meshing the entire object first and then in a second step removing the mesh from holes and cavities. Note that the cavity also needs a point to specify where it is situated. The point that specifies the opening is not sufficient. To specify where TetGen should put holes, you use TetGenSetHoles:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-w06oa1

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-ed9vxm
With TetGenGetHoles you can retrieve the value set in the TetGen instance:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-5zem05


https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-hio4hq

To extract the faces and visualize them, you use TetGenGetFaces:

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-do8r8f

https://wolfram.com/xid/0e2f3gj4vxuvd3r3529kscgk-i7w98u

Wolfram Research (2010), TetGenSetHoles, Wolfram Language function, https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetHoles.html.
Text
Wolfram Research (2010), TetGenSetHoles, Wolfram Language function, https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetHoles.html.
Wolfram Research (2010), TetGenSetHoles, Wolfram Language function, https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetHoles.html.
CMS
Wolfram Language. 2010. "TetGenSetHoles." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetHoles.html.
Wolfram Language. 2010. "TetGenSetHoles." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetHoles.html.
APA
Wolfram Language. (2010). TetGenSetHoles. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetHoles.html
Wolfram Language. (2010). TetGenSetHoles. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetHoles.html
BibTeX
@misc{reference.wolfram_2025_tetgensetholes, author="Wolfram Research", title="{TetGenSetHoles}", year="2010", howpublished="\url{https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetHoles.html}", note=[Accessed: 03-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_tetgensetholes, organization={Wolfram Research}, title={TetGenSetHoles}, year={2010}, url={https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetHoles.html}, note=[Accessed: 03-May-2025
]}