Mail Archives: geda-user/2016/01/10/17:13:30
--001a11369ad69f5a4e0529022075
Content-Type: text/plain; charset=UTF-8
Hi Milan,
I am quite excited by the prospect of this patch simpler import/export
function, and see particular merit in enabling import/export of existing
formats, such as Kicad PCB + footprint files.
Gerber import is also something I've always found to be an interesting
idea, even if we acknowledge that things like pads, etc.. may need to be
converted to polygons or other non-grouped objects.
DJ and I have been discussing the existing file-format, and I currently
have a plan regarding that. In the short term, I'd like to keep our
existing model, adding some additional entities for modelling the actual
board stack-up. (A rehash of the recent layer type tagging, but into a more
physically based model).
By adding framework for supporting multiple formats, it may help in
allowing us to re-factor the old importer / exporter, to drop support for
PCB's older formats (moving them to separate modules), thus reducing
maintenance burden on the current parser.
Perhaps we can go over this patch in detail at the scheduled code-sprint at
the beginning of February?
Kind regards,
Peter
On 10 January 2016 at 21:58, Peter Clifton <petercjclifton AT googlemail DOT com>
wrote:
> Hi Milan,
>
> That is a surprisingly small patch!
>
> Did you have some of your example format readers / writers to share too?
>
>
> Peter
>
> On 10 January 2016 at 21:23, Milan Prochac (milan AT prochac DOT sk) [via
> geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wrote:
>
>> After reading long discussions about the new PCB file format I tried to
>> implement support for multiple file formats.
>>
>> You can download it here:
>> http://static.bastl.sk/pcb/Modular-file-formats.gz It is also available
>> on launchpad: https://bugs.launchpad.net/pcb/+bug/1532611
>>
>> The patch implements modular system to support multiple PCB file formats.
>> Attached is also the template of the file-format plugin with instructions.
>>
>> The patch is not too big, but it touches various parts of PCB, so it is
>> possible that some corner cases are not handled properly. Comments and bug
>> reports are welcome.
>>
>> The modular system utilizes existing plugin system; new type of plugin is
>> added to support various file formats. This approach allows implementation
>> of additional file formats as independent shared library with minimal
>> effort. The whole implementation of new file format is reduced to
>> serialization and de-serialization of PCBType data structure, no PCB
>> tweaking is necessary. The template with instructions is provided, as
>> mentioned above.
>>
>> - modular system is available for all layout operations (Load, Save, Save
>> As, Load to buffer, Revert, auto-backup); the element operations will be
>> added later.
>> - action "SaveTo(LayoutAs..." was extended by 3rd argument, specifying
>> file format; if omitted, current (or default) format is used
>> - GUI (GTK only at the moment) was adjusted to allow select file format;
>> for "save" operations it specifies desired format, for "open" operations it
>> is used as filter
>> - file format is detected automatically by modular framework
>> - the versioning system (based on PCB file version #defines) is available
>> - each plugin should confirm it's capability to save data of required
>> version (like 20110603); if not, the file format cannot be used
>> - load-only and save-only formats are supported. If save-only format is
>> used, the layout is not marked as "saved".
>> - the current PCB format is converted to built-in plugin.
>>
>> With this enhancement it should be very easy to implement new file
>> formats. If more of them will be available, the most successful can become
>> new standard PCB format and - hopefully - the data model modifications
>> will be not blocked by hard-to-extend file format anymore...
>>
>> Regards
>> Milan
>>
>
>
--001a11369ad69f5a4e0529022075
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div><div><div><div><div><div><div>Hi Milan,<br><br>I am q=
uite excited by the prospect of this patch simpler import/export function, =
and see particular merit in enabling import/export of existing formats, suc=
h as Kicad PCB + footprint files.<br><br>Gerber import is also something I&=
#39;ve always found to be an interesting idea, even if we acknowledge that =
things like pads, etc.. may need to be converted to polygons or other non-g=
rouped objects.<br><br></div>DJ and I have been discussing the existing fil=
e-format, and I currently have a plan regarding that. In the short term, I&=
#39;d like to keep our existing model, adding some additional entities for =
modelling the actual board stack-up. (A rehash of the recent layer type tag=
ging, but into a more physically based model).<br><br></div>By adding frame=
work for supporting multiple formats, it may help in allowing us to re-fact=
or the old importer / exporter, to drop support for PCB's older formats=
(moving them to separate modules), thus reducing maintenance burden on the=
current parser.<br></div><br></div><br></div>Perhaps we can go over this p=
atch in detail at the scheduled code-sprint at the beginning of February?<b=
r><br></div>Kind regards,<br><br></div>Peter<br><div><div><div><div><br></d=
iv></div></div></div></div><div class=3D"gmail_extra"><br><div class=3D"gma=
il_quote">On 10 January 2016 at 21:58, Peter Clifton <span dir=3D"ltr"><=
<a href=3D"mailto:petercjclifton AT googlemail DOT com" target=3D"_blank">petercjc=
lifton AT googlemail DOT com</a>></span> wrote:<br><blockquote class=3D"gmail_q=
uote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1e=
x"><div dir=3D"ltr"><div><div><div>Hi Milan,<br><br></div>That is a surpris=
ingly small patch!<br><br></div>Did you have some of your example format re=
aders / writers to share too?<span class=3D"HOEnZb"><font color=3D"#888888"=
><br><br><br></font></span></div><span class=3D"HOEnZb"><font color=3D"#888=
888">Peter<br></font></span></div><div class=3D"HOEnZb"><div class=3D"h5"><=
div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On 10 January 2016=
at 21:23, Milan Prochac (<a href=3D"mailto:milan AT prochac DOT sk" target=3D"_bl=
ank">milan AT prochac DOT sk</a>) [via <a href=3D"mailto:geda-user AT delorie DOT com" ta=
rget=3D"_blank">geda-user AT delorie DOT com</a>] <span dir=3D"ltr"><<a href=3D=
"mailto:geda-user AT delorie DOT com" target=3D"_blank">geda-user AT delorie DOT com</a>&=
gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex">After reading long disc=
ussions about the new PCB file format I tried to implement support for mult=
iple file=C2=A0 formats.<br>
<br>
You can download it here: <a href=3D"http://static.bastl.sk/pcb/Modular-fil=
e-formats.gz" rel=3D"noreferrer" target=3D"_blank">http://static.bastl.sk/p=
cb/Modular-file-formats.gz</a> It is also available on launchpad: <a href=
=3D"https://bugs.launchpad.net/pcb/+bug/1532611" rel=3D"noreferrer" target=
=3D"_blank">https://bugs.launchpad.net/pcb/+bug/1532611</a><br>
<br>
The patch implements modular system to support multiple PCB file formats. A=
ttached is also the template of the file-format plugin with instructions.<b=
r>
<br>
The patch is not too big, but it touches various parts of PCB, so it is pos=
sible that some corner cases are not handled properly. Comments and bug rep=
orts are welcome.<br>
<br>
The modular system utilizes existing plugin system; new type of plugin is a=
dded to support various file formats. This approach allows implementation o=
f additional file formats as independent shared library with minimal effort=
. The whole implementation of new file format is reduced to serialization a=
nd de-serialization of PCBType data structure, no PCB tweaking is necessary=
. The template with instructions is provided, as mentioned above.<br>
<br>
- modular system is available for all layout operations (Load, Save, Save A=
s, Load to buffer, Revert, auto-backup); the element operations will be add=
ed later.<br>
- action "SaveTo(LayoutAs..." was extended by 3rd argument, speci=
fying file format; if omitted, current (or default) format is used<br>
- GUI (GTK only at the moment) was adjusted to allow select file format; fo=
r "save" operations it specifies desired format, for "open&q=
uot; operations it is used as filter<br>
- file format is detected automatically by modular framework<br>
- the versioning system (based on PCB file version #defines) is available -=
each plugin should confirm it's capability to save data of required ve=
rsion (like 20110603); if not, the file format cannot be used<br>
- load-only and save-only formats are supported. If save-only format is use=
d, the layout is not marked as "saved".<br>
- the current PCB format is converted to built-in plugin.<br>
<br>
With this enhancement it should be very easy to implement new file formats.=
If more of them will be available, the most successful can become new stan=
dard PCB format and - hopefully -=C2=A0 the data model modifications will b=
e not blocked by hard-to-extend file format anymore...<br>
<br>
Regards<span><font color=3D"#888888"><br>
Milan<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
--001a11369ad69f5a4e0529022075--
- Raw text -