peterklos Posted October 18, 2008 Posted October 18, 2008 Hi , I have a half tone picture vector file of 1000's of circles, I need to sort the circles in to groups so I can drill on the CNC machine. Does any one know how I can filter groups in autocad 2005 of the same diameter circles so I can attach only that diameter to a layer, i would then ceate layers of the same size circles and use to drill with the same size drill. regards peter Quote
Commandobill Posted October 18, 2008 Posted October 18, 2008 You could always write a LISP for that. About how many groups of circles have the same diameter? Quote
lpseifert Posted October 19, 2008 Posted October 19, 2008 Try this, not extensively tested (defun c:test (/ old-layer old-cmd diam layname rad rad-dp ss1) (setq old-layer (getvar "clayer") old-cmd (getvar "cmdecho") );setq (setvar "cmdecho" 0) (setq diam (getreal "Enter diameter :") layname (strcat (rtos diam 2 2) "-DIAMETER") rad (/ diam 2) rad-dp (cons 40 rad) ss1 (ssget "x" (list (cons -4 "<and")(cons 0 "circle") rad-dp (cons -4 "and>"))) );setq (if (= ss1 nil) (alert "There are no circles with that diameter") (progn (command "-layer" "m" layname "") (command "change" ss1 "" "p" "la" layname "") (alert (strcat(rtos (sslength ss1)2 0) " circles have been moved to layer " layname)) );progn );if (setvar "clayer" old-layer) (setvar "cmdecho" old-cmd) (princ) );defun Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.