From ahaas at airmail.net Fri Aug 5 18:56:06 2005 From: ahaas at airmail.net (Art Haas) Date: Fri, 5 Aug 2005 11:56:06 -0500 Subject: [PythonCAD] Sorry for lack of updates Message-ID: <20050805165606.GQ8930@artsapartment.org> Hi. I've been doing some non-computer things over the past couple of weeks, and consequently there haven't been as many updates to PythonCAD as I would have liked. Also, a file-loading issue that has been brought to my attention had pointed out a flaw in the current code that will change numerous routines. The problem arose when a file with two points at the same coordinates was being loaded. The first of the two points is created and added to the drawing without problem, but things go blam when the second point is handled. What happens is the current code for the addObject() method and friends in the Layer class is written so that identical entities are not added into the Layer, and furthermore the code does not indicate that the entity was not added. The issue of silently not adding the object is an API flaw that needs fixing. As for the Layer not adding equivalent entities, that was a design decision that was managable in earlier PythonCAD releases but has now outlived its usefulness. The interactive creation of entities can be coded to always check if an existing entity is found where a new one would be added and either use the existing entity or not, but for non-interactive entity creation via a user-coded script then the testing for existing entities depends on how the code written in the script, something I can't control. Also, the modification of existing entities in a drawing could be performed so that entities having initially different coordinates/endpoints end up having common coordintes/endpoints. The entity test, btw, is probably most useful for Point entities, as I think it is dumb to have lots of duplicated entities having the same values. For things like lines and circular shapes, again it seems dumb to have numerous entities with common endpoints like Segments or Polylines, or Circles/Arcs having identical center points and radius values. In two weeks I will again be away from my computer for a while, but between now and then I hope to have made many of the changes I think will be needed to handle fixing the file load issues as well as the initial impact these changes will produce. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Fri Aug 12 01:47:06 2005 From: ahaas at airmail.net (Art Haas) Date: Thu, 11 Aug 2005 18:47:06 -0500 Subject: [PythonCAD] Some new stuff in the repo Message-ID: <20050811234706.GC9952@artsapartment.org> Hi. I've sent some stuff out that contains various changes to the Layer class and the Quadtree class that address some of the file loading and entity storage issues that have come up recently. The "evil" drawing that caused problems previously now loads without complaint. I'll be making more changes over the next week so expect some more changes to appear shortly. For people accessing the code via subversion, if you have any problems with the latest changes please send me an e-mail. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Fri Aug 12 21:25:24 2005 From: ahaas at airmail.net (Art Haas) Date: Fri, 12 Aug 2005 14:25:24 -0500 Subject: [PythonCAD] Some new stuff in the repo In-Reply-To: <20050811234706.GC9952@artsapartment.org> References: <20050811234706.GC9952@artsapartment.org> Message-ID: <20050812192524.GA4460@artsapartment.org> On Thu, Aug 11, 2005 at 06:47:06PM -0500, Art Haas wrote: > Hi. > > I've sent some stuff out that contains various changes to the Layer > class and the Quadtree class that address some of the file loading > and entity storage issues that have come up recently. The "evil" drawing > that caused problems previously now loads without complaint. I'll be > making more changes over the next week so expect some more changes to > appear shortly. For people accessing the code via subversion, if you > have any problems with the latest changes please send me an e-mail. A second set of changes dealing with file loading and Layer storage are now at the repo. Again, anyone who is accessing the code via subversion should e-mail me if they find a problem loading a drawing. The drawing that started the ball rolling on these changes I can still load without difficulty, and a few drawings I've made have been loaded without problems as well. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Mon Aug 15 22:02:55 2005 From: ahaas at airmail.net (Art Haas) Date: Mon, 15 Aug 2005 15:02:55 -0500 Subject: [PythonCAD] Upcoming changes in PythonCAD QuadTree code Message-ID: <20050815200255.GJ4460@artsapartment.org> Hi. The changes of the last few days in handling equivalent entities in QuadTrees has seemed to go smoothly enough. As a Quadtree now will have possibly stored numerous equivalent entities, an implicit assumption in the find() method no longer holds. The find() calls basically assumed that the QuadTree would only have one entity of some value stored in any node, so when examining the entities the find() call will stop after finding an equivalent entity. Now, however, there may be another equivalent entity in the node that is "better" for the purpose of the find() call, so stopping after encountering the first entity is not a good plan. My initial idea is to change the return type of find() from either 'None' or the found entity to a list. If no suitable entity is encountered an empty list is returned, otherwise the list is populated with entities that meet the criteria. In essence this change makes the find() and getInRegion() methods essentially identical. In the case of the PointQuadtree, a find() call takes an 'x' and 'y' argument, plus an optional tolerance value. Consider in the example below that the find() call wants to test if there are points at (0, 0), with a tolerance of 0.1 units: pqt = point.PointQuadTree() [ ... make points and add them to the tree with addObject() ... ] pts = pqt.find(0, 0, 0.1) This find() call could be replaced by the following: pts = pqt.getInRegion(-0.1, -0.1, 0.1, 0.1) If things work correctly both calls should return the same things, either an empty list or a list populated by the same points. I'm also looking to remove the getClosest() method as it is currently unused anywhere in the code. Also, this method too relies on the implicit assumption of the QuadTree only containing one entity of any given value. I've just started making these changes, so there is nothing new at the repository for anyone to play with yet. Feel free to comment on the planned changes if you think the above plan sounds bad. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Fri Aug 19 14:24:11 2005 From: ahaas at airmail.net (Art Haas) Date: Fri, 19 Aug 2005 07:24:11 -0500 Subject: [PythonCAD] Offline for a short while Message-ID: <20050819122411.GC20601@artsapartment.org> Hi. I'll be offline again for about the next ten days. Also, I'd hoped to have sent more changes to the repo for dealing with the quadtree changes of last week, but I did not get things to a point where I felt that sending them out would be wise. Handling the possibility of numerous equivalent entities in a drawing is more involved than I'd hoped. Art -- Man once surrendering his reason, has no remaining guard against absurdities the most monstrous, and like a ship without rudder, is the sport of every wind. -Thomas Jefferson to James Smith, 1822 From ahaas at airmail.net Wed Aug 31 19:37:50 2005 From: ahaas at airmail.net (ahaas@airmail.net) Date: Wed, 31 Aug 2005 12:37:50 -0500 (CDT) Subject: [PythonCAD] PythonCAD and Hurricane Katrina Message-ID: <1359.70.244.51.121.1125509870.squirrel@webmail.airmail.net> Hi. I live(d) in Slidell, Louisiana a week ago, but after the hurricane hit I'm not sure just where I'll be calling home now. The eye of the storm passed over the city, and I've not had a chance yet to get back there and see if/how my former residence survived. It may be this weekend or early next week before I can get over there, and judging by the damage that the news reports show it looks like some flooding damage is almost a certainty. So, for the forseeable future I'm not going to be working on PythonCAD. I am _NOT_ abandoning the project, but the next couple of weeks at least will be busy cleaning up from the storm, and then the next challenge will be handling housing. Periodically I'll send an e-mail to the list in regards to my status and PythonCAD. Art