[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: Fixed rounded rectangles in PCB



I just checked in my correction to the rendering of rounded rectangles
in PCB.  This is one of the issues I discovered while investigating the
polygon crashes with "GPS_BUG.PCB".  The code to make rounded corners
for clearing polygons had an off-by-one error.  This caused rounded
rectangles (such as the holes in copper planes for square pads) to be
slightly twisted.  The very-slightly-off-vertical and -horizontal lines
this created were part of the issue with the crashes (caused by the
internal polygon code suffering from roundoff errors when intersecting
with such lines).

You can see an animation I made to show the before/after at:

	http://ad7gd.net/geda/roundrectanim.gif

Red is "before" and blue is "after".  You can see how the red version's
rounded corner is not "centered" on the corner, and how the whole thing
is twisted slightly clockwise.  There are similar effects around traces
which plow through polygons.

Since PCB recomputes these clearances every time you load a board, this
will affect any saved boards that you load.  That's the main reason I
waited for Dan to make a release before this commit.  Please let me know
if you see any problems with existing boards.

-- 
Ben Jackson AD7GD
<ben@xxxxxxx>
http://www.ben.com/


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user