AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

 

Have you every tried to calculate the area of two intersecting entities, especially if one, or both, include curves? Difficult hey!
Draw a couple of intersecting entities (like two circles,) and run this little routine :

;coding starts here

(defun c:barea ( / a b opp tekst)

(setq a (getpoint "\nSelect Internal Point: "))

(command "-Boundary" a "")

(setq b (entlast))

(redraw b 3)

(command "area" "O" "L")

(setq opp (rtos (getvar "area") 2 3))

(setq tekst (strcat "\nArea = " opp))

(alert tekst)

(redraw b 4)

(command "Erase" b "")

(princ)

);defun

(princ)

;coding ends here

Have you every tried to calculate the area of two intersecting entities, especially if one, or both, include curves? Difficult hey!
Draw a couple of intersecting entities (like two circles,) and run this little routine :

;coding starts here

(defun c:barea ( / a b opp tekst)

(setq a (getpoint "\nSelect Internal Point: "))

(command "-Boundary" a "")

(setq b (entlast))

(redraw b 3)

(command "area" "O" "L")

(setq opp (rtos (getvar "area") 2 3))

(setq tekst (strcat "\nArea = " opp))

(alert tekst)

(redraw b 4)

(command "Erase" b "")

(princ)

);defun

(princ)

;coding ends here

 

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website