vtkBooleanOp: run boolean operations on mesh

Description Usage Arguments Value Examples

View source: R/vtkBooleanOp.r

Description

run boolean operations on mesh

Usage

1
vtkBooleanOp(mesh1, mesh2, type = 0, reorient = TRUE, tol = 1e-06)

Arguments

mesh1

triangular mesh

mesh2

triangular mesh

type

integer: boolean operation. 0=Union, 1=intersection, 2=difference

reorient

logical: Turn on/off cell reorientation of the intersection portion of the surface when the type=2 (DIFFERENCE). Defaults to TRUE.

tol

Set the tolerance used to determine when a point's absolute distance is considered to be zero. Defaults to 1e-6.

Value

returns manipulated mesh

Examples

1
2
3
4
5
6
require(Rvcg);require(Morpho)
sphere <- vcgSphere()
myplane <- list(vb=rbind(cbind(c(1,0,0),c(0,1,0),c(0,0,1)),1),
                it=as.matrix(c(1:3)));class(myplane) <- "mesh3d"
myplane <- scalemesh(myplane,5)
cutsphere <- vtkBooleanOp(sphere,myplane,type = 2)

zarquon42b/RvtkStatismo documentation built on May 4, 2019, 9:09 p.m.