! TITLE: annulus_sector.mac (SM_TOOL) ! ! ! OBJECTIVE: ! ! This sub-macro creates an annulus sector area at a specified center ! position. ! ! ! COMMAND SYNTAX: ! ! (1) (2) (3) (4) (5) ! ANNULUS_SECTOR, dia_in, dia_out, n_arc, st_ang, fin_ang, ! ! x_cntr, y_cntr, z_cntr ! (6) (7) (8) ! ! ! ARGUMENTS: ! ! (1) dia_in = inner diameter. ! ! (2) dia_out = outer diameter. ! ! (3) n_arc = The number of equal arc increments that the sector ! is constructed from. ! ! (4) st_ang = The start angle of the first arc used in the ! construction of the sector. ! [ If 0 (or blank), defaults to 0. ] ! ! (5) fin_ang = The finish angle of the sector. ! [ If 0 (or blank), defaults to 90. ] ! ! (6) x_cntr = X-coordinate center position. ! ! (7) y_cntr = Y-coordinate center position. ! ! (8) z_cntr = Z-coordinate center position. ! ! ! DESCRIPTION: ! ! The annulus sector consists of a specified number of arcs (argument 3), ! beginning from a specified start angle (argument 4) and terminating at ! a specified finish angle (argument 5), as measured from the +X-axis, ! where the plane of the annulus is parallel to the XY plane of the active ! CS. ! ! The annulus sector is created in the X, Y and Z position relative to the ! current active coordinate system (CS) as specified in arguments 6, 7 ! and 8, respectively. ! ! ! *get,prkey_,active,0,prkey /nopr ! din__=arg1 dout__=arg2 narcs__=arg3 stang__=arg4 finang__=arg5 xcntr__=arg6 ycntr__=arg7 zcntr__=arg8 ! *get,actvcs_,active,,csys *get,actvtyp_,cdsy,actvcs_,attr,kcs ! *if,actvtyp_,ne,0,then create_cs,0,,0,0,0,0,0,0,0 *endif ! *if,narcs__,eq,0,then narcs__=1 *endif ! *if,finang__,eq,0,then finang__=90 *endif ! create_cs,0,,1,xcntr__,ycntr__,zcntr__,0,0,0 ! ! ** Option 1: # arcs between given start/finish angles: ! ! (1) (2) (4) (5) (6) ! CREATE_ARCS, radius, z_loc,, n_arc, st_ang, fin_ang ! create_arcs,dout__/2,0,,narcs__,stang__,finang__ create_arcs,din__/2,0,,narcs__,stang__,finang__ ! isolate_lines ! lstr,kp(din__/2,stang__,0),kp(dout__/2,stang__,0) lstr,kp(din__/2,finang__,0),kp(dout__/2,finang__,0) ! create_area-lines ! csys,actvcs_ ! aplot ! *set,din__, *set,dout__, *set,narcs__, *set,stang__, *set,finang__, *set,xcntr__, *set,ycntr__, *set,zcntr__, *set,actvcs_, *set,actvtyp_, ! *if,prkey_,eq,1,then /go *endif