debian/0000755000000000000000000000000011524074001007160 5ustar debian/compat0000644000000000000000000000000211220677320010364 0ustar 7 debian/patches/0000755000000000000000000000000011524073606010621 5ustar debian/patches/series0000644000000000000000000000005111403163633012026 0ustar image_path.patch string_exceptions.patch debian/patches/string_exceptions.patch0000644000000000000000000000675611403163633015423 0ustar Description: Do not use string exceptions, not supported by Python 2.6 Origin: Debian Index: pythoncad-0.1.37.0/PythonCAD/Generic/image.py =================================================================== --- pythoncad-0.1.37.0.orig/PythonCAD/Generic/image.py 2010-06-07 12:32:52.000000000 +0000 +++ pythoncad-0.1.37.0/PythonCAD/Generic/image.py 2010-06-07 12:31:27.000000000 +0000 @@ -836,7 +836,7 @@ simply a distinct point in the Layer if no nearby entities were found. """ - raise "Function getClosestPoint banned " + raise Exception("Function getClosestPoint banned ") _t=5.0 if 'tolerance' in kw: _t=util.get_float(kw['tolerance']) Index: pythoncad-0.1.37.0/PythonCAD/Generic/tools.py =================================================================== --- pythoncad-0.1.37.0.orig/PythonCAD/Generic/tools.py 2010-06-07 12:32:52.000000000 +0000 +++ pythoncad-0.1.37.0/PythonCAD/Generic/tools.py 2010-06-07 12:32:49.000000000 +0000 @@ -920,17 +920,17 @@ return self.__FirstLine def SetFirstLine(self,obj): if obj==None: - raise "None Object" + raise Exception("None Object") if not isinstance(obj,Segment): - raise "Invalid object Need Segment or CLine" + raise Exception("Invalid object Need Segment or CLine") self.__FirstLine=obj def GetSecondLine(self): return self.__SecondLine def SetSecondtLine(self,obj): if obj==None: - raise "None Object" + raise Exception("None Object") if not isinstance(obj,Segment): - raise "Invalid object Need Segment or CLine" + raise Exception("Invalid object Need Segment or CLine") self.__SecondLine=obj FirstLine=property(GetFirstLine,SetFirstLine,None,"Set first line object in the tool") SecondLine=property(GetSecondLine,SetSecondtLine,None,"Set second line object in the tool") @@ -944,9 +944,9 @@ Set the first toolpoint """ if point==None: - raise "None Object" + raise Exception("None Object") if not isinstance(point,Point): - raise "Invalid object Need Point" + raise Exception("Invalid object Need Point") self.__FirstPoint=point def GetSecondPoint(self): """ @@ -958,9 +958,9 @@ Set the second toolpoint """ if point==None: - raise "None Object" + raise Exception("None Object") if not isinstance(point,Point): - raise "Invalid object Need Point" + raise Exception("Invalid object Need Point") self.__SecondPoint=point FirstPoint=property(GetFirstPoint,SetFirstPoint,None,"First line object in the tool") SecondPoint=property(GetSecondPoint,SetSecondPoint,None,"Second line object in the tool") @@ -985,9 +985,9 @@ intersections._seg_seg_intersection(interPnt,self.__FirstLine,self.__SecondLine) else: if self.FirstLine==None: - raise "tools.fillet.Create: First obj is null" + raise Exception("tools.fillet.Create: First obj is null") if self.SecondLine==None: - raise "tools.fillet.Create: Second obj is null" + raise Exception("tools.fillet.Create: Second obj is null") if(len(interPnt)): _active_layer = image.getActiveLayer() _s = image.getOption('LINE_STYLE') debian/patches/image_path.patch0000644000000000000000000000323611313011366013733 0ustar Description: Do not look for gtkpycad.png in script current working directory, use a relative path instead Origin: Debian Index: pythoncad-0.1.37.0/PythonCAD/Interface/Gtk/gtkimage.py =================================================================== --- pythoncad-0.1.37.0.orig/PythonCAD/Interface/Gtk/gtkimage.py 2009-12-19 00:31:15.660722697 +0100 +++ pythoncad-0.1.37.0/PythonCAD/Interface/Gtk/gtkimage.py 2009-12-19 00:32:20.512725186 +0100 @@ -154,7 +154,7 @@ self.__image = image self.__window = gtk.Window() self.__window.set_title(image.filename) - self.__window.set_icon_from_file("gtkpycad.png") + self.__window.set_icon_from_file("/usr/share/pixmaps/gtkpycad.xpm") self.__window.connect("destroy", self.__destroyEvent) self.__window.connect("event", self.__windowEvent) self.__window.connect("key_press_event", self.__keyPressEvent) Index: pythoncad-0.1.37.0/PythonCAD/Interface/Gtk/gtkDialog.py =================================================================== --- pythoncad-0.1.37.0.orig/PythonCAD/Interface/Gtk/gtkDialog.py 2009-12-19 00:32:35.552727163 +0100 +++ pythoncad-0.1.37.0/PythonCAD/Interface/Gtk/gtkDialog.py 2009-12-19 00:33:02.216722121 +0100 @@ -107,7 +107,7 @@ _abautDialog.set_program_name("PythonCad") _abautDialog.set_version("DS1-R37") _abautDialog.set_comments("CAD built from Python") - _iconPath=os.path.join(os.getcwd(),"gtkpycad.png") + _iconPath=os.path.join("/usr/share/pixmaps/","gtkpycad.xpm") _pixBuf=gtk.gdk.pixbuf_new_from_file(_iconPath) _abautDialog.set_logo(_pixBuf) _abautDialog.set_website("http://sourceforge.net/projects/pythoncad") debian/rules0000755000000000000000000000034111524073557010255 0ustar #!/usr/bin/make -f %: dh $@ --with python2 override_dh_auto_install: dh_auto_install -- --install-scripts=/usr/share/pythoncad --install-lib=/usr/share/pythoncad override_dh_installchangelogs: dh_installchangelogs NEWS debian/docs0000644000000000000000000000002411246073651010042 0ustar README debian/doc/* debian/control0000644000000000000000000000154611524073557010610 0ustar Source: pythoncad Section: graphics Priority: optional Maintainer: Python Applications Packaging Team Uploaders: Charlie Smotherman Build-Depends: debhelper (>= 7.3.0) Build-Depends-Indep: python (>=2.6.6-3~) X-Python-Version: >=2.6 Standards-Version: 3.9.1 Homepage: http://sourceforge.net/projects/pythoncad/ Vcs-Svn: svn://svn.debian.org/python-apps/packages/pythoncad/trunk/ Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/pythoncad/trunk/ Package: pythoncad Architecture: all Depends: ${python:Depends}, ${misc:Depends}, python-gtk2 (>= 1.99.16), python-gobject Description: Computer Aided Drafting (CAD) program PythonCAD is a scriptable (with the Python language) and easy to use drafting program. . Please note that this version still doesn't support DWG and DXF file formats. debian/changelog0000644000000000000000000002066211523737023011051 0ustar pythoncad (0.1.37.0-3) unstable; urgency=low * After a discussion with Luca Falavigna, I am taking over maintenance of the package. * Removed pyversions it is no longer needed. * Updated debian/rules to use dh_python2. * debian/control: - Bump Standards-Version to 3.9.1, no changes required. - Updated Maintainer field with my info. - Updated python and debhelper versions for use with dh_python2. - Added X-P-V. - Updated Homepage field. -- Charlie Smotherman Mon, 07 Feb 2011 22:43:10 -0500 pythoncad (0.1.37.0-2) unstable; urgency=low * Switch to format 3.0 (quilt). * debian/patches/string_exceptions.patch: - Do not use string exceptions, not supported by Python 2.6. * debian/control: - Bump Standards-Version to 3.8.4, no changes required. -- Luca Falavigna Mon, 07 Jun 2010 14:36:10 +0200 pythoncad (0.1.37.0-1) unstable; urgency=low * New upstream release. This is the real R37, the previous one was just a beta snapshot, uploaded as R37 due to a misunderstanding with upstream developers. * debian/patches/image_path.patch: - Refresh for new upstream release. * debian/gtkpycad.xpm: - Replace icon with the real upstream logo. * debian/watch: - Fix watch file to point to SF.net site. -- Luca Falavigna Sat, 19 Dec 2009 00:45:01 +0100 pythoncad (0.1.37-1) unstable; urgency=low * New upstream release. * debian/patches/as_reserved: - Removed, applied upstream. * debian/patches/desktop_file: - Removed, applied upstream. * debian/patches/image_path.patch: - Do not look for gtkpycad.png in script current working directory, use a relative path instead. -- Luca Falavigna Sat, 31 Oct 2009 11:20:35 +0100 pythoncad (0.1.36-1) unstable; urgency=low * New upstream release. * Update my e-mail address. * Add Python Applications Packaging Team to Uploaders. * Add Vcs-* fields in source stanza. * Switch to debhelper 7. * Switch to quilt. * Refresh debian/copyright, add missing informations. * debian/patches/as_reserved: - Do not use "as" as variable name (is a reserved word in Python 2.6), this way byte-compilation does not fail (Closes: #521388). * debian/patches/fails_to_exit: - Removed, fixed with new upstream version. * debian/patches/remove_unused_bindump: - Removed, no longer needed. * Remove python-dev from Build-Depends-Indep, use python instead. * Depend on python-gobject. * Depend on ${misc:Depends} in pythoncad binary stanza. * Remove debian/dirs file, useless. * Bump Standards-Version to 3.8.3, list of changes: - Add debian/README.source file to document quilt usage. * Add watch file. -- Luca Falavigna Sat, 29 Aug 2009 02:35:38 +0200 pythoncad (0.1.35-4) unstable; urgency=low * New Maintainer (Closes: #439159, #439160). * debian/control: - Build-dependencies adjusted as per Python policy. - Bump Standards-Version to 3.8.0. - Move Homepage field to Source stanza. * debian/rules: - Remove unneeded dh_* calls. * Add debian/pyversions as per Python policy. * Apply changes from Devid Filoni (Closes: #486208). * debian/copyright: - Add copyright holder, fix lintian warning. - Make copyright valid UTF-8, fix lintian warning. * debian/menu: - Adhere to new menu policy. * debian/patches/01_documentation.dpatch: - Manage documentation added since 0.1.22-1 under dpatch. -- Luca Falavigna Wed, 02 Jul 2008 00:27:49 +0200 pythoncad (0.1.35-3) unstable; urgency=low * Orphaned -- Cédric Delfosse Wed, 22 Aug 2007 21:28:37 +0200 pythoncad (0.1.35-2) unstable; urgency=low * new patch 03_fails_to_exit: Fix for "pythoncad fails to exit" (Closes: Bug#422422) Thanks to Edoardo Batini -- Cédric Delfosse Tue, 08 May 2007 21:12:44 +0200 pythoncad (0.1.35-1) unstable; urgency=low * New upstream release * Fix "unable to save files due to incorrect attribute reference" (Closes: Bug#420352) -- Cédric Delfosse Fri, 27 Apr 2007 23:05:27 +0200 pythoncad (0.1.33-2) unstable; urgency=low * Rebuild for python 2.4 (Closes: Bug#387334) -- Cédric Delfosse Fri, 6 Oct 2006 21:57:23 +0200 pythoncad (0.1.33-1) unstable; urgency=low * New upstream release * Set debhelper compat mode to 5 * Use python-support -- Cédric Delfosse Mon, 10 Jul 2006 22:40:15 +0200 pythoncad (0.1.31-1) unstable; urgency=low * New upstream release * Add debhelper and dpatch to Build-Depends * Set Standards-Version to 3.7.2 -- Cédric Delfosse Mon, 22 May 2006 20:32:33 +0200 pythoncad (0.1.29-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Wed, 15 Mar 2006 22:38:20 +0100 pythoncad (0.1.28-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Thu, 2 Feb 2006 22:10:45 +0100 pythoncad (0.1.26-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Fri, 11 Nov 2005 15:20:42 +0100 pythoncad (0.1.25-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Mon, 27 Jun 2005 21:37:05 +0200 pythoncad (0.1.24-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Sat, 14 May 2005 11:41:16 +0200 pythoncad (0.1.23-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Fri, 25 Mar 2005 19:22:55 +0100 pythoncad (0.1.22-1) unstable; urgency=low * New upstream release * Add note in description about DWG and DXF file formats (Closes: Bug#289354) * Fix man page (Closes: Bug#289581) * Add documentation from the web site (Closes: Bug#289580) -- Cédric Delfosse Mon, 31 Jan 2005 22:09:39 +0100 pythoncad (0.1.20-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Sat, 8 Jan 2005 15:05:26 +0100 pythoncad (0.1.19-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Mon, 22 Nov 2004 22:13:51 +0100 pythoncad (0.1.16-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Fri, 18 Jun 2004 22:26:56 +0200 pythoncad (0.1.14-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Mon, 31 May 2004 23:29:01 +0200 pythoncad (0.1.13-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Fri, 7 May 2004 19:48:14 +0200 pythoncad (0.1.12-1) unstable; urgency=low * New upstream release * dpatch-ification -- Cédric Delfosse Sat, 6 Mar 2004 16:32:27 +0100 pythoncad (0.1.11-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Wed, 7 Jan 2004 22:04:52 +0100 pythoncad (0.1.10-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Tue, 11 Nov 2003 18:49:24 +0100 pythoncad (0.1.9-4) unstable; urgency=low * To really close FTBFS (Closes: Bug#213943): * Build-Depends on python, python-dev (for dh_python) * Depends on python2.3 and python2.3-gtk2 and patch source to work with python 2.3 -- Cédric Delfosse Thu, 9 Oct 2003 22:47:49 +0200 pythoncad (0.1.9-3) unstable; urgency=low * Build-Depends on python2.2 and python2.2-dev (Closes: Bug#213943) -- Cédric Delfosse Sat, 4 Oct 2003 14:41:52 +0200 pythoncad (0.1.9-2) unstable; urgency=low * Depends on python2.2, because the package doesn't work with python2.3 -- Cédric Delfosse Sat, 9 Aug 2003 12:46:49 +0200 pythoncad (0.1.9-1) unstable; urgency=low * New upstream release -- Cédric Delfosse Wed, 30 Jul 2003 22:30:11 +0200 pythoncad (0.1.8-3) unstable; urgency=low * Add python-dev to Build-Depends-Indep (Closes: Bug#203026) * Changed Depends field so that we are not too much depending on python2.2 -- Cédric Delfosse Sun, 27 Jul 2003 10:39:34 +0200 pythoncad (0.1.8-2) unstable; urgency=low * Add python2.2-xmlbase to Depends (Closes: Bug#202887) -- Cédric Delfosse Sat, 26 Jul 2003 18:12:18 +0200 pythoncad (0.1.8-1) unstable; urgency=low * Initial Release. -- Cédric Delfosse Tue, 1 Jul 2003 23:12:51 +0200 debian/install0000644000000000000000000000016011220677320010554 0ustar gtkpycad.py usr/share/pythoncad debian/gtkpycad.xpm usr/share/pixmaps pythoncad.desktop usr/share/applications debian/pyversions0000644000000000000000000000000511220677320011325 0ustar 2.4- debian/doc-base0000644000000000000000000000040311246073333010565 0ustar Document: pythoncad Title: PythonCAD reference Author: Art Haas Abstract: This manual describes PythonCAD basic functions. Section: Help/Books Format: HTML Index: /usr/share/doc/pythoncad/usage.html Files: /usr/share/doc/pythoncad/*.html debian/doc/0000755000000000000000000000000011524073606007737 5ustar debian/doc/commands.html0000644000000000000000000001555311246071417012436 0ustar PythonCAD Command Interpreter

PythonCAD Command Interpreter Reference

The table below gives the available commands in PythonCAD. An example of a command set like those in the keywords.py file is available at the bottom of the page. The commands are listed in the second column of the table. The third column in the table represents an internal command that gets run when the command in the second column is seen.

It bears repeating that the ability of PythonCAD in dealing with these commands is a new feature, and therefore you should expect to encounter some undocumented features. As the development of PythonCAD advances, the command interpreting abilities of the program should stabilize and become more powerful with fewer surprises.

Command Interpreter (05/29/2003)
Command Description Default Name(s) Command Executed
Draw Angled Construction Line acline,acl acline
Arc(Radius/Angle) arc arcc
Draw Construction Circle(Two Points) ccir2 ccir2p
Draw Construction Circle(Point/Radius) ccir ccircen
Chamfer Object chamfer chamfer
Draw Circle(Two Points) cir2 cir2p
Draw Circle(Point/Radius) cir circen
Draw Construction Line (Two Points) cl cl
Close Drawing Window close close
Copy Object copy copy
Cut Object cut cut
Delete Object delete, del delete
Open Dimension Prefrences Window dimpref dimpref
Fillet Object fillet fillet
Horizontal Construction Line hcline, hcl hcline
Draw Leader (Multi-Point) leader, lead leader
Mirror Object mirror, mir mirror
Move Object move, mv move
Move Object Horizontally moveh moveh
Move Object Vertically movev movev
Open New Window new new
Paste Object paste paste
Draw Perpendicular Construction Line pcline pcline
Draw Point point point
Draw Polyline (Multi-Point) polyline, pline polyline
Open Prefrences Menu Window pref pref
Quit Application quit quit
Draw Rectangle (Two Points) rectangle, rect rect
Redraw Screen Objects redraw redraw
Refresh Screen Objects refresh, r refresh
Select all: arcs saa saa
Select all: angled construction lines saacl saacl
Select all: circles sac sac
Select all: construction circles sacc sacc
Select all: construction lines sacl sacl
Select all: horizontal construction lines sahcl sahcl
Select all: polylines sap sap
Select all: segments sas sas
Select all: vertical construction lines savcl savcl
Save Drawing as New Filename saveas saveas
Save Drawing saves, sv saves
Draw Segment (Two Points) segment, seg, l segment
Split Object split split
Stretch Object (Two Points) str str
Stretch Horizontal strh strh
Stretch Vertical strv strv
Draw Tangent Construction Line tcline, tcl tcline
Input Text text text
Transfer to Current Layer transfer transfer
Draw Vertical Construction Line vcline, vcl vcline
Zoom Default zoomd, z zoomd
Zoom Fit zoomf, zf zoomf
Zoom In zoomi, zi zoomi
Zoom Out zoomo, zo zoomo

Example Command Set

Defining a command set is essentially defining a Python dictionary. The key is the command, and the value is the internal command to execute when the user enters the command key. Here is a commands set called mycommands.

mycommands = {
	'foobar' : quit,
	'foo' : segment,
	'X' : quit,
	'O' : opend
}

As the command interpreter is a new PythonCAD addition, it will undoubtedly go through several iterations before it begins to stabilize. The command set, internal command set, and means of selecting which dictionary to use to try and interpret the commands are guaranteed to change. It is also likely that commands may appear in one release, disappear in the next, then reappear in the release after that, or that commands will change meanings.

debian/doc/usage.html0000644000000000000000000003171611246071417011740 0ustar PythonCAD Usage

Usage Questions and Answers

A stated goal of the PythonCAD project is to produce an easy to use CAD package. Still, questions will arise as to how to do some certain operation in PythonCAD. This page will hopefully provide answers to these questions. Keep in mind that the program is in its earliest form, so an answer stating That cannot be done as the code for doing that has not yet been written will be common. Over time, that answer should appear less and less frequently, and some happy day in the future it will not appear at all. If you are able to help develop the code and do so, that day arrives sooner.

How do I ...

This list is by no means complete, and will be added to as various new question arise.

Entering Data

If you are being prompted for a single value of something, like the radius of a circle, just type it in the entry field below the drawing. If you type in the value as an integer value (no decimal point), PythonCAD will convert it to a float value if needed. If it does not do this then you have found a bug. When PythonCAD wants you enter a point in the entry area below the drawing, it will expect you to enter the point in parenthesis, with the x and y coordinates separated by a comma. So, if you wanted to enter a point at the location (0.0,0.0), just type it in like that. You do not need quotes around the parentheses, nor around the digits.

Some effort is made to evaluate what you enter, so if you enter the point like this ((3.4 + 5.5), (2.3 + 3.2)), PythonCAD will create a point at (8.9, 5.5). Entering any arbitrary expression into will probably not work (yet), though at some point it is hoped that PythonCAD will be able to handle really complex expressions. As Python itself can handle the expressions, the weakness is in the PythonCAD code.

Working with Layers

PythonCAD is built around the idea that a drawing is simply a collection of layers with various entities stored in each layer. There is no restriction as to how many layers a drawing may have. All drawings will have at least one layer, and, if you wanted to, you could put all the entities comprising the drawing in that single layer. As drawings get more complex, though, it will probably be clearer if you split up the entities between the layers. One idea could be to place all the dimensions in a layer, the construction lines and circles in another, etc. You will have to decide what works best for your particular needs.

Nearly all the layer operations can be done through the layer display on the side of the drawing. If you right-click a particular layer, a pop-up menu will appear. This menu gives you the choices of renaming the layer, hiding or showing it, and hiding or showing any layers that are children of that layer. Eventually the code will allow you to drag and drop the layers so you can re-parent them as needed. For now the drag and drop functionality only allows you to re-order the layers under a parent. That is, the children layers A-B-C can be reordered to A-C-B.

If you add a new layer, the new layer becomes the active layer. Any entities that are drawn will now be stored in this layer. If you want to change which layer is active, just click on the layer that you want to activate. When a drawing has multiple layers, the entities in the active layer are drawn showing what color they have. Entities kept in the inactive layers are all drawn the same color (currently a blue color). A future release will allow you to choose the color for inactive layers, but for now you have to stick with blue.

If you draw an object in one layer, and then decide you want to move it to another layer, you can do that through the use of the Transfer menu item in the Modify menu. After you invoke the menu item, you can click on the objects that you want to pull into the current active layer. Fillets and chamfers cannot be pulled from one layer to another just yet; this problem should be rectified in an upcoming release.

Printing and Plotting

As of the seventeenth release, PythonCAD can now print! The program will generate a PostScript file that can be sent to a printer or saved to a file. The initial printing support has several know flaws, such as not printing the dimension end-point markers like arrows or slashes. Subsequent releases will fix these problems as well as enhance the overall printing abilities of the program.

The strategy for printing support had always been to generate a file in some format that did not depend on the interface, and PostScript has filled that bill nicely. For people not using PostScript printers, there are third party software packages like Ghostscript that can convert the PostScript output into other formats.

Setting Object Attributes

The current linetype, color, style, and line thickness are all set from the Set submenu in the Draw menu. Depending on which menu choice you make, a dialog box will appear and allow you to set the value of whatever attribute you wish to change.

Changing Object Attributes

The ability to change an objects color, linetype, thickness, or style was added in the second release. First, you must select the objects that you want to change. Use the Select menu item in the Edit menu to select the entities that will get modified. Next, go to the Modify menu, and use one of the choices found in the Change submenu. After clicking OK in whichever dialog box that appears, the selected objects will now have the new attribute values from your menu and dialog choice.

There is currently no easy way to identify which entities are selected, and this deficiency will be rectified in an upcoming release. Also, after changing the attribute of the selected entities, the selected entity list is cleared. This behavior may or may not be a considered a feature, and could change depending on user feedback.

Adding new Linetypes/Styles/Dimension Styles

There is no interface code written for doing this yet, so adding one of these things means delving into the code. There should be either a simple dialog box, or a sequence of dialogs, that will make it easy to do this sort of work, but none of that has been written. Also, questions regarding the saving and loading of these customized features will need answers, as the initial release (and probably many following releases) do not have any support for reading what would be a customization or preferences file.

For storing preferences, it is envisioned that there will be a global set of preferences stored in some file, and a user-specific set of preferences kept in each user's directory. If these files are written in Python code, then they could be brought into the program via an import statement, or the use of the imp module, though the decision as to what these files will be written in, let alone their format, has yet to be made. Feedback to the developers will determine what route to pursue. Other file format options are things like XML or some home-grown key/value text file.

Writing the preference files in Python does seem to present advantages over other formats, as there would be no need to try and write some sort of parser to read the file. Reading the file would be very quick, and any errors could be caught by a simple try/except block. Other alternatives could require more work for the importation of the data in the files. Still, it may be simpler to write the information out in a format other than Python, and that may be a deciding factor on just how to handle this problem.

Update: Storing the preferences as files written in Python has been implemented since the fifth release. This approach has utilized the imp module to load the file and, as the preference file is Python code, makes use of the Python interpreter to parse the file. This approach has worked reasonably well, and has provided a good initial implementation of storing and loading user preferences. At present editing the global preference file is done with a text editor, and probably requires root access as the file is hard-coded to reside in the /etc/pythoncad/ directory. A user can copy this file to a $HOME/.pythoncad/ directory and modify it to their own needs. It is planned that in some future revision the file paths will be more adjustable, as well as be more suitable for non-unix platforms.

Dimensioning

Dimensions are currently the most complex objects in PythonCAD. Any individual dimension has a large number of attributes that can be set, such as line and font color, dimension text position and formatting, and various properties relating to the dimension lines themselves. Dimensions are also at a very early stage in the code, so for all the things they can do, there are many lines of code still needing to be written in order to exercise all the dimension functionality that exists.

The fourth release of PythonCAD addressed many of the shortcomings in the earlier releases. Angular dimensions can be created, displayed, and saved, and linear dimensions will be displayed (they could be created but wouldn't show up). The display of the dimension text is also improved, and the interactive creation of dimensions now has some visual feedback to indicate the dimension points and text location. There is still much work to be added in making dimensions more flexible and editable, but progress is being made, and the fourth release contains vastly improved dimensioning capabilities.

General dimension properties can be set through the Preferences menu item in the Dimension menu. Ideally, all drawing preferences will be set though a single Preferences menu, and there will not be one in both the Edit and Dimension menus. The reason there are two menus now is that the author did not have a good way to integrate dimensional preferences with the preference dialog that exists in the Edit menu. It is clear that using a notebook widget with lots of pages is not a good user interface design. The current layout for selecting preferences needs to be completely reworked, as the program will gain many more user-definable options in the coming releases. Examples of good preference dialogs would be welcomed, as a clear, concise means of setting preferences will probably borrow ideas from them.

For the initial releases, the easiest way to find out what a dimension can do is poke around the dimension preference dialog, alter some of the settings, then go dimension some objects in a drawing. Be advised that PythonCAD will not add a dimension to a drawing if it is duplicating an existing dimension. For example, if you have a drawing consisting of a single line segment, this drawing can have at most one horizontal dimension, one vertical dimension, and one linear dimension. You cannot draw multiple identical dimensions between two points, as the second, third, fourth, etc. dimension would just be repeating the information given in the first dimension. This behavior is considered a feature, and it will take a number of good reasons for changing this design decision.

Commands

The seventh release of PythonCAD shipped with the first iteration of a command interpreter. The long-term goal with the command interpreter is to make it possible to use PythonCAD to a great extent by just typing commands in the entry box at the bottom of the screen. As this functionality is new, it is quite limited in what it can do at the moment. Future releases of PythonCAD will add more commands and enhance the usability of the command interpreter.

Visit this page for a description of the available commands in PythonCAD.

debian/pythoncad.10000644000000000000000000000150311403164355011242 0ustar .\" Hey, EMACS: -*- nroff -*- .TH PYTHONCAD 1 "juillet 15, 2003" .SH NAME PythonCAD \- Computer Aided Drafting (CAD) program .SH SYNOPSIS .B pythoncad .RI " files" ... .SH DESCRIPTION This manual page documents briefly the .B pythoncad commands. This manual page was written for the Debian distribution because the original program does not have a manual page. Some basic usage information about PythonCAD and its internal command interpreter are available in /usr/share/doc/pythoncad/docs. .PP \fBpythoncad\fP is a scriptable (with the Python language) and easy to use drafting program. Please note that this version still doesn't support DWG and DXF file formats. .SH AUTHOR This manual page was written by Cedric Delfosse , for the Debian project (but may be used by others). debian/copyright0000644000000000000000000000256411272413275011134 0ustar This package was debianized by: Cédric Delfosse on Tue, 1 Jul 2003 23:12:51 +0200 It was downloaded from: http://www.pythoncad.org Upstream Authors: Art Haas Matteo Boscolo Copyright: Copyright © 2002-2007 Art Haas Copyright © 2009 Matteo Boscolo License: This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is: Copyright © 2003-2007, Cédric Delfosse Copyright © 2008-2009, Luca Falavigna and is licensed under the GPL, see above. debian/links0000644000000000000000000000006211220677320010227 0ustar usr/share/pythoncad/gtkpycad.py usr/bin/pythoncad debian/gtkpycad.xpm0000644000000000000000000000454711312776757011554 0ustar /* XPM */ static char * gtkpycad_xpm[] = { "32 32 80 1", " c None", ". c #000000", "+ c #D2AE30", "@ c #C6A52D", "# c #C5A42D", "$ c #D9B432", "% c #CAA82E", "& c #D1AE30", "* c #FFE03E", "= c #D3AF30", "- c #DEB933", "; c #FDD23A", "> c #FFD43B", ", c #FFD63B", "' c #DDB62C", ") c #121930", "! c #9F8529", "~ c #FFE13E", "{ c #211C07", "] c #342B0C", "^ c #FFDA3C", "/ c #D2AE2D", "( c #9E9C98", "_ c #FFFFFF", ": c #DCDDE3", "< c #584709", "[ c #30280B", "} c #332B0B", "| c #FFD83C", "1 c #9E9D9C", "2 c #12182E", "3 c #FFDE3E", "4 c #C8A62E", "5 c #FFD53B", "6 c #FED33A", "7 c #FFED42", "8 c #251E08", "9 c #FCD13A", "0 c #181000", "a c #599ED4", "b c #5A9FD3", "c c #5A9FD4", "d c #2F2608", "e c #5BA2D8", "f c #1F3649", "g c #FFDF3E", "h c #211903", "i c #599CCE", "j c #599ED3", "k c #5DA4DB", "l c #366080", "m c #FFE23F", "n c #5CA3DA", "o c #5DA5DC", "p c #12202A", "q c #000001", "r c #5CA2D8", "s c #12202B", "t c #FBD13A", "u c #000003", "v c #5CA3D9", "w c #272009", "x c #FFF143", "y c #FFF243", "z c #06090B", "A c #60AAE2", "B c #599ED2", "C c #60AAE3", "D c #4981AC", "E c #579ACE", "F c #5CA2D9", "G c #5BA1D7", "H c #457BA4", "I c #0D1820", "J c #14232F", "K c #111E28", "L c #0F1B24", "M c #4C86B3", "N c #203A4D", "O c #101D27", " ", " ", " ", " ", " ", " .+@@@@#$%&* =@@@@@@@+. ", " -;>>>,')!~{ >>>>>>>>;- ", "]^>>>>/(_:<] >>>>>>>>>^[ ", "}|>>>>/1_:<] >>>>>>>>>|[ ", "}|>>>>,'2!~{ >>>>>>>>>|[ ", "}|>>>>>;34&* >>>55>>>>|[ ", "}|>>>>678 &>>>>|[ ", "}|>>>690 abccccc @>>>>|d cccef ", "}|>>>ghijbcccccc @>>>>|d cccjkl ", "}|>>>m.ncccccccc @>>>>|d cccccop", "}|>>>mqncccccccc @>>>>|d cccccrs", "}t6>>muvcccccccc @>>>>|d cccccrs", " wxmmyuvcccccccc @>>>>|d cccccrs", " ....zrcccccccc @>>>>|d cccccrs", " ABccccccc @>>>>|d cccccrs", " .Cccccccc @>>>>|d cccccrs", " .Accccccc @>>>>|d cccccrs", " .Accccccc @>>>>|d cccccrs", " .Accccccc @>>>>|d cccccrs", " .DErrrrFc @>>>>|d GrrroHI", " JKKKKLM @>>>>|d NKKKO ", " ", " ", " ", " ", " ", " "}; debian/source/0000755000000000000000000000000011524073606010472 5ustar debian/source/format0000644000000000000000000000001411403162771011676 0ustar 3.0 (quilt) debian/watch0000644000000000000000000000015611312776433010230 0ustar version=3 opts="uversionmangle=s/DS/0\./;s/-R/\./" \ http://sf.net/pythoncad/PythonCAD-(DS\d-R\d\d)\.tar\.gz debian/menu0000644000000000000000000000025211220677320010054 0ustar ?package(pythoncad):needs="X11" section="Applications/Science/Engineering" \ title="PythonCAD" command="/usr/bin/pythoncad" \ icon="/usr/share/pixmaps/gtkpycad.xpm" debian/manpages0000644000000000000000000000002311220677320010677 0ustar debian/pythoncad.1