MeshPrimitives

MeshPrimitives[mreg,d]
gives the graphics primitives for cells of dimension d in the mesh region mreg.

MeshPrimitives[mreg,cellspec]
gives the primitives specified by cellspec.

DetailsDetails

  • The primitives returned have the form where are points with explicit coordinates.
  • The mesh region mreg can be either MeshRegion or BoundaryMeshRegion.
  • The cell specification cellspec follows the standard form described for MeshRegion and BoundaryMeshRegion.
  • MeshCellCount can be used to find the maximum number of primitives for each dimension.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

Mesh primitives for a MeshRegion in 2D:

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

The 0D cell primitives include all the corner points:

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

The 1D cell primitives include all the edges:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=

The only 2D cell primitive is used as input:

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

Mesh cell primitives for a MeshRegion in 3D:

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

The 0D cells:

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

The 1D cell primitives:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=

The 2D cell primitives:

In[6]:=
Click for copyable input
Out[6]=
In[7]:=
Click for copyable input
Out[7]=
Introduced in 2014
(10.0)