*if,arg1,eq,1,then
 fini
 /nerr,0,1e5
 /cle,all
 cdread,solid,,,,embed,igs
 /inp,mach2f,des
*endif

abbr,,mabbr,mac

*SET,rbc,gap/2+rr2+magh
Pcircle,rr2+magh,rr2+magh+gap/2,0,90  !  Define the air gap
csys,1              !  Make the cylindrical system active
agen,4,3,,,0,90     !  Duplicate the areas around          
asel,all            !  Make all the areas active
aglue,all           !  Connect the areas
asel,,loc,x,0,.01   !  Select out the rotor laminate
aatt,2,2,1      !  Set the attribute for the laminate
csys,1
lsel,,loc,y,0
lsel,r,loc,x,rbc-gap,rbc   !  Set one of the radial line segments to 2 units  
lesi,all,,,2
lsel,,loc,x,rbc
lesi,all,,,60
lsel,,loc,x,rr1
lesi,all,,,1,,1

*if,arg1,eq,1,then
 /complete the rotor model
 et,1,53
 asel,all
 ames,all
 csys,1
 nsel,,ext
 nsel,r,loc,x,rr1
 cp,1,az,all
 mag_conv
 alls
 csys
 arscal,all,,,ggeom,ggeom,,,,1
*endif