% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vcg.R
\name{vcg_average_edge_length}
\alias{vcg_average_edge_length}
\title{Compute the average edge length of a triangular mesh}
\usage{
vcg_average_edge_length(mesh)
}
\arguments{
\item{mesh}{triangular mesh of class \code{'mesh3d'}.}
}
\value{
A single numeric value: the average edge length, in mesh units.
}
\description{
Computes the average length of all face edges (each edge is counted once
per incident face, so edges shared by two faces are counted twice).  Useful
as a scale-aware reference length, e.g. to derive a vertex-merge tolerance
such as the one used internally by \code{\link{vcg_fix_defects}}.
}
\examples{
if (is_not_cran()) {

  sphere <- vcg_sphere()
  vcg_average_edge_length(sphere)

}

}
