samifox Posted April 19 Share Posted April 19 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. any idea? Quote Link to comment Share on other sites More sharing options...
Abrasive Posted April 20 Share Posted April 20 @Lee Mac Wrote a "Chain Select" routine that works really well. https://www.lee-mac.com/chainsel.html I believe you could modify Line 29 to a different tolerance if needed. .... (setq fz 1e-8) ;; Point comparison tolerance" 1 Quote Link to comment Share on other sites More sharing options...
samifox Posted April 20 Author Share Posted April 20 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??" Quote Link to comment Share on other sites More sharing options...
Abrasive Posted April 20 Share Posted April 20 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. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 20 Share Posted April 20 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. Quote Link to comment Share on other sites More sharing options...
Jonathan Handojo Posted April 21 Share Posted April 21 (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 April 21 by Jonathan Handojo Quote Link to comment Share on other sites More sharing options...
BIGAL Posted April 22 Share Posted April 22 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 ? Quote Link to comment Share on other sites More sharing options...
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.