Commits

saar drimer  committed 55c7ec1

fixed polarity issue

  • Participants
  • Parent commits da2f5d1

Comments (0)

Files changed (1)

File utils/gerber.py

      
             if path_type == 'mask_shape':
                 gerber_lp = "%s" % ('c' * len(coords))
-            else:
+            #else:
                 # when stroking, all paths need to be dark, except for masks
                 if style == 'stroke':
                     gerber_lp = "d%s" % ('d' * len(gerber_lp))
                     # add -1 on all values
                     for i in range(0, len(order)):
                         order[i] = int(order[i]) - 1
-                    print len(coords)
-                    print polarity_sequence
-                    print order
 
                 else:
                     polarity_sequence = gerber_lp
                                                                 decimals)))
 
                 commands[j] = {}
-
                 commands[j][polarity] = to_write
 
                 j += 1
-
                     
             return commands
      
                     else:
                         bezier_steps = 100
                         segment_length = 0.05
-     
+                        
+
+                    # get a list of coordinates of path after it has been linearised            
                     coords = svg.relative_svg_path_to_absolute_coord_list(d, 
                                                                           bezier_steps, 
                                                                           segment_length)
 
                 to_write = {}
 
-                for i in range(0, max_number_of_segments):
+                for i in range(0, max_number_of_segments+10):
                     for polarity in ['D', 'C']:
                         polarity_data = []
                         for shape in layer_commands:
                                     gerber.write(line)                             
 
 
+        # write out tiny flashes on top of pads for netlist generation
+        # by fab's CAM software
         if flashes != [] and cfg['board']['no_flashes'] is False:
             gerber.write("G04 flashes*\n")
             if current_polarity == 'C':