delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/10/18:05:37

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:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=yuKAcAqq/bCdI1gzyQf48HMrfw7dedCICCqZ/4SrH+M=;
b=ipr8cz4EGkRJF/Y9RujeSWWEUC64BTeVHKGuVgqrl9+ArtVbsS0Vpt02VFdlnr2Ahj
Y77X8gZkf3LDj171SZ+dLRI0TptEVPeJ9Me2CHkmDiz/MYjAQqywhcks541fzwor7Bpk
CIpB2MrmRUeea6iuslS86tdc/TmwLORmrOJHAeX2jUztf+XhcrZzPETS7EnB6Xx5JiPC
r5jAXtkDTqkTjU+DwgQjjrt4BDyrgzA7UA3GSFPwuW+SBcJWtxqFzAS67CXw5JQ2KDzt
Lj7aemlhSnvpznYGsvWa1DMN3JXHjEnpIhRQ/2J5FobBw8Eyaxj45jZSmiJM27PVe3O0
CKNQ==
MIME-Version: 1.0
X-Received: by 10.194.6.98 with SMTP id z2mr129238114wjz.101.1452467127284;
Sun, 10 Jan 2016 15:05:27 -0800 (PST)
In-Reply-To: <5692CBD5.3020101@prochac.sk>
References: <5692CBD5 DOT 3020101 AT prochac DOT sk>
Date: Sun, 10 Jan 2016 14:05:27 -0900
Message-ID: <CAC4O8c8iQnuy2L8QG=absBhnUTuVRj-jJyVNhoqeSiPmiT0gWw@mail.gmail.com>
Subject: Re: [geda-user] A new PCB file format - modular system
From: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

--047d7b5d3e642b7917052902db9a
Content-Type: text/plain; charset=UTF-8

On Sun, Jan 10, 2016 at 12:23 PM, 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...
>

Wow seems really promising.  What surprises me is that it looks like you
were able to do everything with PCBType.  I don't remember the gruesome
details now but last time I tried to make the existing parser work
independent of pcb I ended up with the impression that PCBType didn't
reflect everything that goes in pcb files -- close but not quite
everything.  IIRC this manifested as seg faults from global (non-PCBType)
data that wasn't  ready for the parser to stuff things into it when the
parser ran out of pcb main() context.  Maybe it doesn't matter with the
plugin approach you're using, I'm not sure.  But I would caution that
PCBType might not reflect everything.

Do you have a git account yet?  I'd really like to get this into git and
start playing with it ASAP but it should probably go in your git home at
the moment since you're likely to want to tweak it more.

Britton



>
> Regards
> Milan
>

--047d7b5d3e642b7917052902db9a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><br></div><div class=3D"gmail_extra"><div class=3D"gm=
ail_quote">On Sun, Jan 10, 2016 at 12:23 PM, Milan Prochac (<a href=3D"mail=
to:milan AT prochac DOT sk">milan AT prochac DOT sk</a>) [via <a href=3D"mailto:geda-user=
@delorie.com">geda-user AT delorie DOT com</a>] <span dir=3D"ltr">&lt;<a href=3D"m=
ailto: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:0px 0p=
x 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border=
-left-style:solid;padding-left:1ex">After reading long discussions about th=
e new PCB file format I tried to implement support for multiple 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 &quot;SaveTo(LayoutAs...&quot; 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 &quot;save&quot; operations it specifies desired format, for &quot;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&#39;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 &quot;saved&quot;.<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></blockquote><div=
><br></div><div><div>Wow seems really promising.=C2=A0 What surprises me is=
 that it looks like you were able to do everything with PCBType.=C2=A0 I do=
n&#39;t remember the gruesome details now but last time I tried to make the=
 existing parser work independent of pcb I ended up with the impression tha=
t PCBType didn&#39;t reflect everything that goes in pcb files -- close but=
 not quite everything.=C2=A0 IIRC this manifested as seg faults from global=
 (non-PCBType) data that wasn&#39;t =C2=A0ready for the parser to stuff thi=
ngs into it when the parser ran out of pcb main() context.=C2=A0 Maybe it d=
oesn&#39;t matter with the plugin approach you&#39;re using, I&#39;m not su=
re.=C2=A0 But I would caution that PCBType might not reflect everything.</d=
iv><div><br></div><div>Do you have a git account yet?=C2=A0 I&#39;d really =
like to get this into git and start playing with it ASAP but it should prob=
ably go in your git home at the moment since you&#39;re likely to want to t=
weak it more.</div><div><br></div><div>Britton</div></div><div><br></div><d=
iv>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0p=
x 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-lef=
t-style:solid;padding-left:1ex">
<br>
Regards<span class=3D""><font color=3D"#888888"><br>
Milan<br>
</font></span></blockquote></div><br></div></div>

--047d7b5d3e642b7917052902db9a--

- Raw text -


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