Commits

saar drimer committed bfc8920

process circular shapes in additional shapes process

Comments (0)

Files changed (1)

         for shape in soldermask_shapes:
             shape_type = shape.get('type')
 
-            # for 'rect' first conver to path
+            # for 'rect' first convert to path
             if shape_type in ['rect', 'rectangle']:
                shape['value'] = svg.rect_to_path(shape)
                shape['type'] = 'path'
                shape_type = 'path'
 
+            # for 'circle' first convert to path
+            if shape_type in ['circ', 'circle', 'round']:
+               shape['value'] = svg.circle_diameter_to_path(shape['diameter'])
+               shape['type'] = 'path'
+               shape_type = 'path'
+
             if shape_type.lower() == 'path':
                 place.place_path_shape(cfg, shape, sheet, 'soldermask', mirror)
             elif shape_type.lower() == 'text':
         for shape in silkscreen_shapes:
             shape_type = shape.get('type')
 
-            # for 'rect' first conver to path
+            # for 'rect' first convert to path
             if shape_type in ['rect', 'rectangle']:
                shape['value'] = svg.rect_to_path(shape)
                shape['type'] = 'path'
                shape_type = 'path'
 
+            # for 'circle' first convert to path
+            if shape_type in ['circ', 'circle', 'round']:
+               shape['value'] = svg.circle_diameter_to_path(shape['diameter'])
+               shape['type'] = 'path'
+               shape_type = 'path'
+
             if shape_type.lower() == 'path':
                 place.place_path_shape(cfg, shape, sheet, 'silkscreen', mirror)
             elif shape_type.lower() == 'text':
         for shape in copper_shapes:
             shape_type = shape.get('type')
 
-            # for 'rect' first conver to path
+            # for 'rect' first convert to path
             if shape_type in ['rect', 'rectangle']:
                shape['value'] = svg.rect_to_path(shape)
                shape['type'] = 'path'
                shape_type = 'path'
 
+            # for 'circle' first convert to path
+            if shape_type in ['circ', 'circle', 'round']:
+               shape['value'] = svg.circle_diameter_to_path(shape['diameter'])
+               shape['type'] = 'path'
+               shape_type = 'path'
+
             if shape_type.lower() == 'path':
                 place.place_path_shape(cfg, shape, sheet, 'copper', mirror)
             elif shape_type.lower() == 'text':