Jump to content

lisp for "osnap mistake" - help


flopo

Recommended Posts

Hello everybody,

I'm working with lot of old drawings, with tousands mistakes - like entities with ends that not link each other - probably osnap used wrong. Any idea for a lisp that will draw a circle (in a new layer) around the place where 2 entities have a small gap with a given value? Like overkill command with numeric fuzz - but only to draw a circle around that gap? To be between lines, polylines, circles, splines, and even between a dimension and a entity (like a line...). Is is possible? Thanks! :shock:

See the attached drawing.

osnap drawing.dwg

Link to comment
Share on other sites

Possible, but very difficult indeed - especially for the circle example in your drawing.

 

The first algorithm that comes to mind would be to check the endpoints of every object in the drawing with the endpoints of every other object in the drawing and use a condition such as:

 

(if (and (not (equal p1 p2)) (equal p1 p2 fuzz))
 ...Draw Circle...

Where 'p1' and 'p2' are two points to be tested and 'fuzz' would be your tolerance.

Link to comment
Share on other sites

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