<<<<<<<<<<<<<<<<<

clean_data(display) Display clean_data(display)

NAME

clean_data - merge display_data geometry based on specified tolerance.

DESCRIPTION

Clean_data takes as input a display_data object or filter, generating on output a display_data. The output data is cleaned, that is, based on the specified tolerance, the points, lines, polygons, and triangle strips are merged and eliminated, if appropriate. If a line is merged so that it contains less than two points, it is eliminated. If the number of points defining a polygon or triangle strip are reduced to less than three, the polygon or triangle strip is eliminated.

SUPERCLASS

display_filter

INSTANCE VARIABLES

tolerance the tolerance in global coordinates. Points pairs whose distance apart are <= this tolerance are merged.

MESSAGES

tolerance= value Set the tolerance value.

tolerance? Get the tolerance value.

EXAMPLE

/* * Example to demonstrate merging of points. */ display_data new: dd points=( 0,0,0, 0.08,0,0, 1,0,0, 1.07,0,0, 0,1,0, 0,1.06,0, 1,1,0, 1.05,1,0, 0,0,1, 0,0,1.04, 1,0,1, 1.03,0,1, 0,1,1, 0,1.02,1, 1,1,1, 1.01,1,1, 0,0,0

) normals=( 0,0,0, 0.08,0,0, 1,0,0, 1.07,0,0, 0,1,0, 0,1.06,0, 1,1,0, 1.05,1,0, 0,0,1, 0,0,1.04, 1,0,1, 1.03,0,1, 0,1,1, 0,1.02,1, 1,1,1, 1.01,1,1, 0,0,0 ) scalars=( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 ) vectors=( 0,0,0, 0.08,0,0, 1,0,0, 1.07,0,0, 0,1,0, 0,1.06,0, 1,1,0, 1.05,1,0, 0,0,1, 0,0,1.04, 1,0,1, 1.03,0,1, 0,1,1, 0,1.02,1,

1,1,1, 1.01,1,1, 0,0,0 ) lines=( 2,1,2, 3,16,15,1, 4,16,15,2,1, 5,2,1,15,17,1 ) polygons=( 3,16,15,1, 4,16,15,2,1, 5,2,1,15,17,1 ) tri_strips=( 3,16,15,1, 4,16,15,2,1, 5,2,1,15,17,1 ) ;

clean_data new: cd data_in= dd tolerance=0.1 output! ;

SEE ALSO

display_filter, spatial_hash, display_data


Please send comments and suggestions to
consult@rpi.edu