Marc'Antonio Alessi
Usenet Archive
- Joined
- Jul 10, 2003
- Messages
- 204
- Reaction score
- 0
; From a Tony Tanzillo suggestion, see
; John Uhden's @cv_inside function thread.
; minimal, dirty, etc...
;
(defun ALE_IsInside (ImpPnt EntNam / NewEnt EntAre)
(command "_.AREA" "_O" EntNam)
(setq EntAre (getvar "AREA"))
(command
"_.OFFSET" (/ EntAre 10000) EntNam ImpPnt ""
"_.AREA" "_O" (setq NewEnt (entlast))
)
(entdel NewEnt)
(> EntAre (getvar "AREA"))
)
command: pline 0.0 100,0 100,50 0,50 c
command: (ALE_IsInside '(-0.00000000001 -0.00000000001) (entlast))
nil
command: (ALE_IsInside '(0.00000000001 0.00000000001) (entlast))
T
; John Uhden's @cv_inside function thread.
; minimal, dirty, etc...
;
(defun ALE_IsInside (ImpPnt EntNam / NewEnt EntAre)
(command "_.AREA" "_O" EntNam)
(setq EntAre (getvar "AREA"))
(command
"_.OFFSET" (/ EntAre 10000) EntNam ImpPnt ""
"_.AREA" "_O" (setq NewEnt (entlast))
)
(entdel NewEnt)
(> EntAre (getvar "AREA"))
)
command: pline 0.0 100,0 100,50 0,50 c
command: (ALE_IsInside '(-0.00000000001 -0.00000000001) (entlast))
nil
command: (ALE_IsInside '(0.00000000001 0.00000000001) (entlast))
T