Commits

saar drimer  committed 1d58448

added refdef and pad_placement markers for pad groups

  • Participants
  • Parent commits 1efdf12

Comments (0)

Files changed (1)

File utils/board.py

 
 
 
-    def import_footprint(footprint, transform):
+    def import_footprint(footprint, transform, refdef=None):
         """
         Adds a footprint to the board
         """
                     board_layer = board_layer.find(".//g[@inkscape:label='%s']" % layer, namespaces=cfg['namespace'])
                 et.strip_attributes(footprint_layer, '{'+cfg['namespace']['inkscape']+'}label')
                 et.strip_attributes(footprint_layer, '{'+cfg['namespace']['inkscape']+'}groupmode')
+                if refdef is not None:
+                    footprint_layer.set('refdef', refdef)
+                    footprint_layer.set('type', 'pad_placement')
+
                 # set transform
                 footprint_layer.set('transform', transform)
                 board_layer.append(footprint_layer)
         translate = str(round(location.x, sig_dig))+' '+str(round(-location.y, sig_dig))
         transform = 'translate('+translate+')'
 
-        import_footprint(footprint_instance, transform)
+        import_footprint(footprint_instance, transform, component_refdef)
 
         return fp_drill_count