/out,stitch6,out
/gopr
*msg,info
stitch6 macro 11/25/95
immed
csys,1
cmsel,,stator
esel,r,mat,,1
esel,r,real,,6
nsle
*get,_stthmx,node,,mxloc,y
*get,_stthmn,node,,mnloc,y
*get,_strdmn,node,,mnloc,x
*get,_strdmx,node,,mxloc,x
_strtol=(_strdmx-_strdmn)/100
cmsel,,rotor
esel,r,real,,5
nsle
*get,_rtthmx,node,,mxloc,y
*get,_rtthmn,node,,mnloc,y
cscir,21,1
csys,21
*get,_cthtmn1,node,,mnloc,y
*get,_cthtmx1,node,,mxloc,y
*if,_cthtmx1,gt,_cthtmx,then
_cthtmx=_cthtmx1
*endif
*get,_rdrmx,node,,mxloc,x
*get,_rdrmn,node,,mnloc,x
_rdtol=(_rdrmx-_rdrmn)/1000
_ohnang=_stthmx-_cthtmx
_perang=_stthmx-_stthmn
_t_bsgn=1
*if,_ohnang,gt,0,then
_t_bsgn=-1
csys,1
*endif
cmsel,,rotor
nsel,r,ext
nsel,r,loc,x,_rdrmx-_rdtol,_rdrmx+_rdtol
cm,_cerotor,node
*if,_t_bsgn,eq,1,then
nsel,r,loc,y,_stthmx+.0000001,_cthtmx+.01
*else
nsel,r,loc,y,_stthmn+.0000001,_rtthmn-.01
*endif
csys,1
cm,_ohn,node
shpp,off
ngen,2,,all,,,0,-_perang*_t_bsgn
cmsel,,stator
nsel,r,ext
nsel,r,loc,x,_strdmn-.01,_strdmn+_strtol
esln
nsle
cm,_cestfr,node
*get,_elmx,elem,,num,max
*get,_curreal,elem,_elmx,attr,real
cmsel,,stator
esel,r,real,,_curreal
cmsel,,_cerotor
cmsel,a,_cestfr
cedel,all,,,any
numc,ce
cmsel,,_cerotor
esel,r,real,,_curreal
ceintf,.1
cmsel,,_ohn
csys,1
ngen,2,,all,,,0,_perang*_t_bsgn
/pbc,ce,1
alls
/gopr
/out,stitch6,out,,append