!   TITLE:  vol_part_area.mac (SM_TOOL)
!
!
!   This sub-macro is used to partition a selected set of volumes by using
!   a cutting area, ACUT.  It then restores the selected set to the full
!   model set that is currently under construction.
!
!   In the case that the cutting area ACUT is a component group of areas,
!   then simply place the component group name in single quotes in the
!   first argument.
!
!
! VOL_PART_AREA, acut
!
!
*get,prkey_,active,0,prkey
/nopr
!
_acut=arg1
!
*get,_vlow,volu,,num,min
*get,_vhigh,volu,,num,max
!
*do,_iii,_vlow,_vhigh,1
    *if,_vlow,eq,_vhigh,then
        _kdv='delete'
    *else
        *if,_iii,ne,_vhigh,then
            _kdv='keep'             ! keep/delete decision variable
        *else
            _kdv='delete'
        *endif
    *endif
    !
    *if,vsel(_iii),ne,0,then
        vsba,_iii,_acut,,delete,_kdv
    *endif
*enddo
!
*get,_ptyp,parm,_acut,type
!
*if,_ptyp,eq,3,then
    adele,_acut,,,1
*endif
!
*if,asel(_acut),ne,0,then
    adele,_acut,,,1
*endif
!
init_entity_num
!
*set,_kdv,
*set,_vlow,
*set,_vhigh,
*set,_acut,
*set,_iii,
*set,_ptyp,

*if,prkey_,eq,1,then
    /go
*endif