Hi.

Here's a patch that fixed the problem for me. The location of the
various endpoints (arrow, filled arrow, slash) are determined in
the calcDimValues() routines, and invoking this call just before
the addObject() call ensures that the calculations are performed
when the endpoint type is set in the dimension entity.

I've commited this patch to the repo, and will probably post it on
the web site for people using the tar archives. Please let me know if
the patch fixes the problem for you.

Art

Index: PythonCAD/Generic/tools.py
===================================================================
--- PythonCAD/Generic/tools.py  (revision 2088)
+++ PythonCAD/Generic/tools.py  (revision 2089)
@@ -2519,6 +2519,7 @@
                 _sds.setSuffix(image.getOption('DIM_SECONDARY_SUFFIX'))
             finally:
                 _sds.unmute()
+            _ldim.calcDimValues()
             image.addObject(_ldim)
             self.reset()
 
@@ -2582,6 +2583,7 @@
                 _sds.setSuffix(image.getOption('DIM_SECONDARY_SUFFIX'))
             finally:
                 _sds.unmute()
+            _hdim.calcDimValues()
             image.addObject(_hdim)
             self.reset()
 
@@ -2642,6 +2644,7 @@
                 _sds.setSuffix(image.getOption('DIM_SECONDARY_SUFFIX'))
             finally:
                 _sds.unmute()
+            _vdim.calcDimValues()
             image.addObject(_vdim)
             self.reset()
 
@@ -2774,6 +2777,7 @@
             finally:
                 _sds.unmute()
             _rdim.setDiaMode(image.getOption('RADIAL_DIM_DIA_MODE'))
+            _rdim.calcDimValues()
             image.addObject(_rdim)
             self.reset()
 
@@ -2874,6 +2878,7 @@
                 _sds.setSuffix(image.getOption('ANGULAR_DIM_SECONDARY_SUFFIX'))
             finally:
                 _sds.unmute()
+            _adim.calcDimValues()
             image.addObject(_adim)
             self.reset()
 
-- 
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
_______________________________________________
PythonCAD mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pythoncad

Reply via email to