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=YaY8f8O3VApQpavjDaQyjcYyohM+00T5qMEOEUDGHhM=; b=CqF7ur9xUtHUtxD5mMRfOd693ITahZ5JV5KeyY2jseUnvscWxXrTmCvzYBN/s3WQVk 5oHpW30PYGiyo8MSc/+9rP30RXyhQ4AiVMHKntx714xFZ6AqbZEAur24MR6XzGBJWVXJ 3bkLuzW/7V1gqASR7+m0xX2k38egmdsVLliMgtrRfTtE/NEKH97f+0hF2PHIGSly4pcS MjKLWA6vmSxeLAYcKeF6bMSlzPzITLdvtM+JJvxkydbvl1ahaPuv8UXvl0A/6XGyUyTF VGnxI88A/sFLhDesAz8IJtoqJK4HLItlzlQAVx4N6JTEzAtcgpUR1xtKAWpeYsWb7epy lmRQ== MIME-Version: 1.0 X-Received: by 10.180.85.164 with SMTP id i4mr20325827wiz.54.1442181599716; Sun, 13 Sep 2015 14:59:59 -0700 (PDT) In-Reply-To: References: Date: Sun, 13 Sep 2015 13:59:59 -0800 Message-ID: Subject: Re: [geda-user] shortest way towards parsing .pcb files outside pcb From: "Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]" To: geda-user AT delorie DOT com Content-Type: multipart/alternative; boundary=f46d0445182ff3e899051fa81167 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 --f46d0445182ff3e899051fa81167 Content-Type: text/plain; charset=UTF-8 > On Sat, 12 Sep 2015, Britton Kerin (britton DOT kerin AT gmail DOT com) [via > geda-user AT delorie DOT com] wrote: > >> The standalone parser would be a much slower reinvention, so it was >> suggested to use the one already in pcb. The idea is to ship language >> modules that people can use to parse .pcb from their own scripts. >> > > Also, it's important that the parser sees the same thing when looking at a > PCB file as PCB does. > > The point is that a file should survive a read -> new data structure -> > write round trip and still remain exactly the same. This isn't stricty > true for xorn.geda since gschem preserves the (usually redundant) ripperdir > attribute of buses even if there are no rippers left, but xorn.geda drops > the ripperdir field and re-calculates it from the existing rippers at write > time instead. If there have been rippers at some point, but they were > deleted, the ripperdir field is written as zero. I think that's an obscure > enough corner case, though, and the behavior of gschem is debatable in this > point, so it shouldn't be an issue. I suspect pcb has some similar stuff. Trace size setting in the config file at least are normalized to pcb-preferred units, or clamped or defaulted (or something, I'm not sure what) if they are out-of-range. So round-trip-survival may be a slightly messy metric, making this migration approach slightly less appealing. DJ can you confirm how this works with respect to .pcb files? --f46d0445182ff3e899051fa81167 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

=
On Sat, 12 Sep 2015, Britton Kerin (britton DOT kerin AT gmail DOT com) [via
geda-user AT delori= e.com] wrote:
The standalone parser would be a much slower reinvention, so it was
suggested to use the one already in pcb.=C2=A0 The idea is to ship language=
modules that people can use to parse .pcb from their own scripts.

Also, it's important that the parser sees the same thing when looking a= t a PCB file as PCB does.

The point is that a file should survive a read -> new data structure -&g= t; write round trip and still remain exactly the same.=C2=A0 This isn't= stricty true for xorn.geda since gschem preserves the (usually redundant) = ripperdir attribute of buses even if there are no rippers left, but xorn.ge= da drops the ripperdir field and re-calculates it from the existing rippers= at write time instead.=C2=A0 If there have been rippers at some point, but= they were deleted, the ripperdir field is written as zero.=C2=A0 I think t= hat's an obscure enough corner case, though, and the behavior of gschem= is debatable in this point, so it shouldn't be an issue.
<= div>
I suspect pcb has some similar stuff.=C2=A0 T= race size setting in the config file at least are normalized to pcb-preferr= ed units, or clamped or defaulted (or something, I'm not sure what) if = they are out-of-range.=C2=A0 So round-trip-survival may be a slightly messy= metric, making this migration approach slightly less appealing.=C2=A0 DJ c= an you confirm how this works with respect to .pcb files?
=C2=A0<= /div>
--f46d0445182ff3e899051fa81167--