plane_project & plane_project_ARR

Synopsis

A mapper module that slices an unstructured or irregular 3D model with a plane, producing a secondary 2D slice projected flat down the normal of the slice plane, for projection into secondary 2D view window.

Input Ports

Name Type Description

in_field Field Data to be sliced and projected by module.

Parameters

These macros use the same parameters as the standard AVS slice_plane module.

Output Ports

Name Type Description

out_fld Field 3D data slice.
out_plane Mesh plane used to generate data slice.
out_obj_slice GDobject directly renderable slice object.
out_obj_plane GDobject directly renderable plane object.
out_obj_2d GDobject secondary 2D slice projection.

Description

plane_project and plane_project_ARR are mapper macros that slice a 3D model and return both slices as both a 3D slice from the original model and a 2D plane projected flat along the normal of the slice plane. This 2D plane can be used for projection into an ancillary 2D view. The plane_project and plane_project_ARR macros functionally very similar except that the plane_project_ARR macro operates on arrays of field data. Except where noted all information applies equally to both macros. Please see the AVS/Express documentation for more information on working with arrays of fields.

These user macros are variations on the standard slice_plane module, which slices a 3D model by using a simple plane tool. The macros extend this basic functionality by generating a transformed version of the slice plane with Z=0. This 2D slice plane is output as a DataObject that can be directly displayed in a 2D viewer. Hence provided a useful ancillary 2D view of the main visualization.

As well as the C code in low-level module implementation this project also makes use of several other low-level DV modules and base classes. Unfortunately because of this the project can only be used with the AVS/Express Developer's edition.

Inputs

in_field

Input data that is to be sliced by the module. The plane_project macro takes a single field as input whilst the the plane_project_ARR macro takes an array of fields as input. Each field of input data should consist of a 2D or 3D mesh. This mesh can have any structure. Optionally the data can also contain node data or cell data.

Parameters

The parameters used by these macros are the same as those used by the slice_plane module. Please refer to the AVS/Express documentation for parameter and user interface information.

Outputs

out_fld

Output data representing the slice generated by the macro. The plane_project macro outputs a single field whilst the the plane_project_ARR macro outputs an array of fields. Each output field will consist of a new mesh representing the slice of data. If node data or cell data is present on the input the output will also contain new data sets.

out_plane

A 2d mesh that represents the plane used to slice the input data.

out_obj_slice

Directly renderable output object generated from the out_fld output that represents the new slice of data.

out_obj_plane

Directly renderable output object generated from the out_plane output that represents the plane used slice the input data. If this object is connected to a viewer and transformed, the transforms made will be reflected in the slices taken of the input data.

out_obj_2d

Directly renderable output object containing a 2d version of the data slice. This is generated by projecting the 3D slice flat along the normal of the slice plane. No field output is provided for this data as the 2d slice is only intended to be used to display an ancillary 2D view.

Utility Modules

The low-level plane_proj module is used in the plane_proj2 functional macro. This macro is in turned used by the user macros plane_project and plane_project_ARR. These user macros also use the PlaneProjectUI user interface macro.

Example

Two example applications are provided with this project. PlaneProjectEg demonstrates the use of the standard user macro by reading in a set of data and using the plane_project macro to slice the data and generate a 2D projection of that slice. PlaneProjectArrEg demonstrates the use of the array based user macro in a similar way.

Files

iac_proj/planep/plp_macs.v contains the V definitions of the PlaneProjectUI UI macro, the plane_project and plane_project_ARR user macros and the PlaneProjectEg and PlaneProjectArrEg example applications.

Prerequisites

This project relies on the successful installation of the following components. Without them it will not function correctly.

Other Notes

The user macros provided with this project are derived from the standard AVS module "Slice Plane". These macros are based on the same underlying system, but substitute the slice plane processing module and adds a new 2D output port. Please refer to the documentation for that module for further information on the use of the macros.

The PlaneProjectMacs library inherits its process. As this library contains no procedural code, the process is not important. The low-level plane_proj module, executes under the process specified in its library, not the process defined in the high-level library.

Author

Ian Curington
Advanced Visual Systems, Ltd.
Hanworth Lane, Chertsey Surrey, UK
KT16 9JX
ianc@avs.com

Modifications

Andrew Dodd
International AVS Centre

Contact

International AVS Centre
Manchester Visualization Centre
Manchester Computing
University of Manchester
Oxford Road
Manchester
United Kingdom
M13 9PL

See Also

Standard AVS slice_plane module