Example meshes
Include assets and/or use canonical paths.
Provide list of symbols for example
MeshProcessing.example
— Methodmesh = example(which::Symbol[; shift=nothing, scale=nothing,
z=nothing, transform=nothing, args=())
Generate example mesh, possibly with transformed geometry.
shift
apply translationscale
apply uniform scalingz
set z-coordinates toz(x, y)
(e.g., to lift planar meshes)transform
apply linear transformation. Note thattransform
and the above options are exclusive!args
provide additional arguments to generators (e.g.,example(:ring, args=6)
).
Available meshes include
which ∈ [:empty, :single_point, :unit_triangle, :unit_quad,
:two_triangles, :isolated_vertex, :eight, :unit_tetrahedron,
:unit_cube, :tetrahedron, :octahedron, :ring, :valence3,
:gargoyle, :gargoyle_cut, :beetle, :small_gargoyle, :small_bunny,
:planar1, :planar2, :planar3, :bunny, :fandisk, :hemisphere,
:sphere, :small_sphere, :isosahedron, :amo]
MeshProcessing.examplefile
— Methodpath = examplefile(filename[; ext="off", url=nothing, dl=dlinfo])
Get path
example filename
using file extension ext
and url
for download if the file is not already available in the local data directory dest
.
If the local destination directory dest
does not exist, it will be created. The url
defines the base resource path, the filename will be appended for download.
The callback dl
will be called directly before download. The default callback will output via @info
.
MeshProcessing.generate_ring
— Functionx, t = generate_ring(n)
Generate triangulation of unit circle with n
vertices of the boundary.
MeshProcessing.pmpoff
— Methodmesh = readoff(filename[; dest=DATA_DIR])
Load OFF file from PMP Library examples.
MeshProcessing.vcoff
— Methodmesh = vcoff(filename[; dest=DATA_DIR])
Load OFF file from VC examples.