#NEWLINE# def create_meandering_path( params ) : #NEWLINE# #INDENT# '\n    Returns a meander path based on input parameters\n    ' #NEWLINE# deg_to_rad = ( ( 2 * pi ) / 360 ) #NEWLINE# radius = params . get ( 'radius' ) #NEWLINE# theta = params . get ( 'theta' ) #NEWLINE# width = params . get ( 'trace-width' ) #NEWLINE# number = ( params . get ( 'bus-width' ) or 1 ) #NEWLINE# pitch = ( params . get ( 'pitch' ) or 0 ) #NEWLINE# coords = [ ] #NEWLINE# coords . append ( Point ( 0 , ( ( ( - ( number - 1 ) ) * pitch ) / 2 ) ) ) #NEWLINE# for n in range ( 1 , int ( number ) ) : #NEWLINE# #INDENT# coords . append ( Point ( ( ( 2 * radius ) * cos ( ( theta * deg_to_rad ) ) ) , pitch ) ) #NEWLINE# #UNINDENT# path = '' #NEWLINE# for coord in params : #NEWLINE# #INDENT# path += create_round_meander ( radius , theta , coord ) #NEWLINE# #UNINDENT# spacing = ( radius - ( radius * cos ( ( theta * deg_to_rad ) ) ) ) #NEWLINE# return ( path , spacing )