[PythonCAD] dimensioning

Art Haas ahaas at airmail.net
Thu Jun 14 23:58:32 CEST 2007


On Wed, Jun 13, 2007 at 12:56:45PM -0500, Art Haas wrote:
>
> When the 'line_style' attribute is found, globals.prefs['LINE_STYLE]' 
> gets set to a Style instance defined by the keys/values in 'line_style'.
> If any overriden values were seen, as is the case above with
> 'line_thickness', then the matching key/value pair in globals.prefs
> gets the override value. In my case, globals.prefs['LINE_THICKNESS']
> is set to 0.1, overriding the value defined in the style (1.0).

Hi.

I was poking around with this code today and fixed what is arguably an
oversight on my part. When the globals.prefs['LINE_STYLE'] value is
set, the 'LINE_TYPE', 'LINE_THICKNESS', and 'LINE_COLOR' values are
not set to whatever values defined by the just-set Style. I've just
added the code so those three values get set after LINE_STYLE. Any
overriden Style values, such as in my example in the previous mail, will
then set the appropriate key/value pair in globals.prefs.

When the preferences.py file has 'text_style', the code is supposed
to set the globals.prefs['TEXT_STYLE'] key with the suitable Style. The
line of code to do this, though, was missing (!), so the TEXT_STYLE
was not be set correctly. This problem is now fixed, and when the
TEXT_STYLE is set the various TEXT/FONT options get set as well.

I've pushed my changes out to the repo, so just do an 'svn update' and
you'll get them.

Also, some of you may have noticed that the repo now has '.gitignore'
files. They have not been added by mistake, as I've imported the
PythonCAD Subversion repo into 'git' and am now using it as my
development tree. I'm working to set up 'git clone' and 'git pull'
access from the PythonCAD site, but it isn't available yet. My work
flow now is done in the PythonCAD git repo, and after commiting
my changes I extract the change(s) as a patch, apply it to my old
Subversion development tree, then commit the patch to the Subversion
repo as I've always done. This is a manual process, but as long as
the patches are small this works.

I wrote earlier that I wanted to switch to a distributed SCM, and
the response was that most people were happy with Subversion access
and the current setup. I think the approach I've taken in making
the switch while still providing Subversion access will work for
the foreseeable future. Once I make my 'git' repo accessible then
people who want to develop PythonCAD with git will be able to do
so while Subversion users will not be abandoned. Ideally there would
be a git->svn tool that does the patch application, but I don't
know of such a beast. Git does have a 'git svn' command but it is
structured so that a Git user can push/pull from an Subversion
repo with the idea that the Subversion repo is the "master" repo.
I want a simpler "export-only" type transfer from git to svn.

When my git repo becomes public I'll send a message to the mailing
list giving the location, and those wanting to use git instead
of Subversion will be welcome to clone my tree and develop away!

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


More information about the PythonCAD mailing list