The current approach to assigning GerberSockets to a module based on the (X, Y) position of the module is bad.
Currently the backend does GerberSocket assignment in this order
- All modules are transformed and positioned using Gerbonara
- Backend merges all
GerberSockets.gbr files from each module
- From this merged
GerberSockets.gbr, it extracts all GerberSockets
- Attempts to assign sockets to a module based on
(X, Y) and the module centre
Instead, Sockets should be immiediately assigned to a Module.
- Extract sockets for each module, immediately assigning them to a Module object
- Transform the Module object, and then merge, etc.
This way we would avoid "guessing" that a particular GerberSocket belongs to a particular Module. This would also allow us to have sockets that are not necessarily aligned on the X-axis or Y-axis.
The current approach to assigning GerberSockets to a module based on the
(X, Y)position of the module is bad.Currently the backend does GerberSocket assignment in this order
GerberSockets.gbrfiles from each moduleGerberSockets.gbr, it extracts all GerberSockets(X, Y)and the module centreInstead, Sockets should be immiediately assigned to a Module.
This way we would avoid "guessing" that a particular GerberSocket belongs to a particular Module. This would also allow us to have sockets that are not necessarily aligned on the X-axis or Y-axis.