delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2012/07/07/06:42:18

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <20120707104156.17641.qmail@stuge.se>
Date: Sat, 7 Jul 2012 12:41:56 +0200
From: Peter Stuge <peter AT stuge DOT se>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] [PATCH] Allow to create metric Gerber and drill
files, hopefully final version.
Mail-Followup-To: geda-user AT delorie DOT com
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> <20120706202633 DOT GA28355 AT malakian DOT lan> <20120706213340 DOT GA30622 AT visitor2 DOT iram DOT es>
MIME-Version: 1.0
In-Reply-To: <20120706213340.GA30622@visitor2.iram.es>
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

Gabriel Paubert wrote:
> @@ -668,7 +695,7 @@ gerber_set_layer (const char *name, int group, int empty)
>  	    }
>            /* Notice the last zeroes are literal zeroes here, a  *
>             *  x10 scale factor.  v        v                     */
> -          pcb_fprintf (f, "X%06.0ml0Y%06.0ml0\r\n",
> +	  pcb_fprintf (f, metric ? "X%06.0muY%06.0mu\r\n" : "X%06.0ml0Y%06.0ml0\r\n",
>  		   gerberDrX (PCB, pending_drills[i].x),
>  		   gerberDrY (PCB, pending_drills[i].y));

It seems there is a whitespace error in this hunk.


> @@ -996,13 +1025,13 @@ gerber_draw_line (hidGC gc, Coord x1, Coord y1, Coord x2, Coord y2)
>      {
>        m = true;
>        lastX = x1;
> -      pcb_fprintf (f, "X%.0mc", gerberX (PCB, lastX));
> +      print_xcoord (f, PCB, lastX);
>      }
>    if (y1 != lastY)
>      {
>        m = true;
>        lastY = y1;
> -      pcb_fprintf (f, "Y%.0mc", gerberY (PCB, lastY));
> +      print_ycoord (f, PCB, lastY);
>      }
>    if ((x1 == x2) && (y1 == y2))
>      fprintf (f, "D03*\r\n");

What exactly is the relation between pcb_fprintf() -> print_*coord()
in the context of enabling the mm/imp option?

print_*coord() don't seem to be conditional on the setting anyway, so
could that change be moved to a separate commit, preceding the one
that adds the mm option?


//Peter

- Raw text -


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