Mads Refsgaard Posted June 15, 2015 Posted June 15, 2015 In my work I need to messure if cirkels are put to close together, is there a tool in AutoCad or a plug in, that can seek out cirkels that are to close. At one point I have seen a searching tool that could seek out lines that crosses, there for I thought maybe there was a way. the lines I need to seek out is all that are closer then 1.5mm I hope someone can help, and thanks upfront Quote
ReMark Posted June 15, 2015 Posted June 15, 2015 There is no tool, native to AutoCAD, or plug-in that would tell you if two circles were too close. It might be possible using a custom lisp routine but I have no idea how such a routine would be written. Quote
Mads Refsgaard Posted June 15, 2015 Author Posted June 15, 2015 okay thanks for the reply what is a lisp routine? Quote
ReMark Posted June 15, 2015 Posted June 15, 2015 Lisp is a programming language supported by AutoCAD. As a user of full AutoCAD you should study up on how to create and use lisp routines. Quote
Tharwat Posted June 15, 2015 Posted June 15, 2015 Try this program and let me know . (defun c:Test (/ ss i s e l lst) ;;------------------------------------;; ;; Author: Tharwat Al Shoufi ;; ;; Date: 15.June.2015 ;; ;; Highlight the closest two circles ;; ;;------------------------------------;; (if (setq ss (ssget '((0 . "CIRCLE")))) (repeat (setq i (sslength ss)) (setq s (ssname ss (setq i (1- i))) e (entget s) l (cons (list (cdr (assoc 10 e)) (cdr (assoc 40 e)) s) l) ) ) ) (if l (progn (mapcar '(lambda (u) (mapcar '(lambda (x) (if (not (eq (caddr u) (caddr x))) (setq lst (cons (list (- (distance (car u) (car x)) (+ (cadr u) (cadr x))) (caddr u) (caddr x)) lst)))) l)) l) (mapcar '(lambda (o) (redraw o 3)) (cdr (car (vl-sort lst '(lambda (j k) (< (car j) (car k))))))) ) ) (princ) ) 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.