View source: R/mesh_splitbypath.R
mesh_segment_by_path | R Documentation |
Cuts a mesh along a closed path defined on the basis of an ordered set of coordinates (ideally landmarks), and splits the mesh into multiple components. Note that you must provide a clean mesh, so please use vcgClean on the input.
mesh_segment_by_path(
mesh,
lms = NULL,
path.choice = "ridges",
mesh.path = NULL
)
mesh |
A (clean) mesh3d object |
lms |
(Deprecated) An ordered set of coordinates. Since this parameter is being deprecated, please use the output of sPathConnect to the mesh.path argument) |
path.choice |
(Deprecated) Described in sPathConnect. |
mesh.path |
A vector containing a list of connected vertices forming a closed path on the surface of the input mesh. This parameter should correspond to the output of sPathConnect |
A list of mesh objects containing a minimum of 3 faces each.
Minimum output mesh segment size is 3 faces. Anything smaller gets discarded silently.
Note also that the deprecated parameters will stop working in version 1 of this package at the latest.
Cornel M. Pop
library(rgl)
mesh.path <- sPathConnect(demoFlake2$lms, demoFlake2$mesh,
path.choice="ridges", closed=TRUE)
mesh.segs <- mesh_segment_by_path(demoFlake2$mesh, mesh.path=mesh.path)
shade3d(mesh.segs[[1]], color="green")
shade3d(mesh.segs[[2]], color="blue")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.