A mapper module that cuts a 3D model with a cylinder, returning the model remaining either inside or outside of the cylinder.
module CylinderCutDist < build_dir="iac_proj/cylcut", src_file="cylcut.c", out_src_file="gen.cxx", out_hdr_file="gen.h" > { /* compute distance to a plane */ Mesh+Iparam &in { nnodes+req; }; Mesh+Xform+Iparam &plane; method+notify_val+notify_inst cylinder_cut_update<status=1> = "cylinder_cut_update"; Node_Data+Scalar+Float+Oparam out; float+Oparam dist; };
The CylinderCutDist module takes a set of Mesh data and a cylindrical cut-plane as input. It then calculates the distance of each point in the Mesh from the cylinder and outputs these distances as a new set of node data. This node data can then subsequently be used by the DVcut module to partition the original model. It should be noted that this module only generates a single new set of node data. The recombination of this node data with the original mesh and node data and the partitioning of the recombined model should be done by other modules.
This module is intended to be used within the functional macro CylinderCut and the user macro cylinder_cut. These macros perform the recombination necessary and are used to generate a new partitioned model from an original set of data and a cylindrical cut plane. They are effectively a variation on the cut_plane macro, which partitions a model using a simple plane tool. The operation of the functional and user macros is very similar to that of the cut_plane module.
&in
Reference to a Mesh input containing the points to be operated upon. The distance of each point from the cylinder is calculated and a new set of node data is created containing this data.
&plane
Reference to a Mesh input containing the cylinder that should be used within the calculation.
out
Node data containing the distance of each point from the specified cylinder. This data can then be recombined with the original Mesh and Node data, and the DVcut module can then be used to parition the model as desired. It should be noted that this module only outputs a single set of node data. It does not copy across any node data present with the original Mesh.
dist
Plane dist of the cylindrical cut plane. The parameter is of type float. In the CylinderCut macro this parameter is added to the user specified cylinder radius and used by the DVcut module to determine the threshold level.
The low level CylinderCutDist module is used in the Functional Macro CylinderCut. This Functional macro is used in turn by the User macro cylinder_cut.
An example application CylinderCutEg is provided, which loads a UCD data file and cuts a cylindrical section out of it.
iac_proj/cylcut/cylcmods.v contains the CylinderCutDist module V definition.
This project requires the following components to be installed correctly. Without these components the user level macros will not work correctly.
The low-level CylinderCutMods library containing the module CylinderCutDist does not specify a process. By default the express process will be used.
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.
Ian Curington Advanced Visual Systems, Ltd. Hanworth Lane, Chertsey Surrey, UK KT16 9JX
<a HREF="mailto:ianc@avs.com">ianc@avs.com</a>
International AVS Centre Manchester Visualization Centre Manchester Computing University of Manchester Oxford Road Manchester United Kingdom M13 9PL
CylinderCut, CylinderCutUI, cylinderCut, CylinderCutEg, cut_plane