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=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=pXSwC3ae24BP8+M9U8JDitKKYQvCKWRVuSact2B4oh0=; b=qspwM+vL/CeF/HbF16NNP07dFS3Ix1nk9rAyqYWwhLjOdRWHM98jJjJvj+yRXI7AkL pIYMbbOObTO+JvSIyzDMaCcJrPOx1OVgpjZ6aTZRFFNJDTZduI4Nl8ajZZhBpYY0iI7+ pbkLVftfaH2A3WvE8TWxLdzVxj/zIuN+Unkt+ln0PBdWCqw33rxWTMmK53HRIKd6X1/z +z4kAQ05nlxUrIqBIxgEJfpPW8C1lUusNXIdzk/igzovTg/AvEbzpEb4zq+jnvQ7DghV Yr96v7ASUFFeMAzhWWeyY2LSMoTwEL5ZQb3Lht6dlQZUyNLt6ahqS9pXJREmN0m6BPRl zCvg== MIME-Version: 1.0 X-Received: by 10.60.232.231 with SMTP id tr7mr78527619oec.27.1452463997538; Sun, 10 Jan 2016 14:13:17 -0800 (PST) In-Reply-To: References: <5692CBD5 DOT 3020101 AT prochac DOT sk> Date: Sun, 10 Jan 2016 22:13:17 +0000 Message-ID: Subject: Re: [geda-user] A new PCB file format - modular system From: "Peter Clifton (petercjclifton AT googlemail DOT com) [via geda-user AT delorie DOT com]" To: gEDA User Mailing List Content-Type: multipart/alternative; boundary=001a11369ad69f5a4e0529022075 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 Precedence: bulk --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 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] 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
Hi Milan,

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.

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.

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).

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.


Perhaps we can go over this p= atch in detail at the scheduled code-sprint at the beginning of February?
Kind regards,

Peter


On 10 January 2016 at 21:58, Peter Clifton <= petercjc= lifton AT googlemail DOT com> wrote:
Hi Milan,

That is a surpris= ingly small patch!

Did you have some of your example format re= aders / writers to share too?


Peter
<= div class=3D"gmail_extra">
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&= gt; wrote:
After reading long disc= ussions about the new PCB file format I tried to implement support for mult= iple file=C2=A0 formats.

You can download it here: http://static.bastl.sk/p= cb/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. A= ttached 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 pos= sible that some corner cases are not handled properly. Comments and bug rep= orts are welcome.

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.

- 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.
- action "SaveTo(LayoutAs..." was extended by 3rd argument, speci= fying file format; if omitted, current (or default) format is used
- 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
- 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 ve= rsion (like 20110603); if not, the file format cannot be used
- load-only and save-only formats are supported. If save-only format is use= d, 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 stan= dard PCB format and - hopefully -=C2=A0 the data model modifications will b= e not blocked by hard-to-extend file format anymore...

Regards
Milan


--001a11369ad69f5a4e0529022075--