TetGenLink`
TetGenLink`

TetGenImport

TetGenImport["file.ext",expr]

imports data from a file into a TetGen expression.

TetGenImport["file",expr,"format"]

imports data in the specified format.

更多信息和选项更多信息
  • To use TetGenImport, you first need to load it using Needs["TetGenLink`"].
  • The following formats specific to TetGen are supported by TetGenImport:
  • "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 TetGenImport:
  • "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.
  • TetGenImport currently works with the ASCII version of the above mentioned formats only. Use Import for binary versions of the file formats.
  • 范例

    基本范例  (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]=

    参见

    TetGenCreate  TetGenExpression  TetGenExport  TetGenTetrahedralize

    教程