From nescivi at gmail.com Fri Oct 6 17:10:13 2006 From: nescivi at gmail.com (nescivi) Date: Fri, 6 Oct 2006 17:10:13 +0200 Subject: [PythonCAD] Adding layers Message-ID: <200610061710.14129.nescivi@gmail.com> Hi, I just downloaded and installed PythonCAD-DS1-R34 from the PythonCAD website. First of all: thanks for this great program! I have however one question, regarding layers. PythonCAD seems to support multiple layers, but I don't find how to add layers. Right clicking in the layers field on the left of the screen, gives me the following errors in the console: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkshell.py", line 104, in __treeViewButtonPress _menu = self.__makePopupMenu(widget, _x, _y) File "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkshell.py", line 111, in __makePopupMenu _path, _col, _cx, _cy = widget.get_path_at_pos(x, y) TypeError: unpack non-sequence So I have a feeling that something goes wrong in creating the PopupMenu. Is this a known bug? Or is it a problem with my installation? I am on Debian unstable, and have Python 2.4 as default, and PyGTK2 package from the Debian repository installed. Thanks for any help, sincerely, Marije From ahaas at airmail.net Sun Oct 8 03:05:08 2006 From: ahaas at airmail.net (Art Haas) Date: Sat, 7 Oct 2006 20:05:08 -0500 Subject: [PythonCAD] Adding layers In-Reply-To: <200610061710.14129.nescivi@gmail.com> References: <200610061710.14129.nescivi@gmail.com> Message-ID: <20061008010508.GB27927@artsapartment.org> On Fri, Oct 06, 2006 at 05:10:13PM +0200, nescivi wrote: > Hi, > > I just downloaded and installed PythonCAD-DS1-R34 from the PythonCAD website. > > First of all: thanks for this great program! Thanks. > I have however one question, regarding layers. PythonCAD seems to support > multiple layers, but I don't find how to add layers. > > Right clicking in the layers field on the left of the screen, gives me the > following errors in the console: > > Traceback (most recent call last): > File "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkshell.py", > line 104, in __treeViewButtonPress > _menu = self.__makePopupMenu(widget, _x, _y) > File "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkshell.py", > line 111, in __makePopupMenu > _path, _col, _cx, _cy = widget.get_path_at_pos(x, y) > TypeError: unpack non-sequence > > So I have a feeling that something goes wrong in creating the PopupMenu. > > Is this a known bug? > Or is it a problem with my installation? It's probably a bug, and I'll take a shot at fixing it this weekend. > I am on Debian unstable, and have Python 2.4 as default, and PyGTK2 package > from the Debian repository installed. I'm also running Debian unstable on my main computer, so I should be able to fix things. > Thanks for any help, Art Haas -- 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 jantonio.martin at gmail.com Mon Oct 9 12:44:30 2006 From: jantonio.martin at gmail.com (=?ISO-8859-1?Q?Jos=E9_Antonio_Mart=EDn_Prieto?=) Date: Mon, 9 Oct 2006 12:44:30 +0200 Subject: [PythonCAD] Design proposal for pythoncad website Message-ID: Hi, last week I made a basic css design for the website of pythoncad. I think that the project should have a more attractive website than the current one. I sent an email to Art asking for his opinion about this, but I think that maybe he has not seen my message, so I would like to know the opinion of the list subscribers. My design proposal is simple and standards compliant. I have designed a logo and chosen a colour scheme. The html code of the original site remains the same (except for the addition of a pair of divs) and I have only added an stylesheet. You can see a draft in http://lakamarilla.no-ip.com/~martinp/pythoncad/ and I would like to know your opinion about the following questions: - Do you think that redesigning the website is a good idea? - Do you like the logo? - Do you like the first design? - Any suggestions? Please, be frank in your answers. Really, if you don't like it, I don't mind throwing the design to the trash :) Best regards, Jose Antonio -- "In a world without frontiers, who needs Gates and Windows? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythoncad/attachments/20061009/0c93d99d/attachment.htm From ahaas at airmail.net Mon Oct 9 21:20:46 2006 From: ahaas at airmail.net (Art Haas) Date: Mon, 9 Oct 2006 14:20:46 -0500 Subject: [PythonCAD] Design proposal for pythoncad website In-Reply-To: References: Message-ID: <20061009192046.GF27927@artsapartment.org> On Mon, Oct 09, 2006 at 12:44:30PM +0200, Jos? Antonio Mart?n Prieto wrote: > Hi, > last week I made a basic css design for the website of pythoncad. I think > that the project should have a more attractive website than the current one. > I sent an email to Art asking for his opinion about this, but I think that > maybe he has not seen my message, so I would like to know the opinion of the > list subscribers. Hi. I replied to you this morning. Did the message not arrive? If not, your design is an _enormous_ improvement on the PythonCAD website. I thought you did a fantastic job!! > My design proposal is simple and standards compliant. I have designed a logo > and chosen a colour scheme. The html code of the original site remains the > same (except for the addition of a pair of divs) and I have only added an > stylesheet. > You can see a draft in http://lakamarilla.no-ip.com/~martinp/pythoncad/ and > I would like to know your opinion about the following questions: > - Do you think that redesigning the website is a good idea? > - Do you like the logo? > - Do you like the first design? > - Any suggestions? > Please, be frank in your answers. Really, if you don't like it, I don't mind > throwing the design to the trash :) I hope you don't discard the design. If you have a few other ideas you want to try out, maybe we can tweak the page(s) so that the person viewing the site can select which stylesheet is applied. > Best regards, > Jose Antonio Let me publically thank you for doing this work. The website needs updating and it is clear that web design is not my strong suit ... Art Haas -- 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 pachi at rvburke.com Mon Oct 9 21:55:59 2006 From: pachi at rvburke.com (Rafael Villar Burke) Date: Mon, 09 Oct 2006 21:55:59 +0200 Subject: [PythonCAD] Design proposal for pythoncad website In-Reply-To: References: Message-ID: <452AA94F.6010502@rvburke.com> Jos? Antonio Mart?n Prieto wrote: > Hi, ?Hola! :) > last week I made a basic css design for the website of pythoncad. I > think that the project should have a more attractive website than the > current one. > I sent an email to Art asking for his opinion about this, but I think > that maybe he has not seen my message, so I would like to know the > opinion of the list subscribers. > My design proposal is simple and standards compliant. I have designed > a logo and chosen a colour scheme. The html code of the original site > remains the same (except for the addition of a pair of divs) and I > have only added an stylesheet. > You can see a draft in > http://lakamarilla.no-ip.com/~martinp/pythoncad/ > and I would like > to know your opinion about the following questions: > - Do you think that redesigning the website is a good idea? It's really needed!. > - Do you like the logo? I quite like it. The only part of if that doesn't convince me is the 'python' typeface. I think the rest of the logo is very elegant, but the chosen font for the python part is not that good because you mix a flat and very geometrical design with a 3D one. Maybe something without the 3D effect and just laid out over the CAD part is much better. Also, the bridge photograph should be right aligned, with the border of its containing white box. > - Do you like the first design? yep. If you are willing to take the effort further, maybe it would be better having the contents splitted in a bunch of pages. For instance: About pythonCAD (main page), Getting PythonCAD, Development, Links. And screenshots should be intermixed with those contents. Users should see what's PythonCAD, how does it look like and its features since the very first moment they get into the website. > - Any suggestions? I don't like the green background for the console texts. It's a bit too dark and not on the same range of colours than the rest of the design. Maybe something like PaleTurquoise1 (#BBFFFF) fits better. > Please, be frank in your answers. Really, if you don't like it, I > don't mind throwing the design to the trash :) > > Best regards, > Jose Antonio Thanks for pushing this work forward, Rafael Villar Burke www.rvburke.com From jantonio.martin at gmail.com Mon Oct 9 22:44:03 2006 From: jantonio.martin at gmail.com (=?ISO-8859-1?Q?Jos=E9_Antonio_Mart=EDn_Prieto?=) Date: Mon, 9 Oct 2006 22:44:03 +0200 Subject: [PythonCAD] Design proposal for pythoncad website In-Reply-To: <452AA94F.6010502@rvburke.com> References: <452AA94F.6010502@rvburke.com> Message-ID: Hi, first of all, Art, thanks a lot for your support. I have received your mail at 20:08 (GMT+2), I don't know why. I have found very correct Rafael's answers, and I have made some changes based on his suggestions. > > > - Do you like the logo? > I quite like it. The only part of if that doesn't convince me is the > 'python' typeface. I think the rest of the logo is very elegant, but the > chosen font for the python part is not that good because you mix a flat > and very geometrical design with a 3D one. Maybe something without the > 3D effect and just laid out over the CAD part is much better. I didn't really like this typeface, and following your advice, I have changed it. I think now it's much better. > - Do you like the first design? > yep. If you are willing to take the effort further, maybe it would be > better having the contents splitted in a bunch of pages. For instance: > About pythonCAD (main page), Getting PythonCAD, Development, Links. And > screenshots should be intermixed with those contents. Users should see > what's PythonCAD, how does it look like and its features since the very > first moment they get into the website. This is the second step I would like to take, but I didn't want to move further without some positive opinions. However, I think it's easy to apply the stylesheet to the whole current site and then, with more time, changing its structure. Thanks again for your support and suggestions, Jos? Antonio -- "In a world without frontiers, who needs Gates and Windows? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythoncad/attachments/20061009/fe7b5e82/attachment.html From floris.bruynooghe at gmail.com Mon Oct 9 23:36:29 2006 From: floris.bruynooghe at gmail.com (Floris Bruynooghe) Date: Mon, 9 Oct 2006 23:36:29 +0200 Subject: [PythonCAD] Design proposal for pythoncad website In-Reply-To: References: Message-ID: <20061009213629.GA16968@coronation.devork> On Mon, Oct 09, 2006 at 12:44:30PM +0200, Jos? Antonio Mart?n Prieto wrote: > Hi, > last week I made a basic css design for the website of pythoncad. I think > that the project should have a more attractive website than the current one. [...] > You can see a draft in http://lakamarilla.no-ip.com/~martinp/pythoncad/ [...] Not much criticism or suggestions from me (as I'm fairly rubbish about graphical design), but I just wanted to pitch in to say how great the work is you've done! Looks very good. Regards Floris -- Debian GNU/Linux -- The Power of Freedom www.debian.org | www.gnu.org | www.kernel.org From ahaas at airmail.net Tue Oct 10 22:27:58 2006 From: ahaas at airmail.net (Art Haas) Date: Tue, 10 Oct 2006 15:27:58 -0500 Subject: [PythonCAD] Adding layers In-Reply-To: <200610061710.14129.nescivi@gmail.com> References: <200610061710.14129.nescivi@gmail.com> Message-ID: <20061010202758.GB29794@artsapartment.org> On Fri, Oct 06, 2006 at 05:10:13PM +0200, nescivi wrote: > Hi, > I have however one question, regarding layers. PythonCAD seems to support > multiple layers, but I don't find how to add layers. > > Right clicking in the layers field on the left of the screen, gives me the > following errors in the console: > > Traceback (most recent call last): > File "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkshell.py", > line 104, in __treeViewButtonPress > _menu = self.__makePopupMenu(widget, _x, _y) > File "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkshell.py", > line 111, in __makePopupMenu > _path, _col, _cx, _cy = widget.get_path_at_pos(x, y) > TypeError: unpack non-sequence > > So I have a feeling that something goes wrong in creating the PopupMenu. Hi. The patch below should fix things. I've always clicked on the names in the list and not the blank area below the final name, so I'd not seen this before. After the patch is applied, I can click in the blank area and not get the backtrace. Thanks for the info, and please let me know if the patch below fixes things for you. Art Haas Index: PythonCAD/Interface/Gtk/gtkshell.py =================================================================== --- PythonCAD/Interface/Gtk/gtkshell.py (revision 2616) +++ PythonCAD/Interface/Gtk/gtkshell.py (working copy) @@ -102,13 +102,17 @@ _rv = event.window is widget.get_bin_window() and _button == 3 if _rv: _menu = self.__makePopupMenu(widget, _x, _y) - _menu.popup(None, None, None, _button, event.time) + if _menu is not None: + _menu.popup(None, None, None, _button, event.time) return _rv def __makePopupMenu(self, widget, x, y): # print "Entered LayerDisplay._makePopupMenu" + _data = widget.get_path_at_pos(x, y) + if _data is None: + return None + _path, _col, _cx, _cy = _data _model = widget.get_model() - _path, _col, _cx, _cy = widget.get_path_at_pos(x, y) _iter = _model.get_iter(_path) _layer = _model.get_value(_iter, 1) # -- 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 marco.alicera at gmail.com Tue Oct 10 23:09:21 2006 From: marco.alicera at gmail.com (Marco Alicera) Date: Tue, 10 Oct 2006 17:09:21 -0400 Subject: [PythonCAD] implementing a standalone dxf<->pythoncad conversion Message-ID: Hi everybody i am absolutely new in the list and now that i am sure i am in the PhythonCAD mailing-list i would like to offer my help again for this topic. i am getting used in python and i think in a couple of weeks i will be able to study the PythonCAD project. could Eric Wilhelm or anyone else help me in getting started with this particular subject? best regards Marco Alicera -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythoncad/attachments/20061010/0c5cfa48/attachment.htm From scratchcomputing at gmail.com Wed Oct 11 03:00:15 2006 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Tue, 10 Oct 2006 18:00:15 -0700 Subject: [PythonCAD] implementing a standalone dxf<->pythoncad conversion In-Reply-To: References: Message-ID: <200610101800.15651.ewilhelm@cpan.org> # from Marco Alicera # on Tuesday 10 October 2006 02:09 pm: >Eric Wilhelm or anyone else help me in getting started with this >particular subject? Hi Marco, Have you looked at the info and repository at vectorsection.org? Unfortunately I've been rather swamped with another project lately, but there is already a start on some pythoncad conversion (both to and from the rzp hub) code. If you have questions, please ping me (and don't get discouraged if I forget to answer, just nag me :-) The dxf code is just dxf2rzp and is in Perl for now. I would entertain doing it in Python if you could implement a full conversion but ultimately I want at least parts of it in C for speed. I had also done some work with Inline::Python and Art's library, so I could entertain the idea of furthering that pursuit as well. The way I see it, there's a lot of thankless work to be done and I'll take any help I can get :-D The perl installer is fairly decent when I left off. The python installer could use some work. (Preferably, somehow integrating into the perl Build system.) --Eric -- "Matter will be damaged in direct proportion to its value." --Murphy's Constant --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From marco.alicera at gmail.com Wed Oct 11 14:38:20 2006 From: marco.alicera at gmail.com (Marco Alicera) Date: Wed, 11 Oct 2006 08:38:20 -0400 Subject: [PythonCAD] implementing a standalone dxf<->pythoncad conversion In-Reply-To: <200610101800.15651.ewilhelm@cpan.org> References: <200610101800.15651.ewilhelm@cpan.org> Message-ID: 2006/10/10, Eric Wilhelm : > > # from Marco Alicera > # on Tuesday 10 October 2006 02:09 pm: > > >Eric Wilhelm or anyone else help me in getting started with this > >particular subject? > > Hi Marco, > > Have you looked at the info and repository at vectorsection.org? no yet, but i've just have a look and there is enough to read. Unfortunately I've been rather swamped with another project lately, but > there is already a start on some pythoncad conversion (both to and from > the rzp hub) code. If you have questions, please ping me (and don't > get discouraged if I forget to answer, just nag me :-) thanks The dxf code is just dxf2rzp and is in Perl for now. I would entertain > doing it in Python if you could implement a full conversion but > ultimately I want at least parts of it in C for speed. I had also done > some work with Inline::Python and Art's library, so I could entertain > the idea of furthering that pursuit as well. The way I see it, there's > a lot of thankless work to be done and I'll take any help I can get :-D i will start studying the dxf2rzp to move it to python, when i am able to do something i will let you know. The perl installer is fairly decent when I left off. The python > installer could use some work. (Preferably, somehow integrating into > the perl Build system.) > > --Eric best regards Marco -- > "Matter will be damaged in direct proportion to its value." > --Murphy's Constant > --------------------------------------------------- > http://scratchcomputing.com > --------------------------------------------------- > _______________________________________________ > PythonCAD mailing list > PythonCAD at python.org > http://mail.python.org/mailman/listinfo/pythoncad > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/pythoncad/attachments/20061011/4be6936c/attachment.html From ahaas at airmail.net Wed Oct 11 21:30:39 2006 From: ahaas at airmail.net (Art Haas) Date: Wed, 11 Oct 2006 14:30:39 -0500 Subject: [PythonCAD] Small batch of updates at repo Message-ID: <20061011193039.GC13626@artsapartment.org> Hi. There are a few new changes available at the public repo, including the fix I mailed out a day or two ago that fixed a problem when clicking in the Layer display area. An 'svn update' should get them for you. It looks like my contract work is finished for a while, so I'll have more time to work on PythonCAD. I'm hoping to make the next release now at the end of this month, which seems reasonable if no more contract stuff is offered and I can complete my planned revamping of the user preferences code I've been working on. More updates regarding the release status will be posted over the next few weeks. 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 rshepard at twodogs.us Tue Oct 24 00:29:11 2006 From: rshepard at twodogs.us (Rich Shepard) Date: Mon, 23 Oct 2006 15:29:11 -0700 (PDT) Subject: [PythonCAD] Drawing Grid Lines Message-ID: I have a layer with a set of parallel horizontal lines and an orthogonal set of parallel vertical lines to be used for spacing of entities (even if these entities can not yet be snapped to those grid intersections.) But, looking through the menus I don't see how to: 1) Make the lines evenly spaced. 2) Determine the default spacing. 3) Define the spacing based on units and values I provide. Help appreciated, Rich From ahaas at airmail.net Tue Oct 24 16:56:04 2006 From: ahaas at airmail.net (Art Haas) Date: Tue, 24 Oct 2006 09:56:04 -0500 Subject: [PythonCAD] [PATCH] Fixes for typos and dimension changes Message-ID: <20061024145604.GA5411@artsapartment.org> Hi. The three patches below fix a number of errors in PythonCAD, and I'm sending this out to the list so people not getting the code via subversion can get the changes. The changes to 'dimension.py' are meant to fix a redraw bug where changing the dimension text attributes would not be displayed immediately. People using subversion to get the code just need to do 'svn update'. I've been slogging along on the changes handling the storage and display of user preferences, and unfortunately the work has been moving more slowly than I hoped. There have also been more times where I've had to deal with non-computer things of late, also taking time away from PythonCAD development. I'm now hoping to make the next release in the middle of November, as it is highly unlikely I'll get the fixes I want in the next release done over the next week. Art Haas Index: PythonCAD/Interface/Gtk/gtkmenus.py =================================================================== --- PythonCAD/Interface/Gtk/gtkmenus.py (revision 2625) +++ PythonCAD/Interface/Gtk/gtkmenus.py (revision 2628) @@ -1106,7 +1106,7 @@ _tool.setPrimary(flag) _tool.setObjtype(dimension.DimString) gtkimage.setTool(_tool) - gtkmodify.change_dimstr_precision_init(gtkimage, _tool) + gtkmodify.change_dimstr_units_init(gtkimage, _tool) def change_dim_primary_units_cb(menuitem, gtkimage): _unit = gtkmodify.change_dimstr_units_dialog(gtkimage, 'DIM_PRIMARY_UNITS') Index: PythonCAD/Interface/Gtk/gtkconobjs.py =================================================================== --- PythonCAD/Interface/Gtk/gtkconobjs.py (revision 2625) +++ PythonCAD/Interface/Gtk/gtkconobjs.py (revision 2628) @@ -431,9 +431,9 @@ # def parallel_refpt_button_press_cb(gtkimage, widget, event, tool): - tool.setReferencePoint(_x, _y) _image = gtkimage.getImage() _x, _y = _image.getCurrentPoint() + tool.setReferencePoint(_x, _y) _init_func = tool.getHandler("initialize") _image.startAction() try: Index: PythonCAD/Generic/dimension.py =================================================================== --- PythonCAD/Generic/dimension.py (revision 2625) +++ PythonCAD/Generic/dimension.py (revision 2628) @@ -1184,6 +1184,7 @@ 'thickness_changed' : True, 'scale_changed' : True, 'location_changed' : True, + 'dimstring_changed' : True, 'moved' : True, } @@ -2357,16 +2358,52 @@ _alen = len(args) if _alen < 1: raise ValueError, "Invalid argument count: %d" % _alen - if args[0] == 'moved': - self.startChange('moved') + _arg = args[0] + if _arg == 'moved': + self.startChange(_arg) + elif (_arg == 'textstyle_changed' or + _arg == 'font_family_changed' or + _arg == 'font_style_changed' or + _arg == 'font_weight_changed' or + _arg == 'font_color_changed' or + _arg == 'text_size_changed' or + _arg == 'text_angle_changed' or + _arg == 'text_alignment_changed' or + _arg == 'prefix_changed' or + _arg == 'suffix_changed' or + _arg == 'units_changed' or + _arg == 'precision_changed' or + _arg == 'print_zero_changed' or + _arg == 'print_decimal_changed'): + self.startChange('dimstring_changed') + else: + pass def __dimstringChangeComplete(self, p, *args): _alen = len(args) if _alen < 1: raise ValueError, "Invalid argument count: %d" % _alen - if args[0] == 'moved': - self.endChange('moved') - + _arg = args[0] + if _arg == 'moved': + self.endChanged(_arg) + elif (_arg == 'textstyle_changed' or + _arg == 'font_family_changed' or + _arg == 'font_style_changed' or + _arg == 'font_weight_changed' or + _arg == 'font_color_changed' or + _arg == 'text_size_changed' or + _arg == 'text_angle_changed' or + _arg == 'text_alignment_changed' or + _arg == 'prefix_changed' or + _arg == 'suffix_changed' or + _arg == 'units_changed' or + _arg == 'precision_changed' or + _arg == 'print_zero_changed' or + _arg == 'print_decimal_changed'): + self.endChange('dimstring_changed') + else: + pass + def sendsMessage(self, m): if m in Dimension.__messages: return True -- 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 Tue Oct 24 18:16:44 2006 From: ahaas at airmail.net (Art Haas) Date: Tue, 24 Oct 2006 11:16:44 -0500 Subject: [PythonCAD] Drawing Grid Lines In-Reply-To: References: Message-ID: <20061024161644.GC5411@artsapartment.org> On Mon, Oct 23, 2006 at 03:29:11PM -0700, Rich Shepard wrote: > I have a layer with a set of parallel horizontal lines and an orthogonal > set of parallel vertical lines to be used for spacing of entities (even if > these entities can not yet be snapped to those grid intersections.) > > But, looking through the menus I don't see how to: > > 1) Make the lines evenly spaced. > > 2) Determine the default spacing. > > 3) Define the spacing based on units and values I provide. 1) Use construction lines via 'Draw'->'Con. Lines' in menus: a) Draw a horizontal/vertical construction line b) Draw a parallel construction line - enter the distance in the entry box, click on the reference construction line, then click which side of that construction you want the parallel line to be located. c) Repeat as needed 2) Not sure what you want here - is this in regards to the creation of lines? 3) You can set the units via a dialog brought up by 'Edit'->'Preferences' menu selection. All coordinates in the drawing are now taken to be in the new unit, and values entered are also values in the new unit. Do the answers above provide any clarification? Art Haas -- 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 rshepard at appl-ecosys.com Tue Oct 24 18:24:04 2006 From: rshepard at appl-ecosys.com (Rich Shepard) Date: Tue, 24 Oct 2006 09:24:04 -0700 (PDT) Subject: [PythonCAD] Drawing Grid Lines In-Reply-To: <20061024161644.GC5411@artsapartment.org> References: <20061024161644.GC5411@artsapartment.org> Message-ID: On Tue, 24 Oct 2006, Art Haas wrote: > 1) Use construction lines via 'Draw'->'Con. Lines' in menus: Art, I think this is what I did, but ... > a) Draw a horizontal/vertical construction line > b) Draw a parallel construction line - enter the distance in the entry > box, click on the reference construction line, then click which > side of that construction you want the parallel line to be located. > c) Repeat as needed initially the above wasn't working quite right. > 2) Not sure what you want here - is this in regards to the creation > of lines? Yes. > 3) You can set the units via a dialog brought up by 'Edit'->'Preferences' > menu selection. All coordinates in the drawing are now taken to be > in the new unit, and values entered are also values in the new unit. > > Do the answers above provide any clarification? Yes, it does. I'll try again later today. I'm sure it was user error that kept me from getting the construction lines properly drawn. Thanks, Rich From ahaas at airmail.net Tue Oct 24 21:56:41 2006 From: ahaas at airmail.net (Art Haas) Date: Tue, 24 Oct 2006 14:56:41 -0500 Subject: [PythonCAD] [PATCH] Fix a copy-and-paste error in image.py Message-ID: <20061024195641.GD5411@artsapartment.org> Hi. Found another dumb copy-and-paste error today. Patch below for people not using Subversion; for those using it just 'svn update' to get the fix. Art Index: PythonCAD/Generic/image.py =================================================================== --- PythonCAD/Generic/image.py (revision 2628) +++ PythonCAD/Generic/image.py (working copy) @@ -1829,7 +1829,7 @@ raise ValueError, "Invalid argument count: %d" % _alen _units = args[0] # fixme - maybe add error checking ... - self.saveUndoData('scale_changed', _units) + self.saveUndoData('units_changed', _units) def __addedChild(self, image, *args): _alen = len(args) -- 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 rshepard at appl-ecosys.com Tue Oct 24 22:38:07 2006 From: rshepard at appl-ecosys.com (Rich Shepard) Date: Tue, 24 Oct 2006 13:38:07 -0700 (PDT) Subject: [PythonCAD] [PATCH] Fix a copy-and-paste error in image.py In-Reply-To: <20061024195641.GD5411@artsapartment.org> References: <20061024195641.GD5411@artsapartment.org> Message-ID: On Tue, 24 Oct 2006, Art Haas wrote: > @@ -1829,7 +1829,7 @@ > + self.saveUndoData('units_changed', _units) Art, It was line 1981 on my copy, but I made the change. Thanks, Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc.(TM) | Accelerator Voice: 503-667-4517 Fax: 503-667-8863 From ahaas at airmail.net Wed Oct 25 01:38:04 2006 From: ahaas at airmail.net (Art Haas) Date: Tue, 24 Oct 2006 18:38:04 -0500 Subject: [PythonCAD] [PATCH] Followup patch for gtkimage.py In-Reply-To: <20061024195641.GD5411@artsapartment.org> References: <20061024195641.GD5411@artsapartment.org> Message-ID: <20061024233804.GF5411@artsapartment.org> On Tue, Oct 24, 2006 at 02:56:41PM -0500, Art Haas wrote: > Hi. > > Found another dumb copy-and-paste error today. Patch below for people > not using Subversion; for those using it just 'svn update' to get > the fix. > > Index: PythonCAD/Generic/image.py > =================================================================== > --- PythonCAD/Generic/image.py (revision 2628) > +++ PythonCAD/Generic/image.py (working copy) > @@ -1829,7 +1829,7 @@ > raise ValueError, "Invalid argument count: %d" % _alen > _units = args[0] > # fixme - maybe add error checking ... > - self.saveUndoData('scale_changed', _units) > + self.saveUndoData('units_changed', _units) > > def __addedChild(self, image, *args): > _alen = len(args) Hi. After applying the patch above, the following patch is worth applying as well. Switching units, then undoing the switch, will fail to generate a redraw operation, a problem I just found after playing with the code above. The change to gtkpycad.py below add the bits needed to make the redraw operation occur as expected. Index: PythonCAD/Interface/Gtk/gtkimage.py =================================================================== --- PythonCAD/Interface/Gtk/gtkimage.py (revision 2629) +++ PythonCAD/Interface/Gtk/gtkimage.py (revision 2630) @@ -243,6 +243,7 @@ _image.connect('removed_child', self.__imageRemovedChild) _image.connect('group_action_started', self.__groupActionStarted) _image.connect('group_action_ended', self.__groupActionEnded) + _image.connect('units_changed', self.__imageUnitsChanged) _layers = [_image.getTopLayer()] while len(_layers): @@ -1141,7 +1142,11 @@ self.refresh() else: self.__refresh = True - + + def __imageUnitsChanged(self, obj, *args): + # print "__imageUnitsChanged()" + self.redraw() + def __objChangePending(self, obj, *args): # print "__objChangePending()" + `obj` _alen = len(args) -- 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