[PythonCAD] dimensioning

Ed Richley richley at onion-switch.com
Tue Jun 12 13:48:50 CEST 2007


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).

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
  File "/usr/lib/python2.4/site-packages/PythonCAD/Interface/Gtk/gtkprefs.py", 
line 2719, in prefs_dialog
  File "/usr/lib/python2.4/site-packages/PythonCAD/Generic/preferences.py", 
line 1660, in save_user_prefs
  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 

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?



More information about the PythonCAD mailing list