diff --git a/metadata.json b/metadata.json index c6dd490..53828cc 100644 --- a/metadata.json +++ b/metadata.json @@ -29,7 +29,7 @@ ], "versions": [ { - "version": "0.3.1", + "version": "0.3.2", "status": "testing", "kicad_version": "6.00" } diff --git a/plugins/thread.py b/plugins/thread.py index 79686f6..3643000 100644 --- a/plugins/thread.py +++ b/plugins/thread.py @@ -127,7 +127,7 @@ def run(self): footprint_designators[footprint.GetReference()] -= 1 components.append({ - 'Designator': "{}_{}".format(footprint.GetReference(), unique_id), + 'Designator': "{}{}{}".format(footprint.GetReference(), "" if unique_id == "" else "_", unique_id), 'Mid X': (footprint.GetPosition()[0] - board.GetDesignSettings().GetAuxOrigin()[0]) / 1000000.0, 'Mid Y': (footprint.GetPosition()[1] - board.GetDesignSettings().GetAuxOrigin()[1]) * -1.0 / 1000000.0, 'Rotation': footprint.GetOrientation() / 10.0, @@ -144,7 +144,7 @@ def run(self): # todo: merge similar parts into single entry bom.append({ - 'Designator': "{}_{}".format(footprint.GetReference(), unique_id), + 'Designator': "{}{}{}".format(footprint.GetReference(), "" if unique_id == "" else "_", unique_id), 'Footprint': footprint_name, 'Quantity': 1, 'Value': footprint.GetValue(),