[Position] Fixed problems with repeated references

- Happens when doing manual panelization

Closes #224
This commit is contained in:
Salvador E. Tropea 2022-07-14 18:11:56 -03:00
parent d52fd87076
commit c4b1d6b8ad
4 changed files with 9 additions and 2 deletions

View File

@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- OAR computation (Report) (#225)
- Position: Problems when doing manual panelization (repeated references) (#224)
## [1.2.0] - 2022-06-15

View File

@ -3752,6 +3752,8 @@ Additionally we support:
- `Footprint Y-Size`
- `Footprint Populate`
Important: These files doesn't support manual panelization with repeated reference names, you'll get the coordinates for just one component because this is a BoM.
## Credits
- **KiBot project**: Salvador E. Tropea (@set-soft)

View File

@ -1718,6 +1718,8 @@ Additionally we support:
- `Footprint Y-Size`
- `Footprint Populate`
Important: These files doesn't support manual panelization with repeated reference names, you'll get the coordinates for just one component because this is a BoM.
## Credits
- **KiBot project**: Salvador E. Tropea (@set-soft)

View File

@ -255,8 +255,10 @@ class PositionOptions(VariantOptions):
footprint = c.footprint
is_bottom = c.bottom
rotation = c.footprint_rot
center_x = c.footprint_x
center_y = c.footprint_y
# Here we can't use c.footprint_x/y because this doesn't work for panels
center = GS.get_center(m)
center_x = center.x
center_y = center.y
if value is None:
value = m.GetValue()
footprint = str(m.GetFPID().GetLibItemName()) # pcbnew.UTF8 type