gf_slice_get
Purpose
Synopsis
int I = gf_slice_get(sl, 'dim') scalar I = gf_slice_get(sl, 'area') ivec cvlst = gf_slice_get(sl, 'cvs') int n = gf_slice_get(sl, 'nbpts') mat P = gf_slice_get(sl, 'pts') ivec NS = gf_slice_get(sl, 'nbsplxs') int NS = gf_slice_get(sl, 'nbsplxs',int dim) [imat S, ivec CV2SPLX] = gf_slice_get(sl, 'splxs', int dim) mat E = gf_slice_get(sl, 'edges') [mat P, ivec E1, ivec E2] = gf_slice_get(sl, 'edges') vec Usl=gf_slice_get(sl, 'interpolate_convex_data', Ucv) mesh m = gf_slice_get(sl, 'linked mesh') gf_slice_get(sl,'export_to_vtk', filename ... [, 'ascii'][, 'edges'],...) gf_slice_get(sl,'export_to_pov', filename, ...) gf_slice_get(sl,'export_to_dx', filename, ...[, 'ascii'][, 'edges'][, 'append'])int ms=gf_slice_get(sl, 'memsize')
Description
gf_slice_get(sl, 'linked mesh') : return the mesh on which the slice was taken.
gf_slice_get(sl, 'dim') : return the dimension of the points of the slice (2 for a 2D mesh, etc..).
gf_slice_get(sl, 'area') : return the area of the slice.
gf_slice_get(sl, 'cvs') : return the list of convexes contained in the slice (these convex numbers refer to the mesh object returned by gf_slice_get(sl, 'linked mesh').
gf_slice_get(sl, 'nbpts') : return the number of points in the slice, and their list can be obtained with gf_slice_get(sl, 'pts').
gf_slice_get(sl, 'nbsplxs' [, dim]) : return the number of simplexes in the slice. Since the slice may contain points (simplexes of dimension 0), segments (simplexes of dimension 1), triangles etc, the result is a vector of size gf_slice_get(sl, 'dim')+1 , except if the optional argument dim is used.
[S,CV2SPLX]=gf_slice_get(sl, 'splxs', dim) : return the list of simplexes of dimension dim. On output, S has dim+1 rows, each column contains the point numbers of a simplex. The vector CV2SPLX can be used to find the list of simplexes for any convex stored in the slice. For example S(:,CV2SPLX(4):CV2SPLX(5)-1) give the list of simplexes for the fourth convex.
[P,E1,E2]=gf_slice_get(sl, 'edges') : return also the edges of the linked mesh, but in a different style: P contains the list of all edge vertices, E1 contains the indices of each mesh edge in P, and E2 contains the indices of each "edges" which is on the border of the slice (used by gf_plot_slice).
gf_slice_get(sl, 'interpolate_convex_data', Ucv) should be used to map some data that is given on each convex of the mesh (for example the output of gf_mesh_get(m, 'quality')) to the slice nodes. The input array Ucv may have any number of dimensions, but its last dimension should be equal to gf_mesh_get(m,'max_cvid').
gf_slice_get(sl,'export_to_vtk', filename ... [, 'ascii'][, 'edges'],...) : export a slice to VTK. Following the file name, you may use any of the following options:
- if 'ascii' is not used, the file will contain binary data (non portable, but fast).
- if 'edges' is used, the edges of the original mesh will be written instead of the slice content. More than one dataset may be written, just list them.
gf_slice_get(sl,'export_to_vtk', 'test.vtk', Uslice, 'first_dataset', ...
mf, U2, 'second_dataset')
gf_slice_get(sl,'export_to_vtk', 'test.vtk', 'ascii', mf, U2)
gf_slice_get(sl,'export_to_vtk', 'test.vtk', 'edges', 'ascii', Uslice) gf_slice_get(sl,'export_to_pov', filename, ...) : export the triangles of the slice to POV-RAY.
gf_slice_get(sl,'export_to_dx', string FILENAME, ...) : export a slice to OpenDX. Following the file name, you may use any of the following options:
- if 'ascii' is not used, the file will contain binary data (non portable, but fast).
- if 'edges' is used, the edges of the original mesh will be written instead of the slice content. More than one dataset may be written, just list them.
- if 'append' is used, the opendx file will not be overwritten, and the new data will be added at the end of the file.
gf_slice_get(sl, 'memsize') : return the amount of memory (in bytes) used by the mesh_slice object.
