Learn R Programming

cgalMeshes (version 2.2.0)

exteriorEdges: Exterior edges of a mesh

Description

Returns the edges of a mesh whose corresponding dihedral angles are not too flat.

Usage

exteriorEdges(edgesDF, angleThreshold = 1)

Value

An integer matrix giving the vertex indices of the exterior edges.

Arguments

edgesDF

the dataframe returned by the edges method of cgalMesh

angleThreshold

maximum deviation in degrees from the flat angle; for example if angleThreshold=1, then an edge is considered as exterior if its corresponding dihedral angle is lower than 179 or higher than 181

Examples

Run this code
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)

Run the code above in your browser using DataLab