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

rotational_extrusion_filter(display)Filterrotational_extrusion_filter(display)

NAME

rotational_extrusion_filter - sweep polygons and/or lines around y-axis to create new surfaces

DESCRIPTION

Rotational_extrusion_filter takes as input a display_data object and extrudes polygons and/or lines to create new surfaces. The extrusion direction is around the y-axis. It is also possible to translate along the y-axis and vary the radius while the data is being rotated.

Polygons are extruded as follows: if the "capping" instance variable is on, each polygon is replicated twice (once in the current position and once at the final position). If any of the polygon edges is a free edge, i.e., the edge is not used by any other polygon, then the edge sweeps out a new surface (a "skirt"). If capping is "off", then only free edges create new surfaces.

Lines are treated as free edges: that is, each line is swept in the extrusion direction to create a new surface.

SUPERCLASS

adjacency_filter

INSTANCE VARIABLES

capping boolean indicates whether the extruded object is to ba capped. By default, capping is "on".

resolution the number of steps (facets) as the data is extruded from its original position to its final position.

angle the total angle of rotation (in degrees). Angles greater than 360 degrees result in multiple circuits around the y-axis.

delta_radius the total change in radius from the start position to the end position.

translation the total translation of the object along the y- axis.

MESSAGES

capping_on! turn object capping on.

capping_off! turn object capping off.

capping= value set the capping boolean

capping? get the capping boolean

resolution=/+ value set/add to the resolution instance variable.

resolution? get the resolution value.

angle=/+ value set/add to the angle instance variable.

angle? get the angle value.

delta_radius=/+ value set/add to the delta_radius instance variable.

delta_radius? get the delta_radius value.

translation=/+ value set/add to the translation instance variable.

translation? get the translation value.

generate_data! create the extruded data from the input data.

EXAMPLE

/* * Generate a helical spring */ display_data new: spring_xsection points=( 5.35355,5,0, 5.85355,5,0, 6.20710,5.35355,0, 6.20710,5.85355,0, 5.85355,6.20710,0, 5.35355,6.20710,0, 5,5.85355,0, 5,5.35355,0, ) scalars=(

1,2,3,4,5,6,7,8 ) polygons=( 8,1,2,3,4,5,6,7,8 ) ; rotational_extrusion_filter new: ref data_in= spring_xsection resolution= 144 angle= 2160 translation= 11.52 delta_radius= -2.5 capping_on! ; display_all new: da data_in= ref range=(1,8) ; actor new: spring modeller= da ; /* * Generate a shock absorber */ display_data new: shock_xsection points=( 0,0,0, 1,0,0, 1,10,0, 1.5,10,0, 1.5,20,0, 0,20,0, ) scalars=( 1,1,1,2,2,2, ) lines=( 6,1,2,3,4,5,6, ) ; rotational_extrusion_filter new: ref2 data_in= shock_xsection resolution= 24 angle= 360 ; display_all new: da2 data_in= ref2 range=(1,2) ; actor new: shock modeller= da2 ; camera new: acamera range= [da bounds?]

position= (1,1,1) default! on! ; renderer new: aren actors=[actor instances?] cameras=[camera instances?] render! ;

SEE ALSO

adjacency_filter, linear_extrusion_filter, display_filter, display_data


Please send comments and suggestions to
consult@rpi.edu