ray2mesh {Morpho}R Documentation

projects the vertices of a mesh along its normals onto the surface of another one.

Description

projects the vertices of a mesh onto the surface of another one by searching for the closest point along vertex normals on the target by for each vertex.

Usage

ray2mesh(mesh1, tarmesh, tol = 1e+12, inbound = FALSE, mindist = FALSE, ...)

Arguments

mesh1

mesh to project. Can be an object of class "mesh3d" or path to an external mesh file (ply, obj, stl).

tarmesh

mesh to project onto. Can be an object of class "mesh3d" or path to an external mesh file (ply, obj, stl).

tol

numeric: maximum distance to search along ray, closest Euclidean distance will be used, if tol is exceeded.

inbound

inverse search direction along rays.

mindist

search both ways (ray and -ray) and select closest point.

...

additional arguments not used at the moment.

Value

returns projected mesh with additional list entries:

quality

integer vector containing a value for each vertex of x: 1 indicates that a ray has intersected 'tarmesh' within the given threshold, while 0 means not

distance

numeric vector: distances to intersection

Author(s)

Stefan Schlager

See Also

ply2mesh, closemeshKD


[Package Morpho version 2.12 Index]