(from version
0.5.0.9003
)
Constructs a new mesh based on a subset of the triangles of an existing mesh.
The current version drops any edge constraint information from the mesh.
Author
Finn Lindgren Finn.Lindgren@gmail.com
Examples
mesh_sub <- fm_subset(fmexample$mesh, 1:100)
mesh_sub
#> fm_mesh_2d object:
#> Manifold: R2
#> V / E / T: 173 / 267 / 100
#> Euler char.: 6
#> Constraints: Boundary: 234 boundary edges (1 group: 0), Interior: 0 edges
#> Bounding box: (-5.331027, 4.061656) x (-3.998161, 5.415609)
#> Basis d.o.f.: 173
plot(mesh_sub)
if (requireNamespace("geometry", quietly = TRUE)) {
print(m <- fm_delaunay_3d(matrix(rnorm(30), 10, 3)))
print(fm_subset(m, seq_len(min(5, nrow(m$graph$tv)))))
}
#> fm_mesh_3d object:
#> Manifold: R3
#> V / E / T / Tet: 10 / 32 / 40 / 17
#> Euler char.: 1
#> Bounding box: (-0.4881249, 1.7987806) x (-0.686793, 2.175231) x (-2.536983, 1.641478)
#> Basis d.o.f.: 10
#> fm_mesh_3d object:
#> Manifold: R3
#> V / E / T / Tet: 7 / 16 / 15 / 5
#> Euler char.: 1
#> Bounding box: (-0.4881249, 1.7987806) x (-0.686793, 2.175231) x (-2.536983, 1.641478)
#> Basis d.o.f.: 7