Learn R Programming

MeshAgreement (version 0.1.4)

read_mesh_obs: Read mesh files

Description

Read a list of mesh objects from one observer from files.

Usage

read_mesh_obs(x, name, fix_issues=TRUE,
              reconstruct=c("No", "AFS", "Poisson"),
              spacing=1)

Value

List of mesh objects. Each object is a list with components name, mesh, volume, centroid, where mesh is a cgalMesh object. Use read_mesh to read a list of several mesh objects each for several observers. Use read_mesh_one to read a single mesh file.

Arguments

x

character vector of file names.

name

character vector of names that should be assigned to the mesh objects. If missing, names are taken from the file names.

fix_issues

logical. Try to fix mesh issues, such as not being closed, not bounding a volume, or having self-intersections. Uses surface reconstruction if mesh is not closed.

reconstruct

character. Use "No" for no reconstruction. "AFS" uses the AFSreconstruction method of the cgalMesh class to re-build the triangles from the vertices. Useful for meshes with defects such as not being closed or having self-intersections. "Poisson" currently not implemented and falls back to AFS.

spacing

Controls vertex spacing for reconstruct="Poisson". Currently not implemented.

Details

Supported file formats: STL, PLY, OBJ, OFF.

See Also

cgalMesh, read_mesh, read_mesh_one,

Examples

Run this code
if(interactive()) {
    src_dir <- system.file("extdata", package="MeshAgreement")
    ff      <- list.files(src_dir, pattern="^Obs01", full.names=TRUE)
    meshL   <- read_mesh_obs(ff, reconstruct="AFS")
    get_mesh_info_obs(meshL)
}

Run the code above in your browser using DataLab