TetGenImport


imports data from a file into a TetGen expression.


imports data in the specified format.

DetailsDetails

  • To use , you first need to load it using Needs["TetGenLink`"].
  • The following formats specific to TetGen are supported by :
  • "node"a list of nodes
    "poly"a piecewise linear complex
    "smesh"a simple piecewise linear complex
    "ele"a list of tetrahedra
    "face"a list of triangular faces
    "vol"a list of maximum volumes
    "var"a list of variant constraints for facets/segments
    "neigh"a list of neighbors
  • The following general formats are supported by :
  • "off"Geomview's polyhedral file format
    "ply"polyhedral file format
    "stl"computer-aided design and manufacturing format
    "mesh"Medit's surface mesh file format
  • If no format is given, it is determined from the file extension.
  • currently works with the ASCII version of the above mentioned formats only. Use Import for binary versions of the file formats.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

First, load the package:

In[1]:=
Click for copyable input

This creates an instance of a TetGen expression:

In[2]:=
Click for copyable input
Out[2]=

This finds a sample data file in the TetGenLink installation:

In[3]:=
Click for copyable input

This loads the data file into the TetGen instance:

In[4]:=
Click for copyable input

This extracts the points and facets:

In[5]:=
Click for copyable input

This plots the shape:

In[6]:=
Click for copyable input
Out[6]=