-
Notifications
You must be signed in to change notification settings - Fork 3
/
exteriorEdges.Rd
38 lines (37 loc) · 1.16 KB
/
exteriorEdges.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Edges.R
\name{exteriorEdges}
\alias{exteriorEdges}
\title{Exterior edges of a mesh}
\usage{
exteriorEdges(edgesDF, angleThreshold = 1)
}
\arguments{
\item{edgesDF}{the dataframe returned by the \code{getEdges} method of
\code{\link{cgalMesh}}}
\item{angleThreshold}{maximum deviation in degrees from the flat angle; for
example if \code{angleThreshold=1}, then an edge is considered as exterior
if its corresponding dihedral angle is lower than 179 or higher than 181}
}
\value{
An integer matrix giving the vertex indices of the exterior edges.
}
\description{
Returns the edges of a mesh whose corresponding dihedral angles
are not too flat.
}
\note{
Once you get the exterior edges, say in \code{extEdges}, then you can
get the indices of the exterior vertices with
\code{which(table(extEdges) != 2)}.
}
\examples{
library(cgalMeshes)
library(rgl)
mesh <- cgalMesh$new(dodecahedron3d())
extEdges <- exteriorEdges(mesh$getEdges())
vertices <- mesh$getVertices()
open3d(windowRect = 50 + c(0, 0, 512, 512), zoom = 0.9)
shade3d(dodecahedron3d(), color = "tomato")
plotEdges(vertices, extEdges)
}