[PythonCAD] dimensioning

Art Haas ahaas at airmail.net
Tue Jun 12 22:38:12 CEST 2007


On Tue, Jun 12, 2007 at 07:48:50AM -0400, Ed Richley wrote:
> 
> Hi:
> 
> Can anyone reproduce this problem, using the latest version?:
> 
> 1) Be sure that drawing and primary dim units are set to "inches" (edit 
> prefs.py manually)
> 2) Open a new drawing
> 3) Draw a 1.000 x 1.000 rectangle
> 4) Dimension one side (say, with horizontal dimension)
> 5) See that it shows 0.039 instead of 1.000, as if it thought the drawing
> units were mm.
> 
> If dim units are set to "millimeters", then it works correctly (even though
> I want inches).

I've duplicated this. I'm investigating right now.

> Also, there seems to be a problem with edit->preferences, for when I try
> to edit the primary dim units I get the error:
> 
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkmenus.py", 
> line 458, in prefs_cb
>     gtkprefs.prefs_dialog(gtkimage)
>   File "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkprefs.py", 
> line 2719, in prefs_dialog
>     preferences.save_user_prefs()
>   File "/usr/lib/python2.4/site-packages/PythonCAD/Generic/preferences.py", 
> line 1660, in save_user_prefs
>     _save_dimstyle_values(_f)
>   File "/usr/lib/python2.4/site-packages/PythonCAD/Generic/preferences.py", 
> line 1471, in _save_dimstyle_values
>     if abs(_val - _ds.getOption('DIM_EXTENSION')) > 1e-10:
> TypeError: unsupported operand type(s) for -: 'Color' and 'float'
> 
> 
> It appears that the DIM_EXTENSION attribute if getting the value of the 
> DIM_COLOR.
> 
> I'm trying to learn Python and fix this (at the same time), but it's hard :-(.
> Can someone please at least reproduce the problem?

I'll take a look at this too, and reply to your other mail 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


More information about the PythonCAD mailing list