#NEWLINE# def internal_silk( conf ) : #NEWLINE# #INDENT# '\n    Generate an internal silkscreen, with an outline of the part and a pin1\n    indicator.\n    ' #NEWLINE# out = [ ] #NEWLINE# pins = conf [ 'pins' ] #NEWLINE# rows = conf [ 'rows' ] #NEWLINE# pin_pitch = conf [ 'pin_pitch' ] #NEWLINE# row_pitch = conf [ 'row_pitch' ] #NEWLINE# pad_shape = conf [ 'pad_shape' ] #NEWLINE# width = ( ( ir - pad_shape [ 0 ] ) - ( 2 * silk_pad_igap ) ) #NEWLINE# if ( rows == 2 ) : #NEWLINE# #INDENT# height = ( ( ( pins / rows ) - 1 ) * pin_pitch ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( rows == 4 ) : #NEWLINE# #INDENT# height = width #NEWLINE# #UNINDENT# #UNINDENT# ir = silk_pin1_ir #NEWLINE# if ( ir > width ) : #NEWLINE# #INDENT# ir = width #NEWLINE# #UNINDENT# c = ( 0 , 0 ) #NEWLINE# layer = 'F.SilkS' #NEWLINE# ( nw , ne , se , sw , sq ) = draw_square ( width , height , c , layer , silk_width ) #NEWLINE# out . append ( fp_line ( ( ( nw [ 0 ] + ir ) , nw [ 1 ] ) , ne , layer , silk_width ) ) #NEWLINE# out . append ( fp_line ( ne , se , layer , silk_width ) ) #NEWLINE# out . append ( fp_line ( se , sw , layer , silk_width ) ) #NEWLINE# out . append ( fp_line ( sw , ( nw [ 0 ] , ( nw [ 1 ] + ir ) ) , layer , silk_width ) ) #NEWLINE# start = ( nw [ 0 ] , ( nw [ 1 ] + ir ) ) #NEWLINE# end = ( ( nw [ 0 ] + ir ) , nw [ 1 ] ) #NEWLINE# out . append ( fp_line ( start , end , 'F.SilkS' , silk_width ) ) #NEWLINE# return out