Art Haas ahaas at airmail.net
Mon Jun 5 19:42:18 CEST 2006

```On Mon, Jun 05, 2006 at 12:52:55PM -0400, Russ Nelson wrote:
> Art Haas writes:
>  > On Mon, Jun 05, 2006 at 11:55:03AM -0400, Russ Nelson wrote:
>  > > Is there a way to rotate objects?
>  > > Is there a way to set the dimensions of objects?
>  > >
>  > > I need to draw a bunch of fixed-size holes for switches, but they need
>  > > to be at varying rotations.
>  >
>  > You'll probably have to use construction lines to do what you want for
>  > drawing rotated angles, and use construction circles to draw the holes.
>
> Sorry, I didn't explain myself well.  The switches are rectangular,
> and need holes which are 11mm x 13.55mm.  I need to be able to get
> those dimensions correct.  Then I need to be able to place them at
> different angles and positions.  How do I type in 11mm x 13.55mm?

You'll need to use construction lines. For example, create a vertical
construction line with 'Draw'->'Con. Lines'->'Vertical', then create
a parallel line offset by 11mm with 'Draw'->'Con. Lines'->'Pararllel'.
You then enter '11' in the entry box, click on the construction line,
and then click either side of the construction line to determine where
to place the parallel line. Use a similar procedure for creating
horizontal lines 13.55mm across. You then go to 'Draw'->'Segment' and
draw segments on the box defined by the construction lines.

>  > You go to 'Draw' -> 'Con. Lines' -> 'Angled' to draw the angled
>  > construction lines,
>
> What problem do construction lines solve for me?

The use of construction lines is how PythonCAD is designed to create
drawings. Way back when I took drafting classes we did drawings using
construction lines, and my job out of college I used a CAD package
called ME-10 which was also built around the idea of using construction
lines to define precise distances. I also used AutoCAD many years ago,
and it didn't offer construction lines or I was unaware of how to create
them. This was around AutoCAD 9 or 10, and I always had difficulty in
using AutoCAD. When I switched to ME-10 I felt it was much easier to
use, so PythonCAD went the same way.

It would be nice to offer some of the AutoCAD drawing features like
drawing a segment of a given length at a given angle - I think this
is specfied like 'length at angle' at the prompt. They probably have other
means of adding entities that would be useful as well, but I haven't
offers.

>  > PythonCAD currently doesn't have a 'Rotate' function, but that sounds
>  > like a feature that would be good to implement.
>
> I'd just write a program which modifies the XML, but XML is a
> four-letter word.  Have you considered using a file format with less
> useless gunk?

No, I haven't. Python offered an XML parsing module making the format
easy to deal with, and when I started this project it fit the bill.
I've been happy so far with the choice, but if something better comes
along I would consider changing.

> Does PythonCAD have the concept of an object?  If I save a file with
> objects selected, do they remain selectd when I reload the file?

No, selected entities are not stored in the file.

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
```