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\]" Subject: Re: [geda-user] pcb_fprintf mixes mm and mils for same output object References: Date: Mon, 25 Jan 2016 20:30:57 +0100 In-Reply-To: (Britton Kerin's message of "Mon, 25 Jan 2016 09:49:03 -0900") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 "Britton Kerin (britton DOT kerin AT gmail DOT com) [via 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