TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: doductiep on November 17, 2021, 05:05:59 AM
-
I have a Point (PT1) and a Pline, always exist a Line accross PT1 and perpendicular with Pline
How to know a Point is on the left or Right of Pline by autolisp?
Please help.
Thank all.
-
No tests
) ;_ end of setq
(cond ((< (* pi
0.5) a
(* pi
1.5)) "left") ((equal a
(* pi
0.5) 1e
-6
) "top") ((equal a
(* pi
1.5) 1e
-6
) "bottom") (t "right")
) ;_ end of cond
-
Consider an expression such as the following:
Where:- pt is the point to be tested
- l1 & l2 are end points of a line to test against
The expression will return T if the point lies to the left of the line, and nil if on the right.
-
No tests
) ;_ end of setq
(cond ((< (* pi
0.5) a
(* pi
1.5)) "left") ((equal a
(* pi
0.5) 1e
-6
) "top") ((equal a
(* pi
1.5) 1e
-6
) "bottom") (t "right")
) ;_ end of cond
Consider an expression such as the following:
Where:- pt is the point to be tested
- l1 & l2 are end points of a line to test against
The expression will return T if the point lies to the left of the line, and nil if on the right.
Thank @kpblc and @Lee Mac
-
Consider an expression such as the following:
Where:- pt is the point to be tested
- l1 & l2 are end points of a line to test against
The expression will return T if the point lies to the left of the line, and nil if on the right.
Lee Mac, you are a legend in the Autolisp communities. You never fail to impress me.