View Full Version : Filter by Area
spiva2146
11th Jul 2007, 01:54 am
Is there a way to filter by area, transparently?
Ex:
I have many circles with an area of 0, many with an area of 10 and a few more with an area of 20. I only want to select the circles with an area of 0.
Maybe a lisp routine or something like that? Any help would be greatly appreciated
Thanks
CarlB
11th Jul 2007, 02:27 am
I checked the "qselect" command, it appears it will use area as a filter criterion for circles.
If just circles, you could also use radius.
Adesu
11th Jul 2007, 02:44 am
Hi spiva2146
test this code, it's useful for erase if you enter radius as you want
(defun c:test (/ cnt rad ss ssl ssn)
(setq rad (getreal "\nEnter radius of circle: "))
(if
(setq ss (ssget "X" (list (cons 0 "CIRCLE") (cons -4 "=") (cons 40 rad))))
(progn
(setq ssl (sslength ss))
(setq cnt 0)
(repeat
ssl
(setq ssn (ssname ss cnt))
(command "_erase" ssn "")
(setq cnt (1+ cnt))
) ; repeat
) ; progn
(alert (strcat "\nThere is not contained circle with radius"
"\n"
"\n" (rtos rad)))
) ; if
(princ)
) ; defun
Is there a way to filter by area, transparently?
Ex:
I have many circles with an area of 0, many with an area of 10 and a few more with an area of 20. I only want to select the circles with an area of 0.
Maybe a lisp routine or something like that? Any help would be greatly appreciated
Thanks
spiva2146
11th Jul 2007, 03:04 am
Thanks, I'll try that, but I really need to be able to filter by area.
I need to use the filter not only for circles, but arcs, rectangle and squares.
Powered by vBulletin™ Version 4.1.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.