Mail Archives: geda-user/2012/07/06/16:33:26
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 -