-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some tabs do not generate with custom layout #766
Comments
I just took your code and ran it - the partition line definitely doesn't look correct: This is the reason why the tabs are not generated. I haven't been able to find the problem in the partition line generator so far. As a temporary workaround, I suggest building the partition line in the script manually. It should be straightforward for your layout. |
Ah nevermind, I got it working now (when I ran |
I do have some more input on this issue. When there is a continuous gap from left to right or top to bottom the generation of the partition line seems to be working just fine. When aligning multiple boards with different dimensions the generation of the partition line seems to work only on 2 of 4 sides (see board 4 and 5). When I move board 4 downwards to align with the bottom height of board 3 the tabs between board 4 and 5 are generated but the tabs between 2 and 4 are missing. If my project files are required please let me know, as it will be some work to anonymize the boards and isolated the panel generation script from my build pipeline. But if it helps I will gladly provide the files! @JasperZP How did you manage to manually build the partition lines? Edit: |
I made a layout plugin which defines the layout and the partition lines (just hardcoded though, here's a summary): class LegacySGNPanelLayout(LayoutPlugin):
def buildLayout(
self, panel: Panel, inputFile: str, sourceArea: pcbnew.BOX2I
) -> Iterable[Substrate]:
"""
This function is supposed to build the layout (append the boards to the
panel) and return an iterable of substrates of these boards.
"""
...
return panel.substrates
def buildPartitionLine(
self, panel: Panel, framingSubstrates: Iterable[Substrate]
) -> None:
"""
This function should build the partition line in the panel. It gets an
iterable of extra substrates that represent soon-to-be frame of the
panel.
"""
lines = []
lines.append(LineString(coordinates))
substrate.partitionLine = shapely.ops.linemerge(lines)
panel.debugRenderPartitionLines() |
Prerequisites
KiKit version
kikit, version 0+unknown
(installed extra/python-kikit 1.6.0-2 on archlinux)KiCAD version
8.0.6
Operating system
Archlinux, 6.11.7
Description
Some tabs do not generate with custom layout.

I wrote a simple layout plugin that offsets alternating rows by 1.6mm, and rotates the first row by 180deg which looks like this:
However, it does not generate all tabs as specified by the KiKit:tab footprint, especially those on the right side of the board:

If I use the same layout plugin but remove the horizontal offset, the tabs do generate correctly.
The partition lines and bouding boxes all seem to be correct.
Steps to Reproduce
kikit panelize -p kikit_config.json main_bare.kicad_pcb panel.kicad_pcb
The text was updated successfully, but these errors were encountered: