DVslice_gen


Synopsis

extract a 2D slice from a structured or unstructured field using an arbitrarily oriented slice plane


group DVslice_gen {
Mesh+Node_Data+Iparam &in { /* input field */
nnodes+req;
};
Plane_Grid+Xform+Iparam &plane; /* slice plane */
float+notify+IPort2 dist; /* plane distance */
int+Iparam map_comp[];


DVplane_dist DVplane_dist {
in => <-.in;
plane => <-.plane;
};
DVcomb_mesh_and_data DVcomb_mesh_and_data {
in_mesh => <-.in;
in_nd => DVplane_dist.out;
};
DViso DViso<vpy=341,vpx=297> {
in => DVcomb_mesh_and_data.out;
level => DVplane_dist.dist+(<-.dist);
};
DVnmap DVnmap {
in => <-.in;
nparam => DViso.nparam;
map_comp => <-.map_comp;
};
DVcomb_mesh_and_data DVcomb_mesh_and_data_1 {
in_mesh => DViso.out;
in_nd => DVnmap.out;
};
Mesh+Node_Data+Oparam &out=>DVcomb_mesh_and_data_1.out;
};

Description

DVslice_gen extracts an arbitrarily-oriented 2D slice of data from an unstructured or structured 3D mesh field. Any number of components can be extracted. Output is generated every time the slice plane moves.

Input

&in

The input is a reference to a field that must be a 3D field (Dims3) with an unstructured or structured mesh and any type of Node_Data.

&plane

A reference to a Plane_Grid object that will be the slicing plane. This could be generated by the plane object found in Geometries.Plane, or it could be any 2D Mesh_Unif. The plane object generated by Geometries.Plane's advantage is that its plane object has its own Plane Transformation panel that controls plane rotation, translation, and scale, as well as controls to specify its size when it is connected to the Module Stack object.

 

dist

A float. This value will move the plane through the field perpendicular to the plane. Though the Plane Transformation panel has X, Y, and Z transformation controls, it is usually easier to use plane's controls to orient and size the plane, but use this plane distance control to move the plane. DVslice_gen generates output whenever the slice plane moves.

map_comp[]

An integer array. Each array value is the number (from 0 up) of a component to extract. For example:

(a, b, c, [e, f, g]) --> set map_comp = {0, 3} --> (a, [e, f, g]) in the output field

Note that this array is not explicitly dimensioned. It is a variable-length array that will have as many values as you assign to it with the = { n, n, n,...n} notation. The supplied AVS/Express modules that use DVslice_gen implicitly set the dimension to 1 by specifying map_comp = {0}, i.e., the user can specify any one component to send to the output field, and the default is the first (0th) component.

Output

&out

The output is a reference to the output of the DVcomb_mesh_and_data object. It contains a new, subsetted 2D Mesh and a new Node_Data of the selected components' slices. Where the slice plane does not land exactly on a node, the data value is interpolated from the values of the adjacent nodes.

Algorithm

DVslice_gen uses trilinear interpolation to interpolate data values between mesh nodes.

Files

v/dv.v

Example

Libraries.Main.Mappers.slice

See also