delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/07/06/16:33:26

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Fri, 6 Jul 2012 13:26:33 -0700
From: Andrew Poelstra <asp11 AT sfu DOT ca>
To: geda-user AT delorie DOT com
Subject: Re: [RFC, v2] [geda-user] [PATCH] Allow to create metric Gerber and
drill files.
Message-ID: <20120706202633.GA28355@malakian.lan>
References: <20120703140236 DOT GA12646 AT visitor2 DOT iram DOT es>
<CAKakQcdTgG6E2h+UgWoh-ujP6vFDH=voY-PBJR3OFG2awqL0_A AT mail DOT gmail DOT com>
<20120705101614 DOT GA19974 AT visitor2 DOT iram DOT es>
MIME-Version: 1.0
In-Reply-To: <20120705101614.GA19974@visitor2.iram.es>
User-Agent: Mutt/1.5.20 (2009-12-10)
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 Thu, Jul 05, 2012 at 12:16:14PM +0200, Gabriel Paubert wrote:
> @@ -765,15 +793,16 @@ gerber_set_layer (const char *name, int group, int empty)
>  #endif
>  
>        fprintf (f, "G04 Format: Gerber/RS-274X *\r\n");
> -      pcb_fprintf (f, "G04 PCB-Dimensions: %.0mc %.0mc *\r\n",
> +      pcb_fprintf (f, metric ? "G04 PCB-Dimensions (mm): %.2mm %.2mm *\r\n",

This line should end in ':', not ','.

Otherwise your patch applied cleanly, introduced no compiler warnings,
and caused no test failures. (It looks good to my human eyes too, for
all that's worth.)

My only concern before pushing it is that it enables metric output by
default. I'm personally happy with this, but I need some confirmation
that it won't cause problems for people before I go through with it.

> +		   "G04 PCB-Dimensions (mil): %.2ml %.2ml *\r\n",
>  	       PCB->MaxWidth, PCB->MaxHeight);
>        fprintf (f, "G04 PCB-Coordinate-Origin: lower left *\r\n");
>  
>        /* Signal data in inches. */
> -      fprintf (f, "%%MOIN*%%\r\n");
> +      fprintf (f, metric ? "%%MOMM*%%\r\n" : "%%MOIN*%%\r\n");
>  
> -      /* Signal Leading zero suppression, Absolute Data, 2.5 format */
> -      fprintf (f, "%%FSLAX25Y25*%%\r\n");
> +      /* Signal Leading zero suppression, Absolute Data, 2.5 format in inch, 4.3 in mm */
> +      fprintf (f, metric ? "%%FSLAX43Y43*%%\r\n" : "%%FSLAX25Y25*%%\r\n");
>  
>        /* build a legal identifier. */
>        if (layername)

-- 
Andrew Poelstra
Email: asp11 at sfu.ca OR apoelstra at wpsoftware.net
Web:   http://www.wpsoftware.net/andrew
"You shouldn't trust every quote you read on the Internet." -- Socrates

- Raw text -


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