Basic geometry
Area and normals
MeshProcessing.surfacearea
— MethodMeshProcessing.trianglearea
— MethodMeshProcessing.triangleareas
— MethodMeshProcessing.trianglenormal
— MethodMeshProcessing.trianglenormals
— MethodMeshProcessing.vertexnormals
— Methodvnrm, trm, ar = vertexnormals(mesh[; weight=:area])
Estimate vertex normals from weighted triangle normals. Choices for weight
are
:area
area weighting:invarea
inversearea weighting:uniform
uniform weighting
See also trianglenormals
Transformations
MeshProcessing.aabb
— MethodGet axis-aligned bounding box of mesh
as 3×2
matrix.
MeshProcessing.centerdmean
— MethodGet mesh with vertex positions shifted to zero mean.
MeshProcessing.centerdmeanpositions
— MethodGet shifted positions(mesh)
with zero mean .
MeshProcessing.makecenterdunitcube
— MethodMake transformation that translates and uniformly scales mesh
to bounding box [-1,1]
^3`.
The transformation is returned as NamedTuple
, which defines arguments to transform
.
MeshProcessing.makecenterunitsphere
— MethodMake transformation that translates and uniformly scales mesh
to the unit sphere.
The transformation is returned as NamedTuple
, which defines arguments to transform
.
MeshProcessing.radius
— MethodGet radius of mesh
w.r.t. center
.
MeshProcessing.tounitcube
— MethodReturn mesh
transform
ed by makecenterdunitcube
.
MeshProcessing.tounitsphere
— MethodReturn mesh
transform
ed by makecenteredunitsphere
.
MeshProcessing.transform
— MethodGet mesh with transformed coordinates A*(x-x0)+b
.
Statistics
MeshProcessing.centroid
— Methodc = centroid(mesh, k)
Get centroid of triangle k
.
MeshProcessing.centroid
— Methodc = centroid(mesh)
Get centroid of mesh from area weighted triangle centroids.
MeshProcessing.meanedgelength
— Methodlen = meanedgelength(mesh)
Get mean edge length.
MeshProcessing.pca
— Function U, σ, μ = pca(mesh[; μ=mean(mesh)])
Compute Principle Component Analysis of positions(mesh)
. The mean positions μ spectral decomposition of the covariance matrix C= X'*X / n
, such that
C = U * Diagonal(σ)^2 * U'
and σ[1] >= σ[2] >= σ[3]
contains the singular values of the positions.