delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/10/16/10:29:38

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:from:date:message-id:subject:to;
bh=lZzAaCsYThFG6yO0Lu68L88FdgKji6+knsK6x1UxqUU=;
b=QGAZx/6NqaXHUZSJVT7UhTuvZ0KHppFSHFeVqDcoZe/uoTHRYycYJ8mWA/lGKS43z2
Q6CUkatGHxFgGoTOoUAcc5fO3Vv7HlB1ypRwCXO2g3mxmGI39f5J7R0QUeuGuIZnVTFv
qw+NgGjfTLgoHA/laMF1XBCwTPflEzgeYDhX0jPGPD0cghN0KtNKYM3oiO1yqDVdAC7s
AsK4h0GaqHI81j+AbHDXzdvgljkGJ03jQlqtJjqG2vXpGyn4ly+t53uneDybdH0+3HjA
olh2O8OZSwXeBLrb0rZSMXnOS+ft0sg2tUsRjofU9sBSU3TxlihNiZ+dWPhYomCj69P/
DPVg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
bh=lZzAaCsYThFG6yO0Lu68L88FdgKji6+knsK6x1UxqUU=;
b=S6wAi/l5UHzuoiGDMqbqKsfA3CsY07oBZMpY53oOKM58Za4BRKcJlDbHcNp+laNLfh
UHtOxtwFJzU/jV4ZjKVUSws9FtEK3/qQhE9mc95wEH2bLD96U+k03bShgvCeEIfoRJVh
5D2h6BE83GzIUyarJV3NNiIxwIGSWC//XDwZsMi16+XUehCktpYMpQ9t13oOaGWdgdOJ
Y/8KQ4r7EV/CxfsguE5721UoDW/VDtwy1u2oPTiI9Gd71I6IqIL51uAbsgx+cuL8I/QC
mDoSGjdAt3ZYl6Hg23/WEiQI0ScWL7BFNxXuOrhgha3Zi9Zx+Nj/zukgQ/LczfNvjTho
C05g==
X-Gm-Message-State: AA6/9Rn8m6Fzq4tmYMdQafm90jVpKAnE5L/X8oq2zfe0Ke1bZ4wA6NGMhKBRdLQi6EKMaIXTm/6g6fJhhGtsIw==
X-Received: by 10.202.194.68 with SMTP id s65mr13952939oif.98.1476628007011;
Sun, 16 Oct 2016 07:26:47 -0700 (PDT)
MIME-Version: 1.0
From: "Erich Heinzle (a1039181 AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
Date: Mon, 17 Oct 2016 00:56:46 +1030
Message-ID: <CAHUm0tMw2Zzvq-X=xjhugpkmR5F9gEYRRuzqcSQ=0mxC=9Dthw@mail.gmail.com>
Subject: [geda-user] [pcb-rnd] Layout and footprint export to Kicad now working
To: geda-user <geda-user AT delorie DOT com>
Reply-To: geda-user AT delorie DOT com

The modularised code in Igor2's pcb-rnd fork has allowed me to
implement an export plugin that can export:

- PCB footprint(s) as a "kicad pcbnew" legacy format module library (.mod)
- PCB layouts as "kicad pcbnew" layouts (.brd), which include embedded
footprint elements

The ability to export to kicad legacy format is now part of the
standard pcb-rnd build.

Kicad does not support arcs on copper. These are therefore exported as
a straight line from the arc start point to the arc end point.

The geometry is however fully preserved for pins (round and square),
vias, rectangular pads and tracks on copper layers.

Arcs, circles and lines are fully supported by kicad on silk layers,
and the geometry is fully preserved during export.

Text is exported, with the only caveat being slight differences in
text geometry (size primarily) during rendering with the Hershey sans
stroke font by kicad's pcbnew.

Netlists are exported as well, along with connection information for
pins/pads/vias.

Polygon export has been implemented for the simplest silk and copper
layer cases, where there are no apertures in the polygon.

Polygons are exported as a "zone outline", which the kicad user has
the option to fill or edit in the pcbnew editor

Kicad's use of polygonal zones is slightly different to geda's use of
polygons, in that zones define via clearance and thermal behaviour
within their boundaries, whereas geda PCB / pcb-rnd defines this on a
per pin/via/pad basis, preventing a simple 1:1 mapping during export.
Also, kicad attaches a netlist to polygonal zones, whereas polygons
behave electrically more like tracks in geda pcb/pcb-rnd. The exporter
attaches the default zero netnumber to exported polygons, indicating
that they remain unconnected, leaving it to the kicad user to finalise
the network. The netlist issue for polygons does not matter for
silkscreen artwork, however.

Apertures within exported polygons will be implemented next.

Here is an example screenshot showing a side by side comparison of an
exported design.

http://imgur.com/a/t5i3e

The exporting can even be done headless, with the CLI, i.e.

echo 'SaveTo(LayoutAs, "exportedkicad.brd", "kicadl")' | ./pcb-rnd
--gui batch phys311v101.pcb

which does raise the interesting possibility of the kicad team making
pcb-rnd an optional build requirement to allow importation of PCB
layouts.

As an interesting aside, some of the footprints used in the depicted
layout were originally ported from kicad libraries with the
translate2geda utility, so that they have now gone full circle...

With kicad legacy exporting close to complete, the next low hanging
fruit to be tackled is kicad s-expression file format export. This is
the current file format used by kicad, which is more feature rich.

Support for legacy and s-expression kicad file importing into pcb-rnd
is planned after that.

Cheers,

Erich.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019