Creating a 3-point rectangle.

Creating a 3-point rectangle.

Browning_Zed
Advocate Advocate
1,253 Views
2 Replies
Message 1 of 3

Creating a 3-point rectangle.

Browning_Zed
Advocate
Advocate

I need a lisp for creating 3 point rectangle. I know about Lee Mac's program, but his program contains an important flaw. If you try to build a rectangle by points primitives that have different Z-coordinates, the result is not a rectangle, but a rhombus. Advise if Lee Mac's lisp can be modified so that he builds a rectangle without considering the height of the points? Or maybe there is some other working lisp?

0 Likes
Accepted solutions (1)
1,254 Views
2 Replies
Replies (2)
Message 2 of 3

doaiena
Collaborator
Collaborator
Accepted solution

If Lee's code works for you, you could just zero out the Z values of your picked points.

The code starts with picking points:
(setq pt1 (getpoint "\nSpecify 1st point: "))
(setq pt2 (getpoint "\nSpecify 2nd point: " pt1))

After the points are set, you could zero the Z values of those points
(setq pt1 (list (car pt1) (cadr pt1) 0.0))
(setq pt2 (list (car pt2) (cadr pt2) 0.0))

Message 3 of 3

Browning_Zed
Advocate
Advocate

Yes, it works great.

0 Likes