delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2013/09/01/08:50:51

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Sun, 1 Sep 2013 15:01:43 +0200 (CEST)
X-X-Sender: igor2 AT igor2priv
To: geda-user AT delorie DOT com
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: Re: [geda-user] PCB file format - compatibility suggestion
In-Reply-To: <52232D2A.2010106@xs4all.nl>
Message-ID: <alpine.DEB.2.00.1309011458230.11551@igor2priv>
References: <alpine DOT DEB DOT 2 DOT 00 DOT 1309010843540 DOT 11551 AT igor2priv> <52232D2A DOT 2010106 AT xs4all DOT nl>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
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


On Sun, 1 Sep 2013, Bert Timmerman wrote:

> gedau AT igor2 DOT repo DOT hu wrote:
>> Hello all,
>> 
>> I've started a local branch/fork/whatever of PCB to add a few features I 
>> need daily. These features required adding new element and pin/pad flags. 
>> Mainstream PCB does not understand these flags, and that is expected. 
>> However, loading&saving the design in mainstream PCB will remove those flags 
>> - which is (imo) much less expected.
>> 
>> The reason is not the file format, but the way PCB operates on the file: it 
>> tries to load and parse everything and store in a convenient native 
>> represetnation in memory and render the text version from that upon save.
>> 
>> I still remember the long threads about the PCB file format vs. xml/json; 
>> one of the potential reasons for such a format would be that it might be 
>> easier to keep unknown subtrees intact. However, I am _not_ suggesting 
>> changing the format.
>> 
>> Instead, a partial solution, a minor hack would be to upgrade the 
>> string<->flags converter. The flag format is a comma separated string, the 
>> converter could easily save any unrecognized segment as string, in a linked 
>> list in the flags structure. On save, the list could be appended to the 
>> flags string rendered the usual way. This may change the order of flags in a 
>> round trip but would not change the actual flag values.
>> 
>> Rationale: some feature patches may require changes in the file format, but 
>> very often this is limited to new element/pin/pad flags. Such a feature 
>> would allow file format compatibility among branches/forks/flavors of PCB.
>> 
>> Regards,
>> 
>> Tibor Palinkas
> Hi,
>
> AFAICT you can add "attributes" to pcb files for (specific) meta data beyond 
> of what the pcb application understands and can handle.

This is not about PCB attributes, not design level things, but per pin, 
per pad and per element flags (the code calls them flags). The code of the 
last stable release throws warnings on unknown flags, but does not save 
them.

I've added the code for remembering and saving unknown flags in a linked 
list in my fork; it took less than an hour with testing and the diff was 
a few dozen lines.

> With a specific plug in or exporter one can handle this meta data.

Not with the last release - this info is lost by common_string_to_flags().

Regards,

Tibor

- Raw text -


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