Description Usage Arguments Details Value See Also Examples
Wrapper for the function decimMesh.mesh3d
to decimate a set of mesh files contained
within a directory.
1 2 3 |
M |
A character value indicating either a mesh filename to decimated within |
tarface |
An integer numerical value for the targetted number of faces for decimation (if superior or equal
to the number of faces in |
sdir |
A character value indicating the directoy name containg eiher the mesh filename |
patt |
A character value within { |
deci.suffix |
A character value indicating the suffix added at the end of the decimated mesh filenames and
before the |
deci.dir |
A character value indicating the name of the subdirectory in |
verbose |
Possible settings are: |
... |
Optional arguments for |
This function is a wrapper for decimMesh.mesh3d
(itself a wrapper for
vcgQEdecim
), calling it to treat a list of full mesh files, which will be
decimated the one after the other. It looks in the directory sdir
for either a mesh filename
specified by the character value stored in M
, or a subdirectory whose name stored in M
that contains the mesh files to decimate. By default, the level of decimation is set by the
target
argument, but other settings are possible (see vcgQEdecim
).
Decimated mesh are then saved either in the same directory than full meshes, by adding
a suffix in decimated mesh filenames (to distinguish them from full mesh filenames), or in a separate
subfolder (contained in the directory for full meshes). Both ply and stl mesh files are supported
(but decimated meshes will be uniquely saved as ply).
A list of decimated mesh3d
objects.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
# 1st example: decimating a mesh file
# A basic call consists in giving the filename of the mesh to decimate (contained in the working directory):
L <- decim("mesh2decimate.ply")
# 2nd example: decimating mesh files in a given directory
# If the working directory contains a subdirectory named "fold" with the full resolution mesh files to decimate, a basic call of the function is:
L <- decim("fold")
# 3rd example: decimating mesh files following a targetted face number percentage (see the help of vcgQEdecim for details):
L <- decim("fold", percent = 0.3)
# 4th example: decimating stl files (contined in the "fold4stl" folder):
L <- decim("fold4stl", patt=".stl")
# 5th example: saving decimating meshes in the same folder as the full meshes by sepcifying their suffix:
L <- decim("fold", deci.suffix="suffix4decimatedMesh", deci.dir=NULL)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.