Skip to contents

Convert objects to fm_mesh_3d

Usage

fm_as_mesh_3d(x, ...)

fm_as_mesh_3d_list(x, ...)

# S3 method for class 'fm_mesh_3d'
fm_as_mesh_3d(x, ...)

Arguments

x

Object to be converted

...

Arguments passed on to submethods

Value

An fm_mesh_3d or fm_mesh_3d_list object

Functions

  • fm_as_mesh_3d(): Convert an object to fm_mesh_3d.

  • fm_as_mesh_3d_list(): Convert each element of a list

Examples

(m <- fm_mesh_3d(
  matrix(c(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), 4, 3, byrow = TRUE),
  matrix(c(1, 2, 3, 4), 1, 4, byrow = TRUE)
))
#> fm_mesh_3d object:
#>   Manifold:	R3
#>   V / E / T / Tet:	4 / 6 / 4 / 1
#>   Euler char.:	1
#>   Bounding box: (0,1) x (0,1) x (0,1)
#>   Basis d.o.f.:	4
fm_as_mesh_3d_list(list(m))
#> fm_mesh_3d object:
#>   Manifold:	R3
#>   V / E / T / Tet:	4 / 6 / 4 / 1
#>   Euler char.:	1
#>   Bounding box: (0,1) x (0,1) x (0,1)
#>   Basis d.o.f.:	4