cutMesh: crop triangular surface meshes

View source: R/selVert.r

cutMeshR Documentation

crop triangular surface meshes

Description

crop a surface mesh interactively.

Usage

cutMesh(
  mesh,
  visible = TRUE,
  keep.selected = TRUE,
  col = 3,
  add = FALSE,
  render = c("shade", "wire"),
  offset = 0.001,
  ...
)

Arguments

mesh

triangular mesh of class "mesh3d"

visible

select only vertices visible (from the present point of view)

keep.selected

logical: determines if the selected vertices or their complement are deleted.

col

color to render the mesh.

add

logical: add the surface to an existing window.

render

character: how to render the surface. Possible values are "shade" or "wire".

offset

initial offset to move vertex slightly away from the surface. 1e-3 seems to be a good threshold for objects from the macroscopical world.

...

additional arguments passed to the rendering functions shade3d and wire3d from package "rgl".

Details

select vertices or trim a triangular mesh by selecting a subset - either restricted to visible from the current point of view or by rectangular region. Visibility is determined by the fact that the vector from the viewpoint to the selected vertex does not intersect the mesh.

Value

selectVertex returns the indices of the selected vertices.

cutMesh returns the trimmed mesh.

Author(s)

Stefan Schlager

See Also

vcgPlyRead, glVisible, selectVertex

Examples


## Not run: 
require(Morpho)
data(nose)
selection <- cutMesh(shortnose.mesh)

## End(Not run)

zarquon42b/mesheR documentation built on Jan. 28, 2024, 2:17 p.m.