removeIntersect: This functions aims to translate two meshes to remove an...

View source: R/removeIntersect.r

removeIntersectR Documentation

This functions aims to translate two meshes to remove an intersection

Description

This functions aims to translate two meshes to remove an intersection. This is done based on signed distance

Usage

removeIntersect(
  reference,
  target,
  stepsize = 0.2,
  maxit = 100,
  tol = 1,
  outside = TRUE,
  gradthresh = -Inf,
  gradn = Inf,
  realign = FALSE,
  minalign = 5,
  alignthresh = 0.5,
  visualize = FALSE,
  silent = FALSE,
  threads = 0,
  alpha = 1
)

Arguments

reference

matrix or mesh

target

mesh of class mesh3d

stepsize

regularize the actual displacement

maxit

maximum iterations

tol

positive number: stop if intersection is less than tol

outside

logical: if TRUE the reference will be placed outside of the target. Inside otherwise

gradthresh

numerical: (abs) gradient threshold to determine convergence

gradn

integer: number of steps to include in computing gradient

realign

logical: if TRUE, reference will be aligned by the points closest outside/inside of the target surface.

alignthresh

threshold which points to consider for realignment. For alignthresh=.5, all coordinates within .5 mm outside/inside of the targtet will be used to realign the shape.

visualize

logical: if TRUE watch the approximation

silent

logical: suppress messages

threads

number of threads to use for closest point search (0=auto)

alpha

value with 0 <= alpha <=1 to render surface opacity of the target mesh.

Details

This is a quite simple attempt to remove an intersection after the alignment of two meshes. This is achieved by translating reference along the average difference vectors of all vertices


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