*get,prkey_,active,0,prkey
/nopr
opt_=arg1
*if,opt_,eq,1,then
vcentr_=arg2
*get,actcs_,active,,csys
csys,vcentr_
*get,vcnttyp_,cdsy,vcentr_,attr,kcs
*if,vcnttyp_,ne,0,then
create_cs,0,'vcentr_',0,0,0,0,0,0,0
*endif
*if,opt_,ne,1,then
*if,opt_,ne,2,then
opt_=2
*endif
*endif
*endif
*if,opt_,eq,1,then
distf_=arg3
*get,disttyp_,parm,distf_,type
*if,disttyp_,ne,0,then
distf_=1.0
*else
*if,distf_,eq,0,then
distf_=1.0
*endif
*endif
view1_=arg4
*get,v1typ_,parm,view1_,type
*if,v1typ_,ne,3,then
view1_='all'
*endif
*if,view1_,eq,'all',then
viewlim_=5
view1_='l'
view2_='r'
view3_='t'
view4_='bot'
view5_='back'
*else
viewlim_=4
view2_=arg5
view3_=arg6
view4_=arg7
*get,v2typ_,parm,view2_,type
*get,v3typ_,parm,view3_,type
*get,v4typ_,parm,view4_,type
*if,v2typ_,ne,3,then
view2_='null'
*endif
*if,v3typ_,ne,3,then
view3_='null'
*endif
*if,v4typ_,ne,3,then
view4_='null'
*endif
*endif
*elseif,opt_,eq,2,then
view_=arg2
*get,vtyp_,parm,view_,type
*if,vtyp_,ne,3,then
view_='r'
*endif
*endif
*get,vcnt_,volu,,count
*get,acnt_,area,,count
*if,vcnt_,gt,0,then
cm,partvol_,volu
parttyp_='partvol_,'
*else
*if,acnt_,gt,0,then
cm,partar_,area
parttyp_='partar_'
*else
cm,partln_,line
parttyp_='partln_'
*endif
*endif
*if,opt_,eq,1,then
csys,vcentr_
*do,abc__,1,viewlim_,1
cmsel,s,%parttyp_%
*if,parttyp_,eq,'partvol_',then
aslv,s
lsla,s
ksll,s
*elseif,parttyp_,eq,'partar_',then
lsla,s
ksll,s
*elseif,parttyp_,eq,'partln_',then
ksll,s
*endif
*if,view%abc__%_,eq,'l',then
max_kp_dist,vcentr_,'-x'
a_=max_dist
max_kp_dist,vcentr_,'+z'
b_=max_dist
dgap_=a_+b_+distf_*(a_+b_)
create_cs,0,'vw%abc__%_',0,-dgap_,0,0,0,0,90
*elseif,view%abc__%_,eq,'r',then
max_kp_dist,vcentr_,'+x'
a_=max_dist
max_kp_dist,vcentr_,'+z'
b_=max_dist
dgap_=a_+b_+distf_*(a_+b_)
create_cs,0,'vw%abc__%_',0,dgap_,0,0,0,0,-90
*elseif,view%abc__%_,eq,'t',then
max_kp_dist,vcentr_,'+y'
a_=max_dist
max_kp_dist,vcentr_,'+z'
b_=max_dist
dgap_=a_+b_+distf_*(a_+b_)
create_cs,0,'vw%abc__%_',0,0,dgap_,0,0,90,0
*elseif,view%abc__%_,eq,'bot',then
max_kp_dist,vcentr_,'-y'
a_=max_dist
max_kp_dist,vcentr_,'+z'
b_=max_dist
dgap_=a_+b_+distf_*(a_+b_)
create_cs,0,'vw%abc__%_',0,0,-dgap_,0,0,-90,0
*elseif,view%abc__%_,eq,'back',then
max_kp_dist,vcentr_,'+y'
a1_=max_dist
max_kp_dist,vcentr_,'+z'
b1_=max_dist
dgap1_=a1_+b_1+distf_*(a1_+b1_)
max_kp_dist,vcentr_,'-y'
a2_=max_dist
dgap2_=a1_+a2_+distf_*(a1_+a2_)
create_cs,0,'vw%abc__%_',0,0,dgap1_+dgap2_,0,0,180,0
*endif
csys,vcentr_
*if,view%abc__%_,ne,'null',then
*if,vcnt_,gt,0,then
vtran,vw%abc__%_,%parttyp_%,,,,1,0
vplot
*else
*if,acnt_,gt,0,then
atran,vw%abc__%_,%parttyp_%,,,,1,0
aplot
*else
ltran,vw%abc__%_,%parttyp_%,,,,1,0
lplot
*endif
*endif
*endif
*enddo
init_entity_num
view,'f'
*endif
*if,opt_,eq,2,then
view,'%view_%'
*if,vcnt_,gt,0,then
aplot
*else
*if,acnt_,gt,0,then
aplot
*else
lplot
*endif
*endif
*endif
*if,vcnt_,gt,0,then
aplot
*else
*if,acnt_,gt,0,then
aplot
*else
lplot
*endif
*endif
*if,prkey_,eq,1,then
/go
*endif