Jump to content

How to seek out close lines


Recommended Posts

Posted

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

seek out.jpg

 

I hope someone can help, and thanks upfront :)

Posted

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.

Posted

okay thanks for the reply :) what is a lisp routine?

Posted

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.

Posted

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)
 )

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...