!   TITLE:  annulus_area.mac (MISC_PART)
!
!
!   OBJECTIVE:
!
!   This sub-macro creates an annulus area at a specified center position.
!
!
!   COMMAND SYNTAX:
!
!                   (1)     (2)     (3)     (4)     (5)     (6)    (7)
!   ANNULUS_AREA, dia_in, dia_out, x_cntr, y_cntr, z_cntr, n_arc, st_ang
!
!
!   ARGUMENTS:
!
!       (1) dia_in = inner diameter.
!
!       (2) dia_out = outer diameter.
!
!       (3) x_cntr = X-coordinate center position.
!
!       (4) y_cntr = Y-coordinate center position.
!
!       (5) z_cntr = Z-coordinate center position.
!
!       (6) n_arc = The number of equal arc increments that the annulus
!                   is constructed from.
!
!       (7) st_ang = The start angle of the first arc used in the
!                    construction of the annulus.
!
!
!   DESCRIPTION:
!
!   The annulus area is created in the X, Y and Z position relative to the
!   current active coordinate system (CS) as specified in arguments 3, 4
!   and 5, respectively.
!
!   The annulus consists of 4 90-degree arcs as measured from the +X-axis,
!   and the plane of the annulus is parallel to the XY plane of the active
!   CS.
!
!
!
*get,prkey_,active,0,prkey
/nopr
!
din__=arg1
dout__=arg2
xcntr_=arg3
ycntr_=arg4
zcntr_=arg5
narcs_=arg6
stang__=arg7
!
*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_=4
*endif
!
create_cs,0,,0,xcntr_,ycntr_,zcntr_,0,0,0
!
!                           (1)    (2)     (3)     (4)    (5)
!       CREATE_CIRC_AREA, radius, z_loc, ang_inc, n_arc, st_ang
!
create_circ_area,dout__/2,0,,narcs_,stang__
create_circ_area,din__/2,0,,narcs_,stang__
!
asba,am-1,am,,delete,delete
init_entity_num
!
csys,actvcs_
!
aplot
!
*set,din__,
*set,dout__,
*set,xcntr_,
*set,ycntr_,
*set,zcntr_,
*set,actvcs_,
*set,actvtyp_,
!
*if,prkey_,eq,1,then
    /go
*endif