[PythonCAD] pythoncad drawing

Eric Wilhelm ewilhelm at sbcglobal.net
Tue Jul 27 07:30:31 CEST 2004

# The following was supposedly scribed by
# Eric Wilhelm
# on Monday 26 July 2004 03:46 pm:

>New updates here: 


Okay, now you get example.xml, which is a hand-coded pythoncad xml file 
matching the example.dwg, example.dxf as best I can manage.

Some notes here:

1.  Text (particularly scaling and rotating) is problematic in every gui 
toolkit I have ever seen (though I haven't tried coding it in Qt or Wx.)  I 
believe this is why autocad has that ugly stroked font as its default.  My 
guess is that most of the high-end cad programs are using vectorizations of 
the text for their on-screen representation.  How does the Gimp handle this 
with Gtk?

I see an 'angle=' property in the TextLine element, which apparently is not 
implemented yet (maybe when the rotation transform is available?)

Text height apparently must be an integer?  This has got to somehow turn into 
a float.

2.  Arc angles (and presumably angle properties which are not yet utilized 
(e.g. for text)) are stored in degrees.  This may or may not become 
problematic as you convert back and forth from degrees to radians in 
trigonometric calculations.  Aside from that, it is just somewhat irregular 
to me, so it is possibly a matter of convention-conflict.  Can anyone cite 
examples of other file-formats which support degree angles?  What about both 
degree and radian angles?  Is it possible to specify that the angle is in 
degrees in the .xsd?

3.  Points are not allowed to be proper entities in this scheme (maybe a 
"Mark" entity would be able to have linetype, color, etc.)

4.  I find the point-table concept somewhat  objectionable.  Unless you are 
aiming for relational drafting, it seems somewhat overkill.

5.  I'd like to see a transparent value available for the INACTIVE_LAYER_COLOR 
value which would leave the inactive layer entities painted in their actual 
colors, but that may be more of an interface issue.

6.  See previous e-mail about colors.

"It is a mistake to allow any mechanical object to realize that you are in a 
                                        --Ralph's Observation

More information about the PythonCAD mailing list