[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: PCB Bug: poly clearance around rotated pads.
Hello, Dave;
On 9/2/08, Dave N6NZ <n6nz@xxxxxxxx> wrote:
> Clearance on rounded pads is much prettier, isn't it? I should probably
> switch my library over. The reason I'm using square pads is because of
> the lame path I am using to turn postscript check plots into dxf files
> for my home-made laser cut paste stencils. ps2edit can't handle the
> rounded pads.
Index: src/polygon.c
===================================================================
RCS file: /cvsroot/pcb/pcb/src/polygon.c,v
retrieving revision 1.59
diff -U3 -r1.59 polygon.c
--- src/polygon.c 2 Dec 2007 09:35:40 -0000 1.59
+++ src/polygon.c 4 Sep 2008 08:20:49 -0000
@@ -581,23 +581,10 @@
{
POLYAREA *np = NULL;
- if (TEST_FLAG (SQUAREFLAG, pad))
- {
- BDimension t = pad->Thickness / 2;
- LocationType x1, x2, y1, y2;
- x1 = MIN (pad->Point1.X, pad->Point2.X) - t;
- x2 = MAX (pad->Point1.X, pad->Point2.X) + t;
- y1 = MIN (pad->Point1.Y, pad->Point2.Y) - t;
- y2 = MAX (pad->Point1.Y, pad->Point2.Y) + t;
- if (!(np = RoundRect (x1, x2, y1, y2, pad->Clearance / 2)))
- return -1;
- }
- else
- {
- if (!
- (np = LinePoly ((LineType *) pad, pad->Thickness + pad->Clearance)))
- return -1;
- }
+
+ if (!
+ (np = LinePoly ((LineType *) pad, pad->Thickness + pad->Clearance)))
+ return -1;
return Subtract (np, p, True);
}
@@ -853,7 +840,7 @@
x2 = MAX (pad->Point1.X, pad->Point2.X) + t;
y1 = MIN (pad->Point1.Y, pad->Point2.Y) - t;
y2 = MAX (pad->Point1.Y, pad->Point2.Y) + t;
- if (!(np = RectPoly (x1, x2, y1, y2)))
+ if (!(np = LinePoly ((LineType *) pad, pad->Thickness + pad->Clearance)))
return 0;
if (!Unsubtract (np, p))
return 0;
Or you would like to have rounded clearances?
Best wishes,
Ineiev
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user