Jump to content

Recommended Posts

Posted

hi

i need a lisp to snap vertices onto each other. 

 

if you have a long line that consist of lots of segment and not all segments are perfectly snapped to each other ased on proximity and distance.

 

there must be a lisp someone wrote for this.

 

image.thumb.png.bd0999733f8975206cdad0040e942f70.png

 

any idea?

Posted

I've adjusted the FZ to 3 and ensured that the lines aren't spaced more than that. However, it didn't yield the desired outcome. Additionally, even if it does work, shouldn't it align ? not just select??"

Posted

I did forget to mention I added to the routine after line 121:

 

... (command "._PEDIT" "_M" s2 "" "_Y" "_J" "" "")

 

Not sure if that routine will work with such a large gap.

It's also not meant to align segments but to select and then connect.

 

Posted

Been discussed a few times joining miscloses.

 

Did you google ? "snap vertices onto each other autocad lisp"

 

Pretty sure over at Forums/autodesk there is an answer.

Posted (edited)

I do have something. However, this doesn't technically "move" the line, it simply extends and trims the line to meet at the intersections. Just don't enter a tolerance too big.

 

After you run this command, then you can join them (or even confirm using the forementioned Chain Selection program by Lee-Mac.

 

In the attached I tried NEATX for fun, but the result turned out ugly as hell. So I just recommend NEAT instead and then you specify the tolerance... of probably 5 to 10, if your objects aren't too far. I can't really guarantee that this will work to your expectation, but hopefully it should.

Neaten.lsp

Edited by Jonathan Handojo
Posted

Had a quick look and I think Kent Coopers suggestion was best that you move both ends to the midpoint of the 2 ends that are not touching. 

 

What quantities are we talking about in other post a figure of 70,000 was suggested at this level the lisp may crash as the list gets to big of end values.

 

Did you try the pedit solution ?

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