Closed Arxi closed 7 months ago
Also, I'm not sure if this is relevant, but I noticed that when I run DRC in the resulting PCB TOP.kicad_pcb
, I get many Edge.Cuts errors which weren't present in the original multiboard cutouts.kicad_pcb
.
Seems like the original arcs are replaced with small polygon segments, some of which have 0nm length, and that causes the errors.
Is this because of the --looseArcs
parameter? I can't drop the parameter as the cutouts then get weird shapes (which is because of issue 453 I guess)
To give you context:
KiKit internally works by reconstructing 2D polygons from the edge cuts. The edge cuts are lost, we perform all penalization on polygons. This approach allows us to construct tabs, simulate milling, and other operations. Just before the panel is saved we render the polygon back into Edge.cuts.
We use Shapely on the background to handle polygons. This is the reason why we lose arcs (there are plans to switch to a different geometry engine that could handle arcs). The option reconstructArcs
tries to restore the arcs in the polygons, but it doesn't work well, so it is not recommended for usage.
The separate command is simply implemented as "create a panel 1x1 with no extra features" as we don't have to reimplement any selection logic.
Regarding this issue:
Thank you for all the context and explanations! I see.
I think the ability to specify unified line width in the final separated file would be enough. I agree that having multiple line widths doesn't seem to be necessary.
As for the DRC error - it seems there's always only one such error for each polygon / shape, which suggests Kicad is fine with most of the short-line segments, but there's one "0nm" segment for each shape which fails the DRC. At least that's what Kicad says.
Curiously enough, when I tried the kikit fab jlcpcb --no-drc TOP.kicad_pcb production/
the shapes of the cutouts in the produced gerber files seem fine, when I look at them in Kicad's gerbview. But when I upload them to JLCPCB, their system fails to recognize the board edges (I see nothing in their preview and the board dimensions are auto-calculated incorrectly).
EDIT: I split this into a separate issue: https://github.com/yaqwsx/KiKit/issues/645
As the switch to a new geometry engine will take some time, I tried to fix the current arc welder in 18b590e. The upstream version should fix your issue.
@yaqwsx I'm trying this out, but I'm not sure which issue you mean - I see that now I can drop the --looseArcs
parameter and the polygons are reconstructed correctly (which is nice, thank you!), but the line width is still re-set to the default 0.1mm.
Nevertheless, after this discussion, I don't see the line width as an important issue.
The option for specifying the Edge.Cuts
width was added in a0c1e44.
Prerequisites
KiKit version
1.4.0+46.g5445c99
KiCAD version
8.0.0
Operating system
MacOS Sonoma 14.1.2
Description
After a board is separated from multiboard design using
kikit separate
, the line widths of lines and arcs (and probably other shapes) on Edge.Cuts layer are reset from their original values in multiboard file to 0.1mm. Different PCB manufacturers specify different line widths for board outline and cutouts, for example PCBWay:or JLCPCB:
Line width of shapes on Edge.Cuts should thus be preserved, as it might be important for certain PCB manufacturers.
Steps to Reproduce
kikit separate --looseArcs --source 'annotation; ref: TOP' cutouts.kicad_pcb TOP.kicad_pcb