CleanEdges

Synopsis

Adjust the output of external_edges to remove duplicated edges.

Input Ports

Name Type Description

in Mesh[+Node_Data] input field with multiple line cell sets

Parameters

Name Type Description UI Control

outer_edges int Specifies removal of both duplicated edges None

Output Ports

Name Type Description

out_fld Mesh[+Node_Data] output field with one line cell set
out_obj DataObject directly renderable output object

Description

The external_edges module in AVS/Express treats each cell set of its input field separately. As a consequence, if there are two cell sets (say a tri set and a quad set) that join over one (or more) edges, all these edges will be included in the output of external_edges. This happens even if all adjoining cells are on the same plane. Due to this the output of the external_edges module will often contain duplicated edges and edges that are not part of the external edges of the field.

The CleanEdges module aims to remedy this problem by scanning through the output field generated by external_edges and discarding duplicated edges. The module can discard edges in two ways. The default mode is for duplicated edges to be removed but for the original edge to be keep. This results in an output field that is visually identical to the input field but with fewer cells. The second mode is for both the original edge and the duplicated edge to be removed. Provided that all adjoining cells are on the same plane this will remove edges that are not external. However if adjoining cells are not on the same plane then edges that are external will be removed.

Input Ports

in

The input field for this module should be the direct output from external_edges. If the input field contains cell sets that do not contain lines then these will be ignored.

Parameters

outer_edges

This integer parameter specifies whether the module should attempt to remove edges that are not external to the field. If this parameter is non-zero then the module will remove both original and duplicated edges. Provided that all adjoining cells are on the same plane this will remove edges that are not external. However in many cases this is not the case and the module will remove edges that are external to the field. Therefore by default the module does not attempt to remove non-external edges. As this parameter may produce incorrect results an user interface is provided for it.

Output Ports

out_fld

The output field is the result of discarding duplicated edges in the input field. The line cell-sets in the input field are combined into a single output cell-set. If node data is present on the input field, this is passed through as well.

out_obj

The GDobject version of the output, suitable for direct connection to the viewer.

Utility Macros

The CleanEdgesCore low-level module takes a standard field as input and generates a simple integer array as output. The CleanEdges user macro enhances the low-level module by generating a new output field from the connectivity data output by the low-level module. In general you will not need to use the CleanEdgesCore module directly.

Example

The example application CleanEdgesEg is provided. This application demonstrates how the CleanEdges module can be used to tidy up the external edges of the cells.inp dataset. This field consists of a quad cell-set adjoined by four tri cell-sets in a square pattern. When this field is analysed by external_edges the resulting output contains 4 edges that are duplicated and are not external to the field. By default the CleanEdges module only removes the duplicated edges. However by setting the outer_edges parameter the module will remove the internal edges as well. It can be seen that the result of this is a simple square.

Other Notes

As noted previously this module does not check if the "boundaries" between cell sets should actually be included as "external edges". The method used works correctly for the cells.inp dataset. However if you load in the avs.inp dataset it can be seen that several external edges are incorrectly removed.

The low-level CleanExtEdgesMods library containing the low-level module CleanEdgesCore does not specify a process. By default the express process will be used.

Files

iac_proj/cl_edges/cedgmods.v contains the V definition of the CleanEdgesCore module.

iac_proj/cl_edges/cedgmacs.v contains the V definitions of the CleanEdges user macro and the CleanEdgesEg example application.

Author

Erik Thorvaldson
Visualisation Systems
Chatswood, Sydney
Australia
email: erik@vs.com.au

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

AVS external_edges module