TetGenSetRegions[expr,pts,index,attrs]
sets the regions in a TetGen expression.
TetGenSetRegions
TetGenSetRegions[expr,pts,index,attrs]
sets the regions in a TetGen expression.
Details and Options
- To use TetGenSetRegions, you first need to load it using Needs["TetGenLink`"].
- TetGenSetRegions allows you to set different regions in TetGen instances.
Examples
Basic Examples (1)
Needs["TetGenLink`"]This creates an instance of a TetGen expression:
inst = TetGenCreate[]This sets up points and facets to use:
pts = {{0., 0., 0.}, {2., 0., 0.}, {2., 0., 2.}, {0., 0., 2.}, {0., 12., 0.}, {2., 12., 0.}, {2., 12., 2.}, {0., 12., 2.}};
facets = {{{1, 2, 3, 4}}, {{5, 6, 7, 8}}, {{1, 5, 6, 2}}, {{2, 6, 7, 3}}, {{3, 7, 8, 4}}, {{4, 8, 5, 1}}};This sets the points and facets in the TetGen instance:
TetGenSetPoints[inst, pts];
TetGenSetFacets[inst, facets];This sets up variables that specify a point within a material domain, as well as a region attribute and a region constraint:
materialDomains = {{1., 0.25, 0.1}};
materialDomainsRegionAttribute = {10.};
materialDomainsRegionConstraint = {0.05};The material variables are set in the TetGen instance:
TetGenSetRegions[inst, materialDomains, materialDomainsRegionAttribute, materialDomainsRegionConstraint];This carries out the tetrahedralization, returning a new TetGen instance. The switch "A" is needed to process the material data:
outInst = TetGenTetrahedralize[ inst, "pqaA"]This extracts the element attributes:
TetGenGetElementAttributes[outInst]//ShortThis extracts the points and faces from the tetrahedralization:
elemPts = TetGenGetPoints[outInst];
elemFaces = TetGenGetFaces[outInst];Graphics3D[GraphicsComplex[elemPts, Polygon[elemFaces]]]See Also
Tech Notes
Related Guides
Text
Wolfram Research (2010), TetGenSetRegions, Wolfram Language function, https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetRegions.html.
CMS
Wolfram Language. 2010. "TetGenSetRegions." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetRegions.html.
APA
Wolfram Language. (2010). TetGenSetRegions. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetRegions.html
BibTeX
@misc{reference.wolfram_2026_tetgensetregions, author="Wolfram Research", title="{TetGenSetRegions}", year="2010", howpublished="\url{https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetRegions.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_tetgensetregions, organization={Wolfram Research}, title={TetGenSetRegions}, year={2010}, url={https://reference.wolfram.com/language/TetGenLink/ref/TetGenSetRegions.html}, note=[Accessed: 15-June-2026]}