i m p o r t   F r e e C A D   a s   A p p 
 
 i m p o r t   P a r t 
 
 i m p o r t   m a t h 
 
 
 
 i f   A p p . a c t i v e D o c u m e n t ( ) : 
 
         A p p . c l o s e D o c u m e n t ( A p p . a c t i v e D o c u m e n t ( ) . N a m e ) 
 
 d o c   =   A p p . n e w D o c u m e n t ( " P C C a s e _ T o a s t _ D e s i g n " ) 
 
 
 
 #   = = = = = = = = = = = = = = =   YMr;N[  ( C o l o r   T h e m e )   = = = = = = = = = = = = = = = 
 
 #   WN`Os	gvPgr  ( ў0}v0Ğ0)Y݄0Xj0~)   ͑ev  5   >k;N
 
 #   1   =   )YE~  ( S k y l i n e )       :   )Y݄YX  +   NXj/ }vQ<h  +   ~}vň2u  ( ؞SYMr) 
 
 #   2   =   q+s:g2u  ( P a n d a )       :   ~ўYX  +   ~}vQ<h  +   ~ўň2u  ( g{ؚS]) 
 
 #   3   =   'YĞ  ( B u m b l e b e e )   :   NĞYX  +   ~ўQ<h  +   ~ўň2u  ( эf/ ͑]a) 
 
 #   4   =   \uS  ( T o x i c )       :   ~rYX  +   NĞQ<h  +   ~ўň2u  ( ^WuSΘ) 
 
 #   5   =   IQWyb  ( P o r t a l )     :   ~}vYX  +   )Y݄/ XjQ<h  +   ~}vň2u  ( y{^[[Θ) 
 
 T H E M E   =   3 
 
 
 
 #   = = = = = = = = = = = = = = =   hQ@\:\[NS^Spe  = = = = = = = = = = = = = = = ( M  B a m b u   P 1 S )   = = = = = = = = = = = = = = = 
 
 t u b e _ w i d t h   =   2 5 0 . 0       #   {[  ( SbpSؚ^,   Z t)   -   \N  2 5 6 m m ,   [>eeQ  P 1 S 
 
 t u b e _ l e n g t h   =   2 2 6 . 0     #   {  ( s^>eevY t) 
 
 
 
 
 
 #   _eQzub{l  ( H o n e y c o m b   A l g o r i t h m ) 
 
 d e f   g e t _ h o n e y c o m b _ h o l e s ( w ,   h ,   R ,   w a l l _ t ,   a x i s = ' Z ' ) : 
 
         i m p o r t   m a t h 
 
         p i t c h _ x   =   m a t h . s q r t ( 3 )   *   R   +   w a l l _ t 
 
         p i t c h _ y   =   1 . 5   *   R   +   w a l l _ t   *   m a t h . s q r t ( 3 ) / 2 
 
         
 
         h e x a g o n s   =   [ ] 
 
         c o l s   =   i n t ( w   /   p i t c h _ x )   +   2 
 
         r o w s   =   i n t ( h   /   p i t c h _ y )   +   2 
 
         
 
         f o r   i   i n   r a n g e ( c o l s ) : 
 
                 f o r   j   i n   r a n g e ( r o w s ) : 
 
                         c x   =   i   *   p i t c h _ x 
 
                         i f   j   %   2   = =   1 : 
 
                                 c x   + =   p i t c h _ x   /   2 . 0 
 
                         c y   =   j   *   p i t c h _ y 
 
                         
 
                         p t s   =   [ ] 
 
                         f o r   k   i n   r a n g e ( 7 ) : 
 
                                 a n g l e   =   m a t h . p i   /   3   *   k   +   m a t h . p i   /   6 
 
                                 p x   =   c x   +   R   *   m a t h . c o s ( a n g l e ) 
 
                                 p y   =   c y   +   R   *   m a t h . s i n ( a n g l e ) 
 
                                 i f   a x i s   = =   ' Z ' : 
 
                                         p t s . a p p e n d ( A p p . V e c t o r ( p x ,   p y ,   - 1 0 . 0 ) ) 
 
                                 e l i f   a x i s   = =   ' Y ' : 
 
                                         p t s . a p p e n d ( A p p . V e c t o r ( p x ,   - 1 0 . 0 ,   p y ) ) 
 
                         
 
                         t r y : 
 
                                 f a c e   =   P a r t . m a k e F a c e ( P a r t . m a k e P o l y g o n ( p t s ) ) 
 
                                 i f   a x i s   = =   ' Z ' : 
 
                                         s o l i d   =   f a c e . e x t r u d e ( A p p . V e c t o r ( 0 , 0 ,   3 0 . 0 ) ) 
 
                                 e l i f   a x i s   = =   ' Y ' : 
 
                                         s o l i d   =   f a c e . e x t r u d e ( A p p . V e c t o r ( 0 ,   3 0 . 0 ,   0 ) ) 
 
                                 h e x a g o n s . a p p e n d ( s o l i d ) 
 
                         e x c e p t : 
 
                                 p a s s 
 
         r e t u r n   P a r t . m a k e C o m p o u n d ( h e x a g o n s ) 
 
 
 
 t u b e _ h e i g h t   =   2 5 0 . 0     #   {ؚ  ( S)  P 1 S   gP) 
 
 M 3 _ C L E A R _ R   =   1 . 6 5 
 
 M 3 _ T A P _ R   =   1 . 3 5 
 
 I N S E R T _ R   =   M 3 _ T A P _ R   #   ؞O(uvbT[nNTSvc(upWeQpqk\O:NY(ueHh
 
 I N S E R T _ D E P T H   =   1 0 . 0   #   Rm  1 0 m m OYvvbTeQm^
 
 
 
 #   ~ NPWh|
 
 #   X t]S[^  ( 2 5 0 . 0 ) 
 
 #   Y tMRTm^  ( 2 2 6 . 0 ) 
 
 #   Z t
NNؚ^  ( 2 0 0 . 0 ) 
 
 #   SbpSeS \{P[~  Y   b  X   tel  9 0   ^OsSSs^3z>e(W  2 5 6 x 2 5 6   p^
N
 
 
 
 w a l l   =   5 . 0   #   gwQSaTswQav  8 m m   ]Sň2u
 
 o u t e r _ r a d i u s   =   2 5 . 0 
 
 i n n e r _ r a d i u s   =   o u t e r _ r a d i u s   -   w a l l   #   1 7 . 0 
 
 
 
 #   = = = = = = = = = = = = = = =   ,{ NRYsň2u  ( O u t e r   T u b e )   = = = = = = = = = = = = = = = 
 
 #   1 .   Yn^
 
 o u t e r _ b o x   =   P a r t . m a k e B o x ( t u b e _ w i d t h ,   t u b e _ l e n g t h ,   t u b e _ h e i g h t ) 
 
 #   P҉  ( NP  Y - Z   s^b
Nv  4   *NsSN  X   ts^Lv) 
 
 e d g e s _ t o _ f i l l e t   =   [ ] 
 
 f o r   e   i n   o u t e r _ b o x . E d g e s : 
 
         i f   a b s ( e . L e n g t h   -   t u b e _ w i d t h )   <   1 e - 3 : 
 
                 e d g e s _ t o _ f i l l e t . a p p e n d ( e ) 
 
 o u t e r _ t u b e   =   o u t e r _ b o x . m a k e F i l l e t ( o u t e r _ r a d i u s ,   e d g e s _ t o _ f i l l e t ) 
 
 
 
 #   2 .   Qn^czz
 
 i n n e r _ b o x   =   P a r t . m a k e B o x ( t u b e _ w i d t h ,   t u b e _ l e n g t h   -   w a l l   *   2 ,   t u b e _ h e i g h t   -   w a l l   *   2 ) 
 
 i n n e r _ b o x . t r a n s l a t e ( A p p . V e c t o r ( 0 ,   w a l l ,   w a l l ) ) 
 
 i n n e r _ e d g e s   =   [ ] 
 
 f o r   e   i n   i n n e r _ b o x . E d g e s : 
 
         i f   a b s ( e . L e n g t h   -   t u b e _ w i d t h )   <   1 e - 3 : 
 
                 i n n e r _ e d g e s . a p p e n d ( e ) 
 
 i n n e r _ h o l e   =   i n n e r _ b o x . m a k e F i l l e t ( i n n e r _ r a d i u s ,   i n n e r _ e d g e s ) 
 
 
 
 o u t e r _ t u b e   =   o u t e r _ t u b e . c u t ( i n n e r _ h o l e ) 
 
 
 
 #   3 .   cQ	Nbdrh<hQi  ( v0^0MR) 
 
 d e f   m a k e _ g r i l l e _ c u t o u t ( x ,   y ,   z ,   w ,   l ,   d ,   l i p ) : 
 
         #   YB\>en:S
 
         o u t e r _ c u t   =   P a r t . m a k e B o x ( w ,   l ,   d   +   2 ) 
 
         o u t e r _ c u t . t r a n s l a t e ( A p p . V e c t o r ( x ,   y ,   z ) ) 
 
         #   QB\Bzzl:S
 
         i n n e r _ c u t   =   P a r t . m a k e B o x ( w   -   l i p * 2 ,   l   -   l i p * 2 ,   2 0 ) 
 
         
 
         #   [IN  4   *Nx8TT[  ( 6 x 3 m m   :_x)   (W  L e d g e   
NvRrRSO
 
         #   eQ  L e d g e   ( YFhv/ed)   3 . 2 m m   m
 
         m _ r   =   3 . 1 
 
         m _ d   =   3 . 2 
 
         m 1   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( x   +   l i p / 2 ,   y   +   l i p / 2 ,   0 ) ,   A p p . V e c t o r ( 0 , 0 , - 1 ) ) 
 
         m 2   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( x   +   w   -   l i p / 2 ,   y   +   l i p / 2 ,   0 ) ,   A p p . V e c t o r ( 0 , 0 , - 1 ) ) 
 
         m 3   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( x   +   l i p / 2 ,   y   +   l   -   l i p / 2 ,   0 ) ,   A p p . V e c t o r ( 0 , 0 , - 1 ) ) 
 
         m 4   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( x   +   w   -   l i p / 2 ,   y   +   l   -   l i p / 2 ,   0 ) ,   A p p . V e c t o r ( 0 , 0 , - 1 ) ) 
 
         m a g n e t s   =   P a r t . m a k e C o m p o u n d ( [ m 1 ,   m 2 ,   m 3 ,   m 4 ] ) 
 
         
 
         i f   z   >   t u b e _ h e i g h t   /   2 :   #   v
 
                 i n n e r _ c u t . t r a n s l a t e ( A p p . V e c t o r ( x   +   l i p ,   y   +   l i p ,   z   -   1 0 ) ) 
 
                 m a g n e t s . t r a n s l a t e ( A p p . V e c t o r ( 0 ,   0 ,   z ) ) 
 
         e l i f   z   <   0 :   #   ^
 
                 i n n e r _ c u t . t r a n s l a t e ( A p p . V e c t o r ( x   +   l i p ,   y   +   l i p ,   z ) ) 
 
                 m a g n e t s . t r a n s l a t e ( A p p . V e c t o r ( 0 ,   0 ,   z   +   d ) )   #   ^ _SgN
 
         e l s e :   #   MR
 
                 i n n e r _ c u t   =   P a r t . m a k e B o x ( w   -   l i p * 2 ,   2 0 ,   l   -   l i p * 2 ) 
 
                 i n n e r _ c u t . t r a n s l a t e ( A p p . V e c t o r ( x   +   l i p ,   y   -   1 0 ,   z   +   l i p ) ) 
 
                 o u t e r _ c u t   =   P a r t . m a k e B o x ( w ,   d   +   2 ,   l ) 
 
                 o u t e r _ c u t . t r a n s l a t e ( A p p . V e c t o r ( x ,   y ,   z ) ) 
 
                 
 
                 m 1   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( x   +   l i p / 2 ,   0 ,   z   +   l i p / 2 ) ,   A p p . V e c t o r ( 0 , - 1 , 0 ) ) 
 
                 m 2   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( x   +   w   -   l i p / 2 ,   0 ,   z   +   l i p / 2 ) ,   A p p . V e c t o r ( 0 , - 1 , 0 ) ) 
 
                 m 3   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( x   +   l i p / 2 ,   0 ,   z   +   l   -   l i p / 2 ) ,   A p p . V e c t o r ( 0 , - 1 , 0 ) ) 
 
                 m 4   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( x   +   w   -   l i p / 2 ,   0 ,   z   +   l   -   l i p / 2 ) ,   A p p . V e c t o r ( 0 , - 1 , 0 ) ) 
 
                 m a g n e t s   =   P a r t . m a k e C o m p o u n d ( [ m 1 ,   m 2 ,   m 3 ,   m 4 ] ) 
 
                 m a g n e t s . t r a n s l a t e ( A p p . V e c t o r ( 0 ,   y   +   d ,   0 ) ) 
 
                 
 
         r e t u r n   o u t e r _ c u t . f u s e ( i n n e r _ c u t ) . f u s e ( m a g n e t s ) 
 
 
 
 g r i l l e _ w   =   t u b e _ w i d t h   -   3 6 . 0   #   ]STYu  1 8 m m   Fh
 
 g r i l l e _ l   =   t u b e _ l e n g t h   -   4 0 . 0   #   MRTTYu  2 0 m m   Fh
 
 #   XR  l i p   [^0R  1 0 m m cOEQvxvL]zz
 
 t o p _ c u t   =   m a k e _ g r i l l e _ c u t o u t ( 1 8 . 0 ,   2 0 . 0 ,   t u b e _ h e i g h t   -   4 . 0 ,   g r i l l e _ w ,   g r i l l e _ l ,   4 . 0 ,   1 0 . 0 ) 
 
 #   GS~MRbgGS~:NgPzQ<h[ʑ>eS  1 2 0 m m   ΘGbۏΘϑ
 
 #    _z[^N  2 1 4   bU\0R  2 3 4   ( X = 8 ~ 2 4 2 ) ؚ^Oc  Z = 2 0 ~ 1 7 5 
 
 f r o n t _ w i n d o w s _ c o m p   =   P a r t . m a k e C o m p o u n d ( [ P a r t . m a k e B o x ( 2 3 4 . 0 ,   2 0 . 0 ,   1 5 5 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 8 . 0 ,   t u b e _ l e n g t h   -   1 0 . 0 ,   2 0 . 0 ) ) ] ) 
 
 f r o n t _ h c   =   g e t _ h o n e y c o m b _ h o l e s ( 2 5 0 . 0 ,   2 0 0 . 0 ,   6 . 0 ,   2 . 4 ,   ' Y ' ) 
 
 #   FO/fI{I{g e t _ h o n e y c o m b _ h o l e s ( ' Y ' )   /fbz(W  Y = - 1 0   0R  2 0 0FOYXMRbg(W  Y = 2 2 1 ~ 2 2 6 
 
 #   @bNbNbubvzl  Y   ts^y
 
 f r o n t _ h c . t r a n s l a t e ( A p p . V e c t o r ( 0 . 0 ,   t u b e _ l e n g t h   -   5 . 0 ,   0 . 0 ) ) 
 
 f r o n t _ c u t   =   f r o n t _ h c . c o m m o n ( f r o n t _ w i n d o w s _ c o m p ) 
 
 
 
 #   ^
N _SOchQ\핞[_ň2ugNX:_R'`
 
 o u t e r _ t u b e   =   o u t e r _ t u b e . c u t ( t o p _ c u t ) . c u t ( f r o n t _ c u t ) 
 
 
 
 #   4 .   Tz _S  ( Qƀ̀g[2Q) 
 
 #   O
Y:NYXT$NOOYuYZWVvb͑zg  ( L e f t :   X = 0 ~ 6 ,   R i g h t :   X = 2 4 4 ~ 2 5 0 ) 
 
 #   ُ
NN[vOO  I O   !cgBgqNvё^\( 2 m m ) ؏[hQQ  P C I e   civclzz( 2 4 4 ) 
 
 r e a r _ w i n d o w _ w   =   2 3 8 . 0   #   2 4 4 . 0   -   6 . 0 
 
 r e a r _ w i n d o w _ h   =   t u b e _ h e i g h t   -   2 0 . 0 
 
 r e a r _ w i n d o w   =   P a r t . m a k e B o x ( r e a r _ w i n d o w _ w ,   w a l l   +   2 . 0 ,   r e a r _ w i n d o w _ h ) 
 
 r e a r _ w i n d o w . t r a n s l a t e ( A p p . V e c t o r ( 6 . 0 ,   - 1 . 0 ,   1 2 . 0 ) ) 
 
 o u t e r _ t u b e   =   o u t e r _ t u b e . c u t ( r e a r _ w i n d o w ) 
 
 
 
 #   5 .   ;N:g{~gNT[MO  ( M 3 ) 
 
 s t r u c t u r a l _ h o l e s   =   [ ] 
 
 #   ( a )   OgV[T[(W]S$Nzv  Y - Z   *bb
N _'YW҉Sb(Wv萌T^萄vvk-N_	
 
 s i d e _ s c r e w _ p o s   =   [ ( 4 0 ,   2 0 ) ,   ( t u b e _ l e n g t h   -   4 0 ,   2 0 ) ,   ( 4 0 ,   t u b e _ h e i g h t   -   2 0 ) ,   ( t u b e _ l e n g t h   -   4 0 ,   t u b e _ h e i g h t   -   2 0 ) ]   #   y  Z = 2 0    _YXv  1 6 m m   'YW҉
 
 f o r   y ,   z   i n   s i d e _ s c r e w _ p o s : 
 
         #   ]OTQSbpqkWQW  ( ceQOg(u) 
 
         h _ l e f t   =   P a r t . m a k e C y l i n d e r ( I N S E R T _ R ,   I N S E R T _ D E P T H ,   A p p . V e c t o r ( 0 ,   y ,   z ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ) 
 
         #   SOTQSbpqkWQW
 
         h _ r i g h t   =   P a r t . m a k e C y l i n d e r ( I N S E R T _ R ,   I N S E R T _ D E P T H ,   A p p . V e c t o r ( t u b e _ w i d t h ,   y ,   z ) ,   A p p . V e c t o r ( - 1 , 0 , 0 ) ) 
 
         s t r u c t u r a l _ h o l e s . e x t e n d ( [ h _ l e f t ,   h _ r i g h t ] ) 
 
 
 
 #   ( b )   [QƀbI\v^T[(W^萞[_  ( X = 9 ,   X = t u b e _ w i d t h - 9 )   NN_
NSbzYX
 
 c o r e _ l o c k _ p o s   =   [ ( 1 5 ,   t u b e _ l e n g t h   -   3 5 ) ,   ( 1 5 ,   t u b e _ l e n g t h   -   2 0 ) ,   ( t u b e _ w i d t h   -   1 5 ,   t u b e _ l e n g t h   -   3 5 ) ,   ( t u b e _ w i d t h   -   1 5 ,   t u b e _ l e n g t h   -   2 0 ) ]   #   ^T[XR4 *NGWMON;NgMRe  ( Y > 1 8 4 )   v[hQ{k:SbrbrOObI\
 
 f o r   x ,   y   i n   c o r e _ l o c k _ p o s : 
 
         #   YX
NvT[  (   M 3   NzǏ) 
 
         h _ l o c k   =   P a r t . m a k e C y l i n d e r ( M 3 _ C L E A R _ R ,   1 0 . 0 ,   A p p . V e c t o r ( x ,   y ,   - 1 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
         #   l4YT[  ( υN=^) 
 
         h _ c b   =   P a r t . m a k e C y l i n d e r ( 3 . 0 ,   3 . 0 ,   A p p . V e c t o r ( x ,   y ,   - 1 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
         s t r u c t u r a l _ h o l e s . e x t e n d ( [ h _ l o c k ,   h _ c b ] ) 
 
 
 
 o u t e r _ t u b e   =   o u t e r _ t u b e . c u t ( P a r t . m a k e C o m p o u n d ( s t r u c t u r a l _ h o l e s ) ) 
 
 
 
 
 
 #   = = = = = = = = = = = = = = =   ,{NRbI\_8h_Qƀ  ( I n n e r   C o r e )   = = = = = = = = = = = = = = = 
 
 #   Qƀ1u	NWWg~b  U   W^vPbI\ N7hNObneQY{
 
 c o r e _ w   =   t u b e _ w i d t h   -   2 . 0   #   YuQObnR
 
 
 
 d e f   m a k e _ q u a r t e r _ p i p e _ b o t t o m _ l e f t ( x _ l e n ,   o u t e r _ r ,   i n n e r _ r ,   c x ,   c y ,   c z ) : 
 
         o u t e r _ c y l   =   P a r t . m a k e C y l i n d e r ( o u t e r _ r ,   x _ l e n ,   A p p . V e c t o r ( c x ,   c y ,   c z ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ) 
 
         i n n e r _ c y l   =   P a r t . m a k e C y l i n d e r ( i n n e r _ r ,   x _ l e n ,   A p p . V e c t o r ( c x ,   c y ,   c z ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ) 
 
         p i p e   =   o u t e r _ c y l . c u t ( i n n e r _ c y l ) 
 
         b o x   =   P a r t . m a k e B o x ( x _ l e n ,   o u t e r _ r ,   o u t e r _ r ) . t r a n s l a t e ( A p p . V e c t o r ( c x ,   c y   -   o u t e r _ r ,   c z   -   o u t e r _ r ) ) 
 
         r e t u r n   p i p e . c o m m o n ( b o x ) 
 
 
 
 d e f   m a k e _ q u a r t e r _ p i p e _ b o t t o m _ r i g h t ( x _ l e n ,   o u t e r _ r ,   i n n e r _ r ,   c x ,   c y ,   c z ) : 
 
         o u t e r _ c y l   =   P a r t . m a k e C y l i n d e r ( o u t e r _ r ,   x _ l e n ,   A p p . V e c t o r ( c x ,   c y ,   c z ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ) 
 
         i n n e r _ c y l   =   P a r t . m a k e C y l i n d e r ( i n n e r _ r ,   x _ l e n ,   A p p . V e c t o r ( c x ,   c y ,   c z ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ) 
 
         p i p e   =   o u t e r _ c y l . c u t ( i n n e r _ c y l ) 
 
         b o x   =   P a r t . m a k e B o x ( x _ l e n ,   o u t e r _ r ,   o u t e r _ r ) . t r a n s l a t e ( A p p . V e c t o r ( c x ,   c y ,   c z   -   o u t e r _ r ) ) 
 
         r e t u r n   p i p e . c o m m o n ( b o x ) 
 
 
 
 #   2 A :   ^g)w QMRTv[W҉:SW  ( Y = 1 5 ~ 2 1 1 ) 
 
 c o r e _ b a s e _ y   =   1 5 . 0 
 
 c o r e _ b a s e _ l e n g t h   =   2 1 1 . 0   -   1 5 . 0   #   1 9 6 . 0 
 
 c o r e _ b a s e   =   P a r t . m a k e B o x ( c o r e _ w ,   c o r e _ b a s e _ l e n g t h ,   4 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   c o r e _ b a s e _ y ,   9 0 . 0 ) ) 
 
 
 
 #   Bzz^g  ( H o l l o w   B a s e   P l a t e ) 
 
 #   :NNwPge0g'Y)wSbpSev^:NSO
Nev  A T X   5uncO^萷QΘۏl
 
 #   bNRrR  4   *N'YSW҉ƉzSOYu  2 0 m m   vZWVFhNS N*NASW[b_vR:_K{0
 
 d e f   m a k e _ r o u n d e d _ c u t o u t ( x ,   y ,   w ,   l ,   r ) : 
 
         b o x   =   P a r t . m a k e B o x ( w ,   l ,   1 0 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( x ,   y ,   0 . 0 ) ) 
 
         e d g e s   =   [ ] 
 
         f o r   e   i n   b o x . E d g e s : 
 
                 i f   a b s ( e . L e n g t h   -   1 0 . 0 )   <   1 e - 3 :   #   S[  Z   tWvZPW҉
 
                         e d g e s . a p p e n d ( e ) 
 
         i f   r   >   0 . 1 : 
 
                 r e t u r n   b o x . m a k e F i l l e t ( r ,   e d g e s ) 
 
         r e t u r n   b o x 
 
 
 
 b a s e _ c u t o u t s   =   [ ] 
 
 b a s e _ w i n d o w s   =   [ 
 
         ( 2 1 . 0 ,   2 9 . 0 ,   1 3 8 . 0 ,   1 3 5 . 0 ) ,   #   ]N]'YۏΘS  (  _]O@b	gܔgTT[) 
 
         ( 1 7 9 . 0 ,   2 9 . 0 ,   5 0 . 0 ,   1 3 5 . 0 ) ,   #   SN5unN^\ۏΘS
 
         ( 2 1 . 0 ,   1 8 4 . 0 ,   1 3 8 . 0 ,   1 3 . 0 ) ,   #   ]
NoRBzz
 
         ( 1 7 9 . 0 ,   1 8 4 . 0 ,   5 0 . 0 ,   1 3 . 0 )     #   S
NoRBzz
 
 ] 
 
 f o r   w x ,   w y ,   w w ,   w l   i n   b a s e _ w i n d o w s : 
 
         b a s e _ c u t o u t s . a p p e n d ( m a k e _ r o u n d e d _ c u t o u t ( w x ,   w y ,   w w ,   w l ,   5 . 0 ) ) 
 
 
 
 
 
 
 
 #   = = = = = = = = = = = = = = = = =   eXO(uzQ<hBzz^g  = = = = = = = = = = = = = = = = = 
 
 b a s e _ w i n d o w s _ c o m p   =   P a r t . m a k e C o m p o u n d ( b a s e _ c u t o u t s ) 
 
 b a s e _ h c   =   g e t _ h o n e y c o m b _ h o l e s ( 2 5 0 . 0 ,   2 5 0 . 0 ,   6 . 0 ,   2 . 4 ,   ' Z ' ) 
 
 #   \z5R%N<hP6R(WzSLuQ
 
 v a l i d _ b a s e _ h c   =   b a s e _ h c . c o m m o n ( b a s e _ w i n d o w s _ c o m p ) 
 
 c o r e _ b a s e   =   c o r e _ b a s e . c u t ( v a l i d _ b a s e _ h c ) 
 
 #   O
YT̀gwp  Z   t[P0R^gؚ^  ( w a l l ) [qc
NQ`zz
 
 #   2 B :   &^	g[  1 0 m m   YW҉^vT̀g
 
 #   WvXR  ( Z = 1 5   N
N) 
 
 #   WvXR  ( Z = 1 5   0R  Z = 1 8 6 ) 
 
 #   O
Y2bkTbgǏؚ[z!jTz gؚ _0R  Z = 1 8 7 bNbTbg gؚ:N  Z = 1 8 6 Yu  1 m m   2bkcbe.Rm0
 
 c o r e _ r e a r _ w a l l   =   P a r t . m a k e B o x ( c o r e _ w ,   4 . 0 ,   1 8 6 . 0   -   1 5 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   5 . 0 ,   1 5 . 0 ) ) 
 
 #   W҉Ǐ!nR  ( Y = 5 ~ 1 5 ,   Z = 5 ~ 1 5 ) 
 
 r e a r _ c u r v e   =   m a k e _ q u a r t e r _ p i p e _ b o t t o m _ l e f t ( c o r e _ w ,   1 0 . 0 ,   6 . 0 ,   1 . 0 ,   1 5 . 0 ,   1 5 . 0 ) 
 
 c o r e _ r e a r   =   c o r e _ r e a r _ w a l l . f u s e ( r e a r _ c u r v e ) 
 
 
 
 #   {_^Ǒ~g{gt_MRbg
NQ/f  _zvX /f[hQΘv ~g 
 
 f _ y   =   t u b e _ l e n g t h   -   w a l l   -   4 . 0 
 
 f _ h   =   t u b e _ h e i g h t   -   w a l l   -   1 0 . 0 
 
 #   S+T[  1 0 m m   YW҉vMRg
 
 f _ y   =   2 1 7 . 0 
 
 f _ h   =   t u b e _ h e i g h t   -   1 5 . 0   -   1 0 . 0 
 
 f _ t o p   =   P a r t . m a k e B o x ( c o r e _ w ,   4 . 0 ,   8 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   f _ y ,   t u b e _ h e i g h t   -   1 0 . 0   -   8 . 0 ) ) 
 
 f _ l e f t   =   P a r t . m a k e B o x ( 8 . 0 ,   4 . 0 ,   f _ h ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   f _ y ,   1 5 . 0 ) ) 
 
 f _ r i g h t   =   P a r t . m a k e B o x ( 8 . 0 ,   4 . 0 ,   f _ h ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0   +   c o r e _ w   -   8 . 0 ,   f _ y ,   1 5 . 0 ) ) 
 
 f r o n t _ c u r v e   =   m a k e _ q u a r t e r _ p i p e _ b o t t o m _ r i g h t ( c o r e _ w ,   1 0 . 0 ,   6 . 0 ,   1 . 0 ,   2 1 1 . 0 ,   1 5 . 0 ) 
 
 c o r e _ f r o n t   =   f _ t o p . f u s e ( f _ l e f t ) . f u s e ( f _ r i g h t ) . f u s e ( f r o n t _ c u r v e ) 
 
 
 
 #   = = = = = = = = = = = = = = = = =   eXMRbgN4ls^[h  ( H o r i z o n t a l   U n i v e r s a l   R a i l s )   = = = = = = = = = = = = = = = = = 
 
 f _ c z   =   w a l l   +   f _ h   /   2 . 0 
 
 r a i l s   =   [ ] 
 
 #   ub  4   9h4ls^nh  ( [/ecΘGb]SNayR) 
 
 #   -N_ؚ^  f _ c z = 9 5 01 4 0 ΘGbT[ݍ1 2 4 . 5   ( sS  + / -   6 2 . 2 5 ) 01 2 0 ΘGbT[ݍ1 0 5   ( sS  + / -   5 2 . 5 ) 0
 
 r a i l _ z _ c e n t e r s   =   [ f _ c z   -   5 2 . 5 ,   f _ c z   +   5 2 . 5 ]   #   NOYu
NN$N9h  1 2 0 m m   hQ4ls^nhg^n=r
 
 f o r   z _ c e n t e r   i n   r a i l _ z _ c e n t e r s : 
 
         #   [h;NSO
 
         r a i l   =   P a r t . m a k e B o x ( c o r e _ w   -   1 6 . 0 ,   4 . 0 ,   1 0 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0   +   8 . 0 ,   f _ y ,   z _ c e n t e r   -   5 . 0 ) ) 
 
         #   cQ  4 . 2 m m   [v/zi  ( O  M 4 / M 3   N]SNanR) ]SYu  1 0 m m   [SO
 
         s l o t   =   P a r t . m a k e B o x ( c o r e _ w   -   3 6 . 0 ,   1 0 . 0 ,   4 . 2 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0   +   1 8 . 0 ,   f _ y   -   2 . 0 ,   z _ c e n t e r   -   2 . 1 ) ) 
 
         r a i l   =   r a i l . c u t ( s l o t ) 
 
         r a i l s . a p p e n d ( r a i l ) 
 
 
 
 f o r   r   i n   r a i l s : 
 
         c o r e _ f r o n t   =   c o r e _ f r o n t . f u s e ( r ) 
 
 
 
 #   b`
Y4ls^R:_K{  ( MON  Z = 9 1 . 0 ck}Y(uNޏcTevb͑*jh  s h e l f _ b e a m s ) 
 
 h _ b r a c e   =   P a r t . m a k e B o x ( c o r e _ w ,   4 . 0 ,   8 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   f _ y ,   w a l l   +   f _ h / 2   -   4 . 0 ) ) 
 
 #   MRbggXRTQv~ňlpQ  ( Y = 2 0 9 ~ 2 1 7 ,   Z = 1 3 ~ 1 7 ) 
 
 f r o n t _ f l a n g e   =   P a r t . m a k e B o x ( c o r e _ w ,   8 . 0 ,   4 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   f _ y   -   8 . 0 ,   1 3 . 0 ) ) 
 
 c o r e _ f r o n t   =   c o r e _ f r o n t . f u s e ( h _ b r a c e ) . f u s e ( f r o n t _ f l a n g e ) 
 
 
 
 #   = = = = = = = = = = = = = = = = =   WvS1ggSB\lpQ|~  = = = = = = = = = = = = = = = = = 
 
 #   1 .   ^[lpQ  ( Z = 5 ~ 9 ) :   (uNc6eNYX^Sb
NegvV[N
 
 r e a r _ l o c k _ f l a n g e   =   P a r t . m a k e B o x ( c o r e _ w ,   1 0 . 0 ,   4 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   1 5 . 0 ,   5 . 0 ) ) 
 
 f r o n t _ l o c k _ f l a n g e   =   P a r t . m a k e B o x ( c o r e _ w ,   1 0 . 0 ,   4 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   2 0 1 . 0 ,   5 . 0 ) ) 
 
 c o r e _ r e a r   =   c o r e _ r e a r . f u s e ( r e a r _ l o c k _ f l a n g e ) 
 
 c o r e _ f r o n t   =   c o r e _ f r o n t . f u s e ( h _ b r a c e ) . f u s e ( f r o n t _ l o c k _ f l a n g e ) 
 
 
 
 #   2 .   -Nnb͑lpQ  ( Z = 8 6 ~ 9 0 ) :   (uN/ed`nm(W  Z = 9 0   v8h_-Ng  ( c o r e _ b a s e ) 
 
 r e a r _ s u p p o r t _ f l a n g e   =   P a r t . m a k e B o x ( c o r e _ w ,   1 0 . 0 ,   4 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   1 5 . 0 ,   8 6 . 0 ) ) 
 
 f r o n t _ s u p p o r t _ f l a n g e   =   P a r t . m a k e B o x ( c o r e _ w ,   1 0 . 0 ,   4 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 1 . 0 ,   2 0 1 . 0 ,   8 6 . 0 ) ) 
 
 c o r e _ r e a r   =   c o r e _ r e a r . f u s e ( r e a r _ s u p p o r t _ f l a n g e ) 
 
 c o r e _ f r o n t   =   c o r e _ f r o n t . f u s e ( f r o n t _ s u p p o r t _ f l a n g e ) 
 
 
 
 #   :NNOv萯~s^
Nxx;Ng	NN^^Ne  ( Z = 5 )   _
NSbpqkW(WlpQ^
 
 #    _@b	gv;Ngܔg( X = 1 2 ,   1 6 9 ,   2 1 4 ,   2 3 4 ) 0bNO(u  [ 4 0 . 0 ,   1 1 0 . 0 ,   1 9 0 . 0 ,   2 2 5 . 0 ]   \O:N[hQvT[  X   PWh
 
 r e a r _ j o i n t _ h o l e s _ f l a n g e   =   [ ] 
 
 r e a r _ j o i n t _ h o l e s _ b a s e   =   [ ] 
 
 f o r   m x   i n   [ 4 0 . 0 ,   1 1 0 . 0 ,   1 9 0 . 0 ,   2 2 5 . 0 ] : 
 
         #   ^^T[  ( T
N) 
 
         r e a r _ j o i n t _ h o l e s _ b a s e . a p p e n d ( P a r t . m a k e C y l i n d e r ( 1 . 7 ,   1 0 . 0 ,   A p p . V e c t o r ( m x ,   2 0 . 0 ,   4 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) ) 
 
         #   ^^l4YT[  ( υN4Y) 
 
         r e a r _ j o i n t _ h o l e s _ b a s e . a p p e n d ( P a r t . m a k e C y l i n d e r ( 3 . 0 ,   3 . 0 ,   A p p . V e c t o r ( m x ,   2 0 . 0 ,   5 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) ) 
 
         #   lpQpqkT[  ( T
N) 
 
         r e a r _ j o i n t _ h o l e s _ f l a n g e . a p p e n d ( P a r t . m a k e C y l i n d e r ( I N S E R T _ R ,   I N S E R T _ D E P T H ,   A p p . V e c t o r ( m x ,   2 0 . 0 ,   9 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) ) 
 
 
 
 c o r e _ r e a r   =   c o r e _ r e a r . c u t ( P a r t . m a k e C o m p o u n d ( r e a r _ j o i n t _ h o l e s _ f l a n g e ) ) 
 
 c o r e _ b a s e   =   c o r e _ b a s e . c u t ( P a r t . m a k e C o m p o u n d ( r e a r _ j o i n t _ h o l e s _ b a s e ) ) 
 
 
 
 f r o n t _ j o i n t _ h o l e s _ f l a n g e   =   [ ] 
 
 f r o n t _ j o i n t _ h o l e s _ b a s e   =   [ ] 
 
 f o r   m x   i n   [ 4 0 . 0 ,   1 1 0 . 0 ,   1 9 0 . 0 ,   2 2 5 . 0 ] : 
 
         #   ^^T[  ( T
N) 
 
         f r o n t _ j o i n t _ h o l e s _ b a s e . a p p e n d ( P a r t . m a k e C y l i n d e r ( 1 . 7 ,   1 0 . 0 ,   A p p . V e c t o r ( m x ,   2 0 6 . 0 ,   4 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) ) 
 
         #   ^^l4YT[
 
         f r o n t _ j o i n t _ h o l e s _ b a s e . a p p e n d ( P a r t . m a k e C y l i n d e r ( 3 . 0 ,   3 . 0 ,   A p p . V e c t o r ( m x ,   2 0 6 . 0 ,   5 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) ) 
 
         #   lpQpqkT[
 
         f r o n t _ j o i n t _ h o l e s _ f l a n g e . a p p e n d ( P a r t . m a k e C y l i n d e r ( I N S E R T _ R ,   I N S E R T _ D E P T H ,   A p p . V e c t o r ( m x ,   2 0 6 . 0 ,   9 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) ) 
 
 
 
 c o r e _ f r o n t   =   c o r e _ f r o n t . c u t ( P a r t . m a k e C o m p o u n d ( f r o n t _ j o i n t _ h o l e s _ f l a n g e ) ) 
 
 c o r e _ b a s e   =   c o r e _ b a s e . c u t ( P a r t . m a k e C o m p o u n d ( f r o n t _ j o i n t _ h o l e s _ b a s e ) ) 
 
 
 
 
 
 
 
 #   ^[pqkT[MO  ( (W  c o r e _ b a s e   ^c6eeg  o u t e r _ t u b e   vN) 
 
 c o r e _ i n s e r t s   =   [ ] 
 
 f o r   x ,   y   i n   c o r e _ l o c k _ p o s : 
 
         c o r e _ i n s e r t s . a p p e n d ( P a r t . m a k e C y l i n d e r ( I N S E R T _ R ,   I N S E R T _ D E P T H ,   A p p . V e c t o r ( x ,   y ,   w a l l ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) ) 
 
 c o r e _ b a s e   =   c o r e _ b a s e . c u t ( P a r t . m a k e C o m p o u n d ( c o r e _ i n s e r t s ) ) 
 
 
 
 #   = = = = = = = = = = = = = = = = =   lxN _T[Nc}p  = = = = = = = = = = = = = = = = = 
 
 
 
 #   [ň;Ng  ( PWh|WNQƀ) 
 
 m b _ x   =   4 . 0   #   TSOPy  3 m m :NT̀g]OYuQ  3 m m   v[SOzgNO  I O   !cgY[aSeQ
 
 m b _ y   =   w a l l   +   4 . 0   #   ݍỳg  4 m m   - >   I{N  c o r e _ r e a r   vQOb  ( 1 2 . 0 ) 
 
 #   O
YV:N;Ng+ cep;`ؚ0RN  8 0 m m :NN~v萄v  A T X   'Y5un~Qzz;Ng_{40W[ň
 
 m b _ z   =   9 4 . 0   #   Wv;Ng1^PW=(W N|i:NNe5un~Q[vrz0W^vc(W  8 m m   ^g
N^ܔg
 
 s t a n d o f f _ h e i g h t   =   8 . 0   #   8 m m   ܔgP C B   MON  Z = 1 6 
 
 
 
 m b _ h o l e s _ p o s   =   [ ( 2 1 0 ,   1 0 ) ,   ( 2 3 0 ,   1 6 5 ) ,   ( 1 6 5 ,   1 0 ) ,   ( 1 6 5 ,   1 6 5 ) ,   ( 8 ,   3 3 ) ,   ( 8 ,   1 6 5 ) ] 
 
 f o r   h x ,   h y   i n   m b _ h o l e s _ p o s : 
 
         a b s _ x   =   m b _ x   +   h x 
 
         a b s _ y   =   m b _ y   +   h y 
 
         
 
         #   O
YMON  Y = 1 9   v;NgT[y^g( Y = 1 5 ) *Yяubܔg_[fe
 
         #   p`}Y  Y = 1 9   =(WT̀glpQ  ( Y = 1 5 ~ 2 5 )   vVNlpQvؚ^( Z = 9 ~ 1 3 ) N;Ngؚ^[hQ N
 
         i f   a b s _ y   <   2 5 . 0 : 
 
                 #   vc(W  4 m m   SvZWVlpQ
NSb;eT[z0R^g  ( Z = 1 3    Nv_NSb) {_^b_1_vܔg
 
                 #   ُ*Nd\O؏O;NgNTe[lpQT^gb_bN!kRV
 
                 s _ h o l e   =   P a r t . m a k e C y l i n d e r ( 1 . 4 ,   2 0 . 0 ,   A p p . V e c t o r ( a b s _ x ,   a b s _ y ,   2 0 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , - 1 ) ) 
 
                 c o r e _ r e a r   =   c o r e _ r e a r . c u t ( s _ h o l e ) 
 
                 c o r e _ b a s e   =   c o r e _ b a s e . c u t ( s _ h o l e ) 
 
         e l s e : 
 
                 #   MON-NT萄vck8^ܔg
 
                 p i l l a r   =   P a r t . m a k e C y l i n d e r ( 4 . 0 ,   s t a n d o f f _ h e i g h t ,   A p p . V e c t o r ( a b s _ x ,   a b s _ y ,   m b _ z ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
                 s _ h o l e   =   P a r t . m a k e C y l i n d e r ( 1 . 4 ,   1 0 . 0 ,   A p p . V e c t o r ( a b s _ x ,   a b s _ y ,   m b _ z   +   s t a n d o f f _ h e i g h t ) ,   A p p . V e c t o r ( 0 , 0 , - 1 ) ) 
 
                 c o r e _ b a s e   =   c o r e _ b a s e . f u s e ( p i l l a r ) . c u t ( s _ h o l e ) 
 
 
 
 #   Tbg _T[  ( ;Ng  I / O   T  P C I e )   -   VR_irtcknxI / O (W]( NOX ) P C I e (WS( ؚX ) 
 
 i o _ c u t   =   P a r t . m a k e B o x ( 1 6 0 ,   1 0 ,   4 5 ) . t r a n s l a t e ( A p p . V e c t o r ( m b _ x ,   w a l l   -   2 . 0 ,   m b _ z   +   s t a n d o f f _ h e i g h t   +   1 . 6 ) ) 
 
 c o r e _ r e a r   =   c o r e _ r e a r . c u t ( i o _ c u t ) 
 
 
 
 p c i e _ s t a r t _ x   =   m b _ x   +   1 6 0   +   4 . 0 
 
 p c i e _ s l o t _ w i d t h   =   1 5 . 0   
 
 p c i e _ s l o t _ p i t c h   =   2 0 . 3 2   
 
 p c i e _ b r a c k e t _ t o p   =   7 9 . 2   #   JSؚ>faSё^\!cgvirt;`ؚ^
 
 p c i e _ c u t o u t _ h e i g h t   =   5 8 . 0   #   Tbg[E _T[vؚ^  ( !cgNevcS:SW) 
 
 
 
 #   RrR~s^  P C I e   i  ( vc _ N*N]'Yveb_T[md1_vWvQXeyg) 
 
 p c i e _ c u t o u t _ w i d t h   =   4   *   p c i e _ s l o t _ p i t c h   -   5 . 3 2   #   R}Yv4 *Ni
 
 p c i e _ c u t o u t   =   P a r t . m a k e B o x ( p c i e _ c u t o u t _ w i d t h ,   1 0 . 0 ,   p c i e _ c u t o u t _ h e i g h t ) . t r a n s l a t e ( A p p . V e c t o r ( p c i e _ s t a r t _ x ,   w a l l   -   2 . 0 ,   m b _ z   +   s t a n d o f f _ h e i g h t ) ) 
 
 c o r e _ r e a r   =   c o r e _ r e a r . c u t ( p c i e _ c u t o u t ) 
 
 
 
 #   :NYnё^\!cGrSg  ( E x t e r n a l   C l a m p )   6R\O*jT'}T[
 
 #   (u7bvSg1 1 0 m m T[(W5 0 / 6 0 v
N[yMOn0
 
 #   :g{Q萁gP[^/f  2 4 8 :NN
NSgSOdXbN\'}T[T]OPyv^cOY*NT[MOO
 
 b r a c k e t _ z   =   m b _ z   +   s t a n d o f f _ h e i g h t   +   p c i e _ b r a c k e t _ t o p 
 
 
 
 #   1 .   cQ Nag  3 m m   ؚv[hQz*jT~NO  4   *Nё^\!cGrvv4YTY8OQ  ( Z = 9 6   0R  Z = 9 9 ) 
 
 p c i e _ s l i t   =   P a r t . m a k e B o x ( 4   *   p c i e _ s l o t _ p i t c h ,   1 0 . 0 ,   3 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( p c i e _ s t a r t _ x   -   2 . 0 ,   w a l l   -   2 . 0 ,   b r a c k e t _ z ) ) 
 
 c o r e _ r e a r   =   c o r e _ r e a r . c u t ( p c i e _ s l i t ) 
 
 
 
 #   2 .   5R_pqkvT[
 
 #   cO  X   =   1 8 5 ,   1 9 0 ,   1 9 5 ,   2 0 0   V*NT[MO0
 
 #   Yg(u7bO(u  1 1 0 m m   vSgT[(W5 0 / 6 0 HNO(u  X = 1 9 5   vT[MOeSg gSOO(W  X = 2 4 5   ]S[ _SOXX
 
 c l a m p _ h o l e s   =   [ ] 
 
 f o r   c x   i n   [ 1 8 5 . 0 ,   1 9 0 . 0 ,   1 9 5 . 0 ,   2 0 0 . 0 ] : 
 
         c l a m p _ h o l e s . a p p e n d ( P a r t . m a k e C y l i n d e r ( I N S E R T _ R ,   I N S E R T _ D E P T H ,   A p p . V e c t o r ( c x ,   w a l l ,   b r a c k e t _ z   -   1 1 . 0 ) ,   A p p . V e c t o r ( 0 , 1 , 0 ) ) ) 
 
 c o r e _ r e a r   =   c o r e _ r e a r . c u t ( P a r t . m a k e C o m p o u n d ( c l a m p _ h o l e s ) ) 
 
 
 
 #   A T X   5unOz`c  ( (WJSؚ  P C I e   :SWck
Ne _]O  C P U ) 
 
 p s u _ x   =   5 0 . 0   #   SONns^>e  ( T]_5 m m  _YXvSO^VN) 
 
 p s u _ y   =   1 0 . 0   #   '}4T̀gQO
 
 p s u _ z   =   2 . 0   #   
NnmN|iv8TΘv^TTcΘ
 
 p s u _ d i m _ x   =   1 5 0 . 0   #   hQ  A T X   [^s^>e
 
 p s u _ d i m _ y   =   1 4 0 . 0   #   m^
 
 p s u _ d i m _ z   =   8 6 . 0     #   hQ  A T X   ؚ^
 
 
 
 #   = = = = = = = = = = = = = = = = =   eXN|i`zzb͑*jh  ( S k e l e t o n   S h e l f   B e a m s )   = = = = = = = = = = = = = = = = = 
 
 #   O
Y*jh~
N/zte*N:g{&TRObp*be;NgTev  P C I e   >faSi
 
 b e a m _ z   =   9 4 . 0   #   ( 
NQO(u*jh) 
 
 #   = = = = = = = = = = = = = = = = =   WvS1gglxv`zzXbg  = = = = = = = = = = = = = = = = = 
 
 #   5un]l^{_^ RdeHrN|i`zz*jh
 
 #   s(WbN\  4 _ P S U _ B r a c k e t   ~|\O:N  4 _ S S D _ B r a c k e t   O(u>en(W  Z = 9 4   vNB\1^g
NeMR
 
 
 
 s s d _ d i m _ x   =   1 0 0 . 0 
 
 s s d _ d i m _ y   =   7 . 0 
 
 s s d _ d i m _ z   =   7 0 . 0 
 
 
 
 s s d _ c e n t e r _ x   =   1 6 0 . 0 
 
 s s d _ c e n t e r _ y   =   2 0 0 . 0 
 
 
 
 #   lxvXbgPW(W  c o r e _ b a s e   KN
N  ( Z = 9 4 ) 
 
 s s d _ t r a y   =   P a r t . m a k e B o x ( 1 5 0 . 0 ,   7 2 . 0 ,   4 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 8 5 . 0 ,   1 4 5 . 0 ,   9 4 . 0 ) ) 
 
 
 
 #   XR2nW^  ( Z = 9 8 ) 
 
 c r a d l e _ o u t e r   =   P a r t . m a k e B o x ( 1 0 4 . 0 ,   1 1 . 0 ,   3 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( s s d _ c e n t e r _ x   -   5 2 . 0 ,   s s d _ c e n t e r _ y   -   5 . 5 ,   9 8 . 0 ) ) 
 
 c r a d l e _ i n n e r   =   P a r t . m a k e B o x ( 1 0 0 . 0 ,   7 . 0 ,   3 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( s s d _ c e n t e r _ x   -   5 0 . 0 ,   s s d _ c e n t e r _ y   -   3 . 5 ,   9 8 . 0 ) ) 
 
 s s d _ t r a y   =   s s d _ t r a y . f u s e ( c r a d l e _ o u t e r . c u t ( c r a d l e _ i n n e r ) ) 
 
 
 
 s s d _ h o l e s   =   [ ] 
 
 f o r   h x   i n   [ - 3 8 . 3 ,   3 8 . 3 ] : 
 
         h _ p a s s   =   P a r t . m a k e C y l i n d e r ( M 3 _ C L E A R _ R ,   1 0 . 0 ,   A p p . V e c t o r ( s s d _ c e n t e r _ x   +   h x ,   s s d _ c e n t e r _ y ,   9 8 . 0   +   2 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , - 1 ) ) 
 
         h _ c a p   =   P a r t . m a k e C y l i n d e r ( 3 . 0 ,   3 . 0 ,   A p p . V e c t o r ( s s d _ c e n t e r _ x   +   h x ,   s s d _ c e n t e r _ y ,   9 4 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
         s s d _ h o l e s . e x t e n d ( [ h _ p a s s ,   h _ c a p ] ) 
 
                 
 
 p s u _ b r a c k e t   =   s s d _ t r a y . c u t ( P a r t . m a k e C o m p o u n d ( s s d _ h o l e s ) ) 
 
 
 
 
 
 #   = = = = = = = = = = = = = = =   ,{	NRdrΘh<h  ( M o d u l a r   G r i l l e s )   = = = = = = = = = = = = = = = 
 
 d e f   m a k e _ g r i l l e ( w ,   l ,   i s _ f r o n t = F a l s e ) : 
 
         g   =   P a r t . m a k e B o x ( w ,   l ,   4 . 0 ) 
 
         #   ubpwv Vr o8N5R _T[  ( P i l l - s h a p e d   m e s h ) 
 
         h o l e s   =   [ ] 
 
         p i t c h _ x   =   1 4 . 0 
 
         p i t c h _ y   =   3 5 . 0 
 
         f o r   i x   i n   r a n g e ( i n t ( w / p i t c h _ x )   -   1 ) : 
 
                 f o r   i y   i n   r a n g e ( i n t ( l / p i t c h _ y )   -   1 ) : 
 
                         h x   =   1 4 . 0   +   i x   *   p i t c h _ x 
 
                         h y   =   1 4 . 0   +   i y   *   p i t c h _ y 
 
                         
 
                         #   Yg/fMRnbg _SN҉:N _:g	cYuQ[SO:SW
 
                         i f   i s _ f r o n t   a n d   h x   >   w   -   4 0 . 0   a n d   h y   <   4 0 . 0 : 
 
                                 c o n t i n u e 
 
                                 
 
                         c 1   =   P a r t . m a k e C y l i n d e r ( 4 . 0 ,   1 0 . 0 ,   A p p . V e c t o r ( h x ,   h y ,   - 2 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
                         c 2   =   P a r t . m a k e C y l i n d e r ( 4 . 0 ,   1 0 . 0 ,   A p p . V e c t o r ( h x ,   h y   +   1 5 . 0 ,   - 2 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
                         b o x   =   P a r t . m a k e B o x ( 8 . 0 ,   1 5 . 0 ,   1 0 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( h x   -   4 . 0 ,   h y ,   - 2 . 0 ) ) 
 
                         h o l e s . a p p e n d ( c 1 . f u s e ( c 2 ) . f u s e ( b o x ) ) 
 
                         
 
         i f   h o l e s : 
 
                 g   =   g . c u t ( P a r t . m a k e C o m p o u n d ( h o l e s ) ) 
 
                 
 
         i f   i s _ f r o n t : 
 
                 #   Sb N*N  1 6 m m   vWb_T[(uN[ňё^\5un	c  ( [ET[_  1 6 . 2 m m :N]Yu) 
 
                 #   >en(WSN҉v[SOYu}v:SW
 
                 p w r _ h o l e   =   P a r t . m a k e C y l i n d e r ( 1 6 . 2   /   2 . 0 ,   1 0 . 0 ,   A p p . V e c t o r ( w   -   2 0 . 0 ,   2 0 . 0 ,   - 2 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
                 g   =   g . c u t ( p w r _ h o l e ) 
 
                 
 
         #   :N^MRnbg  ( v萌T^)   XR  1 2 0 m m   ΘGbv YcnR[hi  ( R a i l   S l o t s )  
 
         #   9e:N*jT/zte*Nbg  ( ]SnR) AQΘGb(W]S$NO1uyRN[Q
NTvpn
 
         i f   n o t   i s _ f r o n t : 
 
                 c x   =   w   /   2 . 0 
 
                 c y   =   l   /   2 . 0 
 
                 
 
                 #   $Nag*jT[hRV&^  ( Y tݍ  1 0 5 m m ,   [^  1 2 m m ,   X t`Sn[^  w ) 
 
                 r a i l _ f r o n t   =   P a r t . m a k e B o x ( w ,   1 2 . 0 ,   4 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 0 ,   c y   -   5 2 . 5   -   6 . 0 ,   0 ) ) 
 
                 r a i l _ r e a r   =   P a r t . m a k e B o x ( w ,   1 2 . 0 ,   4 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 0 ,   c y   +   5 2 . 5   -   6 . 0 ,   0 ) ) 
 
                 g   =   g . f u s e ( r a i l _ f r o n t ) . f u s e ( r a i l _ r e a r ) 
 
                 
 
                 #   cQ  4 . 5 m m   [*j/te*NbgvnRi  ( z  1 0 m m   m^nxO[hQR _) 
 
                 #   ]STOYu  6 m m   
NReOFh:_^
 
                 s l o t _ f r o n t   =   P a r t . m a k e B o x ( w   -   1 2 . 0 ,   4 . 5 ,   1 0 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 6 . 0 ,   c y   -   5 2 . 5   -   2 . 2 5 ,   - 2 . 0 ) ) 
 
                 s l o t _ r e a r   =   P a r t . m a k e B o x ( w   -   1 2 . 0 ,   4 . 5 ,   1 0 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( 6 . 0 ,   c y   +   5 2 . 5   -   2 . 2 5 ,   - 2 . 0 ) ) 
 
                 g   =   g . c u t ( s l o t _ f r o n t ) . c u t ( s l o t _ r e a r ) 
 
                 
 
         #   :NMRnbgSN҉SbQ  1 6 . 2 m m   hQё^\ _:g.WT[
 
         i f   i s _ f r o n t : 
 
                 p w r _ h o l e   =   P a r t . m a k e C y l i n d e r ( 1 6 . 2   /   2 . 0 ,   1 0 . 0 ,   A p p . V e c t o r ( w   -   2 0 . 0 ,   2 0 . 0 ,   - 2 . 0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
                 g   =   g . c u t ( p w r _ h o l e ) 
 
                 
 
         #   (Wbg̀bZ = 0 	vV*N҉=SbQυ_v  6 x 3   xT[
 
         #   m^  3 . 2 m m bg;`S  4 . 0 m m hb[eu
 
         l i p   =   1 0 . 0 
 
         m _ r   =   3 . 1 
 
         m _ d   =   3 . 2 
 
         m 1   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( l i p / 2 ,   l i p / 2 ,   0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
         m 2   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( w   -   l i p / 2 ,   l i p / 2 ,   0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
         m 3   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( l i p / 2 ,   l   -   l i p / 2 ,   0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
         m 4   =   P a r t . m a k e C y l i n d e r ( m _ r ,   m _ d ,   A p p . V e c t o r ( w   -   l i p / 2 ,   l   -   l i p / 2 ,   0 ) ,   A p p . V e c t o r ( 0 , 0 , 1 ) ) 
 
         g   =   g . c u t ( P a r t . m a k e C o m p o u n d ( [ m 1 ,   m 2 ,   m 3 ,   m 4 ] ) ) 
 
                 
 
         r e t u r n   g 
 
 
 
 t o p _ g r i l l e   =   m a k e _ g r i l l e ( g r i l l e _ w ,   g r i l l e _ l ) . t r a n s l a t e ( A p p . V e c t o r ( 1 8 . 0 ,   2 0 . 0 ,   t u b e _ h e i g h t   -   4 . 0 ) ) 
 
 #   ^萌[hQ\
NQub  b o t _ g r i l l e 
 
 #   MRh<hzw
 
 f r o n t _ g r i l l e _ b a s e   =   m a k e _ g r i l l e ( g r i l l e _ w ,   t u b e _ h e i g h t   -   4 0 . 0 ,   i s _ f r o n t = T r u e ) 
 
 f r o n t _ g r i l l e _ b a s e . r o t a t e ( A p p . V e c t o r ( 0 , 0 , 0 ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ,   9 0 ) 
 
 f r o n t _ g r i l l e _ b a s e . t r a n s l a t e ( A p p . V e c t o r ( 1 8 . 0 ,   t u b e _ l e n g t h ,   2 0 . 0 ) ) 
 
 
 
 
 
 #   = = = = = = = = = = = = = = =   ,{VR$NO~s^\g  ( S i d e   P a n e l s )   = = = = = = = = = = = = = = = 
 
 d e f   m a k e _ s i d e _ p a n e l ( i s _ l e f t = T r u e ) : 
 
         p   =   P a r t . m a k e B o x ( 4 . 0 ,   t u b e _ l e n g t h ,   t u b e _ h e i g h t ) 
 
         e d g e s   =   [ ] 
 
         f o r   e   i n   p . E d g e s : 
 
                 i f   a b s ( e . L e n g t h   -   4 . 0 )   <   1 e - 3 : 
 
                         e d g e s . a p p e n d ( e ) 
 
         p   =   p . m a k e F i l l e t ( o u t e r _ r a d i u s ,   e d g e s ) 
 
         
 
         #   XRl4YNT[  ( M 3 ) NYXvpqk[[P
 
         s c r e w _ h o l e s   =   [ ] 
 
         s i d e _ s c r e w _ p o s   =   [ ( 4 0 ,   2 0 ) ,   ( t u b e _ l e n g t h   -   4 0 ,   2 0 ) ,   ( 4 0 ,   t u b e _ h e i g h t   -   2 0 ) ,   ( t u b e _ l e n g t h   -   4 0 ,   t u b e _ h e i g h t   -   2 0 ) ] 
 
         f o r   y ,   z   i n   s i d e _ s c r e w _ p o s : 
 
                 h _ p a s s   =   P a r t . m a k e C y l i n d e r ( 1 . 7 ,   4 . 0 ,   A p p . V e c t o r ( 0 ,   y ,   z ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) )   #   3 . 4 m m   T[
 
                 i f   i s _ l e f t : 
 
                         #   ]OgY/f  X = 0 
 
                         h _ c a p   =   P a r t . m a k e C y l i n d e r ( 3 . 0 ,   2 . 0 ,   A p p . V e c t o r ( 0 ,   y ,   z ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ) 
 
                 e l s e : 
 
                         #   SOgY/f  X = 4 . 0 
 
                         h _ c a p   =   P a r t . m a k e C y l i n d e r ( 3 . 0 ,   2 . 0 ,   A p p . V e c t o r ( 4 . 0 ,   y ,   z ) ,   A p p . V e c t o r ( - 1 , 0 , 0 ) ) 
 
                 s c r e w _ h o l e s . e x t e n d ( [ h _ p a s s ,   h _ c a p ] ) 
 
         p   =   p . c u t ( P a r t . m a k e C o m p o u n d ( s c r e w _ h o l e s ) ) 
 
 
 
         #   XR[ZSgKQ  /   y{^:g2uΘnmՖ  ( S c i - f i   R e l i e f s ) 
 
         c u t t e r s   =   [ ] 
 
         
 
         #   1 .   [ZSw5/ ]  _  ( C y b e r - H e x   L o g o ) 
 
         #   Q[RrRb  ( ]OgYO/f  X = 0 SOgYO/f  X = 4 ) 
 
         c u t _ x   =   - 1 . 0   i f   i s _ l e f t   e l s e   2 . 5 
 
         #   b_Á
YBgv:g2u89e(ug{0ؚzvfEON/ [ZSS^XΘ<h
 
         #   Ǐ[vQUO5RTRrRb_b`nmvmQb_ň2uxGr
 
         d e f   m a k e _ h e x ( r ,   t h i c k ) : 
 
                 p t s   =   [ ] 
 
                 f o r   i   i n   r a n g e ( 6 ) : 
 
                         a n g   =   m a t h . r a d i a n s ( 6 0   *   i   +   3 0 )   #   3 0 ^OPyOs^vmQb_
 
                         p t s . a p p e n d ( A p p . V e c t o r ( 0 ,   r   *   m a t h . c o s ( a n g ) ,   r   *   m a t h . s i n ( a n g ) ) ) 
 
                 p t s . a p p e n d ( p t s [ 0 ] ) 
 
                 r e t u r n   P a r t . F a c e ( P a r t . m a k e P o l y g o n ( p t s ) ) . e x t r u d e ( A p p . V e c t o r ( t h i c k ,   0 ,   0 ) ) 
 
         
 
         #   g^	NB\T_mQb_
 
         h e x _ o u t e r   =   m a k e _ h e x ( 3 5 . 0 ,   2 . 5 ) . c u t ( m a k e _ h e x ( 2 8 . 0 ,   2 . 5 ) ) 
 
         h e x _ m i d   =   m a k e _ h e x ( 2 3 . 0 ,   2 . 5 ) . c u t ( m a k e _ h e x ( 1 9 . 0 ,   2 . 5 ) ) 
 
         h e x _ c o r e   =   m a k e _ h e x ( 1 2 . 0 ,   2 . 5 ) 
 
         b a s e _ e m b l e m   =   h e x _ o u t e r . f u s e ( h e x _ m i d ) . f u s e ( h e x _ c o r e ) 
 
         
 
         #   6R\ORrRR\mQb_[RR:N  6   WW :ghň2uxGr   ( RrR~[PmQb_v-Np) 
 
         c u t _ w   =   4 . 0   #   R[^
 
         s 1   =   P a r t . m a k e B o x ( 5 . 0 ,   1 0 0 . 0 ,   c u t _ w ) . t r a n s l a t e ( A p p . V e c t o r ( - 1 . 0 ,   - 5 0 . 0 ,   - c u t _ w / 2 . 0 ) ) 
 
         s 2   =   P a r t . m a k e B o x ( 5 . 0 ,   1 0 0 . 0 ,   c u t _ w ) . t r a n s l a t e ( A p p . V e c t o r ( - 1 . 0 ,   - 5 0 . 0 ,   - c u t _ w / 2 . 0 ) ) 
 
         s 2 . r o t a t e ( A p p . V e c t o r ( 0 , 0 , 0 ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ,   6 0 ) 
 
         s 3   =   P a r t . m a k e B o x ( 5 . 0 ,   1 0 0 . 0 ,   c u t _ w ) . t r a n s l a t e ( A p p . V e c t o r ( - 1 . 0 ,   - 5 0 . 0 ,   - c u t _ w / 2 . 0 ) ) 
 
         s 3 . r o t a t e ( A p p . V e c t o r ( 0 , 0 , 0 ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ,   - 6 0 ) 
 
         
 
         e m b l e m   =   b a s e _ e m b l e m . c u t ( s 1 ) . c u t ( s 2 ) . c u t ( s 3 ) 
 
         
 
         #   XR N*Ns~vg~Wb_hS  ( {|<OwQ\Fh) XRy{^(a
 
         t r a c k _ r i n g   =   P a r t . m a k e C y l i n d e r ( 4 2 . 0 ,   2 . 5 ,   A p p . V e c t o r ( 0 , 0 , 0 ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ) . c u t ( P a r t . m a k e C y l i n d e r ( 4 0 . 5 ,   2 . 5 ,   A p p . V e c t o r ( 0 , 0 , 0 ) ,   A p p . V e c t o r ( 1 , 0 , 0 ) ) ) 
 
         e m b l e m   =   e m b l e m . f u s e ( t r a c k _ r i n g ) 
 
         
 
         #   s^y4T0ROg
 
         e m b l e m . t r a n s l a t e ( A p p . V e c t o r ( c u t _ x ,   t u b e _ l e n g t h   /   2 . 0 ,   t u b e _ h e i g h t   /   2 . 0 ) ) 
 
         c u t t e r s . a p p e n d ( e m b l e m ) 
 
         
 
         #   3 .   [ZSagb_x  ( C y b e r p u n k   B a r c o d e ) 
 
         #   (W]O:SW  ( Y = 3 0 ~ 7 1 ,   Z = 3 5 ~ 5 5 ) T
NyR  1 0 m m   N[ _^萄v  M 3   l4YNT[
 
         w i d t h s   =   [ 2 . 0 ,   1 . 0 ,   5 . 0 ,   1 . 5 ,   1 . 0 ,   4 . 0 ,   2 . 0 ,   1 . 0 ,   3 . 0 ,   1 . 0 ] 
 
         c u r r e n t _ y   =   3 0 . 0 
 
         f o r   w   i n   w i d t h s : 
 
                 c u t t e r s . a p p e n d ( P a r t . m a k e B o x ( 2 . 5 ,   w ,   2 0 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( c u t _ x ,   c u r r e n t _ y ,   3 5 . 0 ) ) ) 
 
                 c u r r e n t _ y   + =   w   +   2 . 0 
 
         
 
         #   ]SOg~ NOYu:g2uՖVR_[yf[
 
                 
 
         #   Tv^@b	gnmՖv^NOg-NcS  ( b_b  1 . 5 m m   m^v4;RVHh) 
 
         r e l i e f   =   P a r t . m a k e C o m p o u n d ( c u t t e r s ) 
 
         p   =   p . c u t ( r e l i e f ) 
 
         
 
         #   SbQOgvV[NT[  ( M 3   l4YNT[) 
 
         s _ h o l e s   =   [ ] 
 
         #   c u t _ x   [N]O/f  - 1 Yhb/f  0 [NSO/f  2 . 5 Yhb/f  t u b e _ w i d t h 
 
         s u r f _ x   =   0   i f   i s _ l e f t   e l s e   t u b e _ w i d t h 
 
         d i r _ x   =   1   i f   i s _ l e f t   e l s e   - 1 
 
         f o r   y ,   z   i n   s i d e _ s c r e w _ p o s : 
 
                 #   T[  ( v_  3 . 3 m m ) 
 
                 h _ p a s s   =   P a r t . m a k e C y l i n d e r ( M 3 _ C L E A R _ R ,   6 . 0 ,   A p p . V e c t o r ( s u r f _ x   -   1 ,   y ,   z ) ,   A p p . V e c t o r ( d i r _ x , 0 , 0 ) ) 
 
                 #   l4Y=^  ( v_  6 . 0 m m ) 
 
                 h _ c a p   =   P a r t . m a k e C y l i n d e r ( 3 . 0 ,   2 . 0 ,   A p p . V e c t o r ( s u r f _ x   -   d i r _ x ,   y ,   z ) ,   A p p . V e c t o r ( d i r _ x , 0 , 0 ) ) 
 
                 s _ h o l e s . e x t e n d ( [ h _ p a s s ,   h _ c a p ] ) 
 
         
 
         p   =   p . c u t ( P a r t . m a k e C o m p o u n d ( s _ h o l e s ) ) 
 
         
 
         r e t u r n   p 
 
 
 
 l e f t _ p a n e l   =   m a k e _ s i d e _ p a n e l ( i s _ l e f t = T r u e ) . t r a n s l a t e ( A p p . V e c t o r ( - 4 . 0 ,   0 ,   0 ) ) 
 
 r i g h t _ p a n e l   =   m a k e _ s i d e _ p a n e l ( i s _ l e f t = F a l s e ) . t r a n s l a t e ( A p p . V e c t o r ( t u b e _ w i d t h ,   0 ,   0 ) ) 
 
 
 
 
 
 #   = = = = = = = = = = = = = = =   mR0Rechv^KN[ZSf[mň  = = = = = = = = = = = = = = = 
 
 g r o u p   =   A p p . A c t i v e D o c u m e n t . a d d O b j e c t ( " A p p : : D o c u m e n t O b j e c t G r o u p " ,   " T O A S T _ A s s e m b l y " ) 
 
 
 
 p a r t s   =   [ 
 
         ( " 1 _ O u t e r _ T u b e " ,   o u t e r _ t u b e ) , 
 
         ( " 2 A _ C o r e _ B a s e " ,   c o r e _ b a s e ) , 
 
         ( " 2 B _ C o r e _ R e a r " ,   c o r e _ r e a r ) , 
 
         ( " 2 C _ C o r e _ F r o n t " ,   c o r e _ f r o n t ) , 
 
         ( " 3 _ T o p _ G r i l l e " ,   t o p _ g r i l l e ) , 
 
         ( " 4 _ P S U _ B r a c k e t " ,   p s u _ b r a c k e t ) , 
 
         ( " 5 _ F r o n t _ G r i l l e " ,   f r o n t _ g r i l l e _ b a s e ) , 
 
         ( " 6 _ L e f t _ P a n e l " ,   l e f t _ p a n e l ) , 
 
         ( " 7 _ R i g h t _ P a n e l " ,   r i g h t _ p a n e l ) 
 
 ] 
 
 
 
 f o r   n a m e ,   s h a p e   i n   p a r t s : 
 
         o b j   =   A p p . A c t i v e D o c u m e n t . a d d O b j e c t ( " P a r t : : F e a t u r e " ,   n a m e ) 
 
         o b j . S h a p e   =   s h a p e 
 
         g r o u p . a d d O b j e c t ( o b j ) 
 
 
 
         #   WN`Ov[EPgr  ( ў, }v, Ğ, )Y݄, Xj, ~)   ۏL2ng
 
         C _ B L A C K     =   ( 0 . 1 5 ,   0 . 1 5 ,   0 . 1 5 ) 
 
         C _ W H I T E     =   ( 0 . 9 ,   0 . 9 ,   0 . 9 5 ) 
 
         C _ Y E L L O W   =   ( 1 . 0 ,   0 . 8 ,   0 . 0 ) 
 
         C _ B L U E       =   ( 0 . 5 3 ,   0 . 8 1 ,   0 . 9 8 ) 
 
         C _ O R A N G E   =   ( 1 . 0 ,   0 . 4 5 ,   0 . 0 ) 
 
         C _ G R E E N     =   ( 0 . 2 ,   0 . 8 ,   0 . 2 ) 
 
         
 
         #   ؞  T H E M E   1   ( )YE~) 
 
         c _ t u b e ,   c _ c o r e ,   c _ g r i l l e _ h o t ,   c _ g r i l l e _ c o l d ,   c _ p a n e l   =   C _ B L U E ,   C _ W H I T E ,   C _ W H I T E ,   C _ O R A N G E ,   C _ W H I T E 
 
         
 
         i f   T H E M E   = =   2 :   #   q+s:g2u  ( ў+ }v) 
 
                 c _ t u b e ,   c _ c o r e ,   c _ g r i l l e _ h o t ,   c _ g r i l l e _ c o l d ,   c _ p a n e l   =   C _ B L A C K ,   C _ W H I T E ,   C _ W H I T E ,   C _ W H I T E ,   C _ B L A C K 
 
         e l i f   T H E M E   = =   3 :   #   'YĞ  ( Ğ+ ў) 
 
                 c _ t u b e ,   c _ c o r e ,   c _ g r i l l e _ h o t ,   c _ g r i l l e _ c o l d ,   c _ p a n e l   =   C _ Y E L L O W ,   C _ B L A C K ,   C _ B L A C K ,   C _ B L A C K ,   C _ B L A C K 
 
         e l i f   T H E M E   = =   4 :   #   \uS  ( ~+ Ğ+ ў) 
 
                 c _ t u b e ,   c _ c o r e ,   c _ g r i l l e _ h o t ,   c _ g r i l l e _ c o l d ,   c _ p a n e l   =   C _ G R E E N ,   C _ B L A C K ,   C _ Y E L L O W ,   C _ Y E L L O W ,   C _ B L A C K 
 
         e l i f   T H E M E   = =   5 :   #   IQWyb  ( }v+ ݄+ Xj) 
 
                 c _ t u b e ,   c _ c o r e ,   c _ g r i l l e _ h o t ,   c _ g r i l l e _ c o l d ,   c _ p a n e l   =   C _ W H I T E ,   C _ B L A C K ,   C _ B L U E ,   C _ O R A N G E ,   C _ W H I T E 
 
                 
 
         i f   g e t a t t r ( o b j ,   " V i e w O b j e c t " ,   N o n e )   i s   n o t   N o n e : 
 
                 i f   n a m e   = =   " 1 _ O u t e r _ T u b e " : 
 
                         o b j . V i e w O b j e c t . S h a p e C o l o r   =   c _ t u b e 
 
                 e l i f   n a m e . s t a r t s w i t h ( " 2 " ) : 
 
                         o b j . V i e w O b j e c t . S h a p e C o l o r   =   c _ c o r e 
 
                 e l i f   n a m e   = =   " 3 _ T o p _ G r i l l e " : 
 
                         o b j . V i e w O b j e c t . S h a p e C o l o r   =   c _ g r i l l e _ h o t 
 
                 e l i f   n a m e   = =   " 4 _ P S U _ B r a c k e t " : 
 
                         o b j . V i e w O b j e c t . S h a p e C o l o r   =   c _ g r i l l e _ c o l d 
 
                 e l i f   n a m e   = =   " 5 _ F r o n t _ G r i l l e " : 
 
                         o b j . V i e w O b j e c t . S h a p e C o l o r   =   c _ g r i l l e _ c o l d 
 
                 e l i f   " P a n e l "   i n   n a m e : 
 
                         o b j . V i e w O b j e c t . S h a p e C o l o r   =   c _ p a n e l 
 
 
 
 
 
 
 
 #   = = = = = = = = = = = = = = =   ,{NR[SOlxNSgq!jW  ( H a r d w a r e   D u m m i e s )   = = = = = = = = = = = = = = = 
 
 #   (uNvhgirtr^mTzz)R(us
 
 d u m m y _ g r o u p   =   d o c . a d d O b j e c t ( " A p p : : D o c u m e n t O b j e c t G r o u p " ,   " H a r d w a r e _ D u m m i e s " ) 
 
 
 
 d e f   a d d _ d u m m y ( n a m e ,   s h a p e ,   c o l o r ) : 
 
         o b j   =   d o c . a d d O b j e c t ( " P a r t : : F e a t u r e " ,   n a m e ) 
 
         o b j . S h a p e   =   s h a p e 
 
         i f   g e t a t t r ( o b j ,   " V i e w O b j e c t " ,   N o n e )   i s   n o t   N o n e : 
 
                 o b j . V i e w O b j e c t . S h a p e C o l o r   =   c o l o r 
 
                 o b j . V i e w O b j e c t . T r a n s p a r e n c y   =   4 0   #   JSfeOwnQ~g
 
         d u m m y _ g r o u p . a d d O b j e c t ( o b j ) 
 
 
 
 #   1 .   ;Ng  P C B   ( m A T X    g'Y:\[  2 4 4   x   1 7 5 ) 
 
 m b _ d u m m y   =   P a r t . m a k e B o x ( 2 4 4 . 0 ,   1 7 5 . 0 ,   2 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( m b _ x ,   m b _ y ,   m b _ z   +   s t a n d o f f _ h e i g h t ) ) 
 
 a d d _ d u m m y ( " D u m m y _ M o t h e r b o a r d " ,   m b _ d u m m y ,   ( 0 . 0 ,   0 . 5 ,   0 . 0 ) ) 
 
 
 
 #   2 .   C P U   cephV  ( `O[{kv  8 0 m m   teؚP C B   `S  2 m m ) 
 
 #   VR_]O;Ng  I / O   :S
 
 c p u _ d u m m y   =   P a r t . m a k e B o x ( 9 5 . 0 ,   9 5 . 0 ,   7 8 . 0 ) . t r a n s l a t e ( A p p . V e c t o r ( m b _ x   +   6 0 . 0 ,   m b _ y   +   4 0 . 0 ,   m b _ z   +   s t a n d o f f _ h e i g h t   +   2 . 0 ) ) 
 
 a d d _ d u m m y ( " D u m m y _ C P U _ C o o l e r " ,   c p u _ d u m m y ,   ( 0 . 7 ,   0 . 7 ,   0 . 7 ) ) 
 
 
 
 #   3 .   A T X   5un  ( SObg`zzvc) 
 
 p s u _ d u m m y   =   P a r t . m a k e B o x ( p s u _ d i m _ x ,   p s u _ d i m _ y ,   p s u _ d i m _ z ) . t r a n s l a t e ( A p p . V e c t o r ( p s u _ x ,   p s u _ y ,   p s u _ z ) ) 
 
 a d d _ d u m m y ( " D u m m y _ A T X _ P S U " ,   p s u _ d u m m y ,   ( 0 . 1 ,   0 . 1 ,   0 . 1 ) ) 
 
 
 
 #   4 .   2 . 5 [  S S D   ( SvMO4MRbgQO) 
 
 s s d _ d u m m y _ 1   =   P a r t . m a k e B o x ( s s d _ d i m _ x ,   s s d _ d i m _ y ,   s s d _ d i m _ z ) . t r a n s l a t e ( A p p . V e c t o r ( s s d _ c e n t e r _ x   -   5 0 . 0 ,   s s d _ c e n t e r _ y   -   3 . 5 ,   9 8 . 0 ) ) 
 
 a d d _ d u m m y ( " D u m m y _ S S D _ 2 _ 5 _ S i n g l e " ,   s s d _ d u m m y _ 1 ,   ( 0 . 8 ,   0 . 8 ,   0 . 8 ) ) 
 
 
 
 #   ( ]ydrz>faS:NOg5un~Q  9 8 m m   Qzz:SWOQaS/ ǑƖaSI{O(u) 
 
 
 
 #   6 .   Yc_dv萌T^  1 2 0 m m   'YΘGb  ( vcc(W:g{Y) 
 
 #   ^ΘGb]	cBlyd
 
 
 
 #   vΘGb]	cBlyd
 
 
 
 d o c . r e c o m p u t e ( ) 
 
 p r i n t ( " 0|~8h_0T O A S T   !jWWSň2u:g{  ( lxNc^hKmHr)   ]g^[k" ) 
 
 p r i n t ( " 0RGrc:y0\  1 _ O u t e r _ T u b e   ~  Y   tel  9 0   ^s^sSS[>eeQ  2 5 6 x 2 5 6   p^ۏLe/edSbpS" ) 
 
 
 
 #   = = = = = = = = = = = = = = = = =   ꁨRSr^mN:\[!h  = = = = = = = = = = = = = = = = = 
 
 d e f   o v e r l a p _ v o l u m e ( a ,   b ) : 
 
         t r y : 
 
                 r e t u r n   a . c o m m o n ( b ) . V o l u m e 
 
         e x c e p t   E x c e p t i o n : 
 
                 r e t u r n   - 1 . 0 
 
 
 
 P R I N T _ L I M I T   =   2 5 6 . 0 
 
 e r r o r s   =   [ ] 
 
 
 
 #   :\[hKm
 
 f o r   o b j   i n   [ o u t e r _ t u b e ,   c o r e _ b a s e ,   c o r e _ r e a r ,   c o r e _ f r o n t ,   t o p _ g r i l l e ,   f r o n t _ g r i l l e _ b a s e ,   l e f t _ p a n e l ,   r i g h t _ p a n e l ] : 
 
         b b   =   o b j . B o u n d B o x 
 
         d i m s   =   s o r t e d ( ( b b . X L e n g t h ,   b b . Y L e n g t h ,   b b . Z L e n g t h ) ,   r e v e r s e = T r u e ) 
 
         i f   d i m s [ 0 ]   >   P R I N T _ L I M I T   +   1 e - 6 : 
 
                 e r r o r s . a p p e n d ( " NQSbpS:ggP  2 5 6 m m :    g'Y  % . 1 f   m m "   %   d i m s [ 0 ] ) 
 
 
 
 #   r^mhKm
 
 f o r   l a b e l ,   a ,   b   i n   ( ( " P S U / C P U " ,   p s u _ d u m m y ,   c p u _ d u m m y ) ,   ( " P S U / M o t h e r b o a r d " ,   p s u _ d u m m y ,   m b _ d u m m y ) , 
 
                                         ( " S S D / M o t h e r b o a r d " ,   s s d _ d u m m y _ 1 ,   m b _ d u m m y ) ) : 
 
         v   =   o v e r l a p _ v o l u m e ( a ,   b ) 
 
         i f   v   >   0 . 0 1 : 
 
                 e r r o r s . a p p e n d ( " hKm0R%N͑vlxNirtxdr^m  [ % s ] :   % . 1 f   m m ^ 3 "   %   ( l a b e l ,   v ) ) 
 
 
 
 i f   2 5 0   -   m b _ z   <   8 0 . 0 : 
 
         e r r o r s . a p p e n d ( " ;Ng1ؚ^
Nel[~  8 0 m m   v  C P U   cephV" ) 
 
 
 
 i f   e r r o r s : 
 
         p r i n t ( " \ n [ V A L I D A T I O N   F A I L E D ]   *gǏ" ) 
 
         f o r   e r r   i n   e r r o r s : 
 
                 p r i n t ( "   L'  "   +   e r r ) 
 
 e l s e : 
 
         p r i n t ( " \ n [ V A L I D A T I O N   P A S S E D ]   '  hQꁨRirthKmǏTlxNxd@b	gN[|Q[  P 1 S 0" ) 
 
 
 
 
 
 
 
 