delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/01/25/14:31:29

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
From: geda AT psjt DOT org (Stephan =?utf-8?Q?B=C3=B6ttcher?=)
To: "Britton Kerin \(britton.kerin\@gmail.com\) \[via geda-user\@delorie.com\]" <geda-user AT delorie DOT com>
Subject: Re: [geda-user] pcb_fprintf mixes mm and mils for same output object
References: <CAC4O8c_ACXqSG7nC56a+GsTf0sy1_4+N5ivZU37X+mb92k+n1Q AT mail DOT gmail DOT com>
Date: Mon, 25 Jan 2016 20:30:57 +0100
In-Reply-To: <CAC4O8c_ACXqSG7nC56a+GsTf0sy1_4+N5ivZU37X+mb92k+n1Q@mail.gmail.com>
(Britton Kerin's message of "Mon, 25 Jan 2016 09:49:03 -0900")
Message-ID: <s6nio2hpiby.fsf@blaulicht.dmz.brux>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
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

"Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com]"
<geda-user AT delorie DOT com> writes:

> This code:
>
>       pcb_fprintf (FP, "\tArc[%mr %mr %mr %mr %mr %mr %ma %ma %s]\n",
>                        arc->X, arc->Y, arc->Width,
>                        arc->Height, arc->Thickness,
>                        arc->Clearance, arc->StartAngle,
>                        arc->Delta, F2S (arc, ARC_TYPE));
>
> outputs this:
>
>       Arc[176.6100mm 926.41mil 86.38mil 86.38mil 0.1540mm 0.3080mm -90 -90 ""]
>
> It looks intentional.  The culprit code is in CoordsToString():

What is the problem?

> There are other format codes besides %mr that force either metric or
> imperial.  I think for file format one of those should be used, or
> else plain ints in the internal unit (nm).  

Please keep explicit units.

Please accept both metric and imperial units when reading.

Please keep units in the file for load/save cycles.

> Fixing this is a file format change

Maybe, at some point the default unit can be changed from cmil to nm for
unit-less numbers, as long as old files with base cmil are recognized
and read correctly.

-- 
Stephan

- Raw text -


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