cylinder_cut

Synopsis

A mapper module that cuts a 3D model with a cylinder, returning the model remaining either inside or outside of the cylinder.

Input Ports

Name Type Description

in_field Mesh+Data input field that should be cut using cylinder

Parameters

Name Type Description UI Control

component int array list of node data components Option Box
dist float distance to move cylinder cutting surface Slider
above int Cut inside or outside cylinder Toggle
cell_data int list of cell data components Option Box

Output Ports

Name Type Description

out_fld Mesh+Data output field after cutting
out_obj DataObject directly renderable output object

Description

The cut_cylinder macro crops or sections a 3D model using a cylinder shape object. It is variation on the cut_plane module. It works in essentially the same way except that it uses a cylindrical cutting tool instead of a simple plane tool. The cut_cylinder macro returns a whole new 3D model. It does not remove value by setting their node data value to NULL and it does not just return the values at the cylinder surface.

The macro includes a user interface. The cylinder radius and transformation can be controlled from the user interface panel. The node data and cell data components to be retained and whether the inside or outside of the cylinder should be removed can also be specified through the user interface. It should be noted that as the high level macros require the use of a number of low level AVS/Express modules these macros will only work with the AVS/Express developer edition.

Inputs

in_field

Reference to the field input that is to be cropped. The field should contain at least a Mesh component. If Node data or Cell data components are present then the user interface can be used to specify which of these should be copied across to the output.

Parameters

component

A member of the DV_Param_cut parameter block group, this array of integers is used to specify which of the node data components should be copied across to the output.

dist

A member of the DV_Param_cut parameter block group, this float value is used to specify the radius of the cylindrical cutting tool. The radius can also be specified through the Transformation Editor. However in general using this control will be easier than directly adjusting the object transformation.

above

A member of the DV_Param_cut parameter block group, this integer value is used to specify whether the output data should contain those values inside or outside of the cylinder. Setting this parameter to zero will cause the output data to contain only those values inside of the cylindrical cutting tool.

cell_data

A member of the DV_Param_cut parameter block group, this array of integers is used to specify which of the cell data components should be copied across to the output.

Outputs

out_fld

The most primitive output field of the cylinder_cut macro. This contains the new 3D model generated from the model present on the input, cropped using the specified cylinder and combined with the specified data components.

out_obj

The directly renderable output field of the cylinder_cut macro. This contains a DataObject object that can be rendered by the standard data viewers. The Data Object is generated directly from the field data created from the input model.

Utility Modules

The User Macro cylinder_cut makes use of the Functional Macro cylinderCut and the UI Macro CylinderCutUI. The Functional macro cylinderCut also makes use of the the module CylinderCutDist.

Example

An example application CylinderCutEg is provided, which loads a UCD data file and cuts a cylindrical section out of it.

Files

iac_proj/cylcut/cylcmacs.v contains the V definitions of the cylinderCut Functional Macro, the cylinder_cut User Macro, the CylinderCutUI UI Macro, and the example application CylinderCutEg.

Prerequisites

This project requires the following components to be installed correctly. Without these components the user level macros will not work correctly.

Other Notes

The CylinderCutMacs library inherits its process. As this library contains no procedural code, the process is not important.

For more details on the operation of this module please refer to the standard cut_plane module. This module is based on the same underlying system as cut_plane, but substitutes the cut plane object with a cylinder object and uses that as the cutting shape.

The high level macros use many DV low level objects, and hence these macros require a license for the AVS/Express Developer Edition. The low level module is completely user code. However it is designed to work with the high level macros and hence is unlikely to be usable in itself.

Author

Ian Curington
Advanced Visual Systems, Ltd.
Hanworth Lane, Chertsey Surrey, UK
KT16 9JX
<a HREF="mailto:ianc@avs.com">ianc@avs.com</a>

Contact

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

See Also

CylinderCutDist, CylinderCut, CylinderCutUI, CylinderCutEg, cut_plane