On Thu, 2008-10-09 at 17:14 -0700, Ben Jackson wrote: > On Fri, Oct 10, 2008 at 12:41:26AM +0100, Peter Clifton wrote: > > > > Ben, as you know the Polygon code better than most, I'd appreciate your > > review of those patches if you get chance. > > I do mean to try them, I've just been a little busy. > > > Is there any reason why the existing code picked out and worked with > > rectangular polygons only? > > If you look up in GatherSubnets you'll see the initial connection lists > only add rectangular polygons. You probably saw my commented out > 'IsPointInPolygon' when you made your change. I did that because I hit > the same problem you did (holes) and since the GatherSubnets only put > rectangular polygons in anyway I took the easier way out. > > > Should I commit my two patches? > > If I remember you said you fixed IsPointInBox by writing the obvious > code without supporting radius. I wouldn't want to leave that trap in > there for someone else to find -- much like I tripped over the original > bug. If you removed the radius argument altogether that'd probably be > fine.
Nearly right.. I "fixed" IsPointInBox without _TESTING_ support for bloat around the box. The "fix" basically re-implements a portion of IsPointInPad, rather than contriving to construct and test pad a which looks like it has the same geometry as the desired box. The new "IsPointInPolyIgnoreHoles()" function, doesn't take a radius parameter, as it meant I didn't have to produce hole-ignoring versions of several polygon calls. Since I'm currently the only caller, it didn't seem that there was much point implementing code which isn't yet wanted. > If you are getting via-rats over arbitrary polygons with your changes > I'd like to know how it's working! See "IsPointInPolyIgnoreHoles()". It looks at the first piece of a clipped poly (the visible part, as used for connectivity), and just test for a hit within its outer contour, ignoring any inner ones. This may break slightly with my experimental code to allow polygons to clear away other polygons. That is the only kind of object I could imagine clearing a useful hole in a Polygon, where I'd not want to have via-rats showing up in the hole. All other types of objects which cut holes in polygons would get in the way of that via-rat's connectivity anyway, so it doesn't matter if I ignore that hole. -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) _______________________________________________ geda-user mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

