- if DX == DLocal:
- GN1 = [None,None,None,GroupNames[3],GroupNames[4]]
- GN2 = [None,None,GroupNames[2],None,GroupNames[4]]
- GN3 = [None,None,GroupNames[2],None,GroupNames[4]]
- GN4 = [None,None,None,GroupNames[3],GroupNames[4]]
- GN7 = [GroupNames[0],None,GroupNames[2],GroupNames[3]]
- GN8 = [None,GroupNames[1],GroupNames[2],GroupNames[3]]
- else :
- GN1 = [None,None,None,None,GroupNames[4]]
- GN2 = [None,None,None,None,GroupNames[4]]
- GN3 = [None,None,None,None,GroupNames[4]]
- GN4 = [None,None,None,None,GroupNames[4]]
-
- GN5 = [None,None,None,GroupNames[3]]
- GN6 = [None,None,GroupNames[2],None]
-
- GN9 = [GroupNames[0],None,None,GroupNames[3]]
- GN10 = [GroupNames[0],None,None,None]
- GN11 = [GroupNames[0],None,GroupNames[2],None]
-
- GN12 = [None,GroupNames[1],None,GroupNames[3]]
- GN13 = [None,GroupNames[1],None,None]
- GN14 = [None,GroupNames[1],GroupNames[2],None]
-
- Obj = []
-
- Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],[InternalMeshing,'NE',K], groups = GN1))
- Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','NW',K], groups = GN2))
- Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SW',K], groups = GN3))
- Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SE',K], groups = GN4))
-
- if DX > DLocal :
- dX = (DX - DLocal)/2.
- Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN5))
- Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN6))
-
- if DY > DLocal :
- dY = (DY - DLocal)/2.
- if DX > DLocal :
- Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN9))
- Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN10))
- Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN11))
- Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN12))
- Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN13))
- Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN14))
- else:
- Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN7))
- Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN8))
-
- return Obj
+ GN1 = [None,None,None,None,GroupNames[4]]
+ GN2 = [None,None,None,None,GroupNames[4]]
+ GN3 = [None,None,None,None,GroupNames[4]]
+ GN4 = [None,None,None,None,GroupNames[4]]
+
+ GN5 = [None,None,None,GroupNames[3]]
+ GN6 = [None,None,GroupNames[2],None]
+
+ GN9 = [GroupNames[0],None,None,GroupNames[3]]
+ GN10 = [GroupNames[0],None,None,None]
+ GN11 = [GroupNames[0],None,GroupNames[2],None]
+
+ GN12 = [None,GroupNames[1],None,GroupNames[3]]
+ GN13 = [None,GroupNames[1],None,None]
+ GN14 = [None,GroupNames[1],GroupNames[2],None]
+
+ Obj = []
+
+ Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],[InternalMeshing,'NE',K], groups = GN1))
+ Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','NW',K], groups = GN2))
+ Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SW',K], groups = GN3))
+ Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SE',K], groups = GN4))
+
+ if DX > DLocal :
+ dX = (DX - DLocal)/2.
+ Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN5))
+ Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN6))
+
+ if DY > DLocal :
+ dY = (DY - DLocal)/2.
+ if DX > DLocal :
+ Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN9))
+ Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN10))
+ Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN11))
+ Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN12))
+ Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN13))
+ Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN14))
+ else:
+ Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN7))
+ Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN8))
+
+ return Obj