Closed palandri closed 1 year ago
Hi @palandri !
I'm not the pcbdraw author, but contributed various patches. When looking at the code you see it wasn't optimized for speed, but for maintainability. It does the same heavy tasks over and over, discarding what was generated in the previous passes.
For small PCBs is fast, but it becomes really slow when the complexity grows.
I recommend you using the render_3d
output.
I tried the following config:
kibot:
version: 1
outputs:
- name: "base"
type: render_3d
run_by_default: false
options:
width: 1000
height: 1500
transparent_background: true
auto_crop: true
zoom: 4
# The following needs the schematic
# show_components: none
- name: "top"
type: render_3d
extends: "base"
- name: "bottom"
type: render_3d
extends: "top"
options:
view: "bottom"
In around 6 minutes I got:
And
BTW: On my system PcbDraw failed after 40 minutes. The error seems to be from Python itself.
Thank you for your reply, @set-soft!
I'll integrate your suggestion in our CI, thanks for your support and amazing software!
Hi @palandri !
I revisited this issue, I was able to plot your 10x9 panel using KiBot 1.6.5. It was sloooowwww (14 minutes), but it worked.
I then optimized some stuff on PcbDraw and reduced the time to 2.5 minutes (only 1m 48" for the plot), here is a PNG generated from the SVG (the SVG is a 25 MB file):
So now PcbDraw output is much faster and reliable. Note that the problem here is triggered by the panelization. The slow process in PcbDraw is extracting the PCB contour, much more complex in a panel than in any kind of PCB.
Hey @set-soft.
Wow, amazing work! Plot being slow is not a problem, at least for us, because it is only generated as part of the documentation process, which is triggered only in major releases.
I was not able to test it already, but looking at the image you posted, looks like there is some tabs which is incorrect, highlighted below.
I don't know if it is a configuration problem, or something changed in software, but it does not matter. I'm just pointing it because I noticed it.
Again, amazing work.
Hi @palandri !
This might be related to some of the parameters. The difference is in KiKit, PcbDraw won't "move" the contour, which looks valid. Here is the same artifact in a 2x2 panel:
Here is the same reducing the millradius to 0.9 mm:
Yeah, I agree with you. No problems, just wanted to point it to you.
What do you want to achieve? I was trying to render with
pcbdraw
a panel generated bypanelize
, and depending on the size/complexity of the panel, raised the following error:ERROR:PcbDraw error: internal error: Huge input lookup, line 397862, column 23 (<string>, line 397862) (kibot - out_pcbdraw.py:498)
I don't know if this is just my inability, or is a bug. I can generate the preview of the panel with a grid of 6x6, but not more than that. Also, even with a 6x6 grid, pcbdraw takes a lot of time (around 10 minutes).
Do you have some PCB/Schematic to use as example? In here there is the single pcb file, and panel generated.
Do you have some configuration file (.kibot.yaml) that you are using? Relevant yaml section
Environment (please complete the following information): Where are you running KiBot:
GitHub
/GitLab
) Nov1
,v1_k6
,v2
,v2_d
,v2_dk6
,v2_k6
) Nokicad_auto:ki6
,kicad_auto:latest
,kicad_auto:dev
,kicad_auto:dev_k6
, a custom one? can you provide theDockerfile
) Originally yes, tried with kicad_auto:dev_k6 and kicad_auto:latestAdditional context Add any other context about your setup/project.