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.

Details

  • The primitives returned have the form prim[{p1,p2,}] where pk 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.

Examples

open allclose all

Basic Examples  (2)

Mesh primitives for a MeshRegion in 2D:

The 0D cell primitives include all the corner points:

The 1D cell primitives include all the edges:

The only 2D cell primitive is used as input:

Mesh cell primitives for a MeshRegion in 3D:

The 0D cells:

The 1D cell primitives:

The 2D cell primitives:

Scope  (8)

Mesh primitives for a MeshRegion in 1D:

The 0D cell primitives include the end points:

The 1D cell primitives include all the line segments:

Mesh primitives for a MeshRegion in 2D:

The 0D cell primitives include all the corner points:

The 1D cell primitives include all the edges:

The only 2D cell primitive is used as input:

Mesh cell primitives for a MeshRegion in 3D:

The 0D cells:

The 1D cell primitives:

The 2D cell primitives:

Specify a list of 1D cell primitives:

Alternatively, you can specify a head and indices:

Use a pattern to get every odd 0D cell primitive:

All 0D cell primitives:

A list of 2D cell primitives:

A list of mixed-dimensional cell primitives:

Specify a list of 0D cell primitives from a 2D BoundaryMeshRegion:

Specify a list of 0D and 1D cell primitives from a 3D BoundaryMeshRegion:

Properties & Relations  (1)

MeshCellCount can be used to find the maximum number of primitives for each dimension:

Wolfram Research (2014), MeshPrimitives, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshPrimitives.html.

Text

Wolfram Research (2014), MeshPrimitives, Wolfram Language function, https://reference.wolfram.com/language/ref/MeshPrimitives.html.

CMS

Wolfram Language. 2014. "MeshPrimitives." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MeshPrimitives.html.

APA

Wolfram Language. (2014). MeshPrimitives. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MeshPrimitives.html

BibTeX

@misc{reference.wolfram_2024_meshprimitives, author="Wolfram Research", title="{MeshPrimitives}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MeshPrimitives.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_meshprimitives, organization={Wolfram Research}, title={MeshPrimitives}, year={2014}, url={https://reference.wolfram.com/language/ref/MeshPrimitives.html}, note=[Accessed: 22-December-2024 ]}