GLAVCVS Posted June 18 Posted June 18 Hi @pkenewell I don’t use tangents. For straight segments, the geometry progresses or retreats based on the angular direction of the lateral segments of the selected one. For arc segments, in order to “link” them, progression and retreat are done based on the radius. The variable *s* is currently single-use if passed to the second part of the command, outside of GRREAD. The code is like a living being: it’s born with the idea of following a path, and along the way, it chooses a different route. So *s* was implemented with the intention of providing a complete solution within GRREAD, and along the way, the current solution was chosen instead. 2 Quote
GLAVCVS Posted June 18 Posted June 18 *s* remains for the future as a small device abandoned on the moon that, perhaps one day, will be used by the next visitor. 2 Quote
dexus Posted June 23 Posted June 23 I've changed ElpanovEvgeniy's code. Now it uses snapping with help from dyndraw.arx by Alexander Rivilis. The topic for dyndraw: https://www.theswamp.org/index.php?topic=9133.0 The latest version seems to be AutoCAD 2019 and the arx can still be downloaded here: http://web.archive.org/web/http://www.maestrogroup.com.ua/support/dyndraw.zip Here is my adaptation, let me know how it functions: offset.lsp 1 Quote
dexus Posted June 24 Posted June 24 Aj, unlucky. Hopefully Alexander Rivilis will make an updated version for newer versions! 1 Quote
SLW210 Posted June 24 Author Posted June 24 I meant to try this at home last night on AutoCAD 2000i, but never got on the computer. I am still looking over the codes, maybe I can get something going on my own. As it is, @GLAVCVS solution for the top was the only necessary for the moment issue, but who knows when I'll need to modify the curves, so I'll work on it as my time allows. Quote
dexus Posted July 7 Posted July 7 On 6/23/2025 at 2:38 PM, dexus said: I've changed ElpanovEvgeniy's code. Now it uses snapping with help from dyndraw.arx by Alexander Rivilis. The topic for dyndraw: https://www.theswamp.org/index.php?topic=9133.0 The latest version seems to be AutoCAD 2019 and the arx can still be downloaded here: http://web.archive.org/web/http://www.maestrogroup.com.ua/support/dyndraw.zip Here is my adaptation, let me know how it functions: offset.lsp 9.75 kB · 6 downloads Has anyone tried the code, got it working and find it useful? 1 Quote
pkenewell Posted July 7 Posted July 7 21 minutes ago, dexus said: Has anyone tried the code, got it working and find it useful? I've played with ElpanoxEvgeniy's original code and made a working version. It;s fine on straight segments but can be a little unpredictable on curved segments @GLAVCVS code is a bit more stable on curved segments. 1 Quote
SLW210 Posted July 8 Author Posted July 8 I have started down a new path (rabbit hole?), I hope to get back into this soon in LISP as well as... C#... Solved: Stretch Command code in C#.net to stretch multiple segments of closed polygon - Autodesk Community Haven't had time at home lately either. ElpanoxEvgeniy's original code works, just no accuracy, can't test the Snap addition in AutoCAD 2026. Quote
dexus Posted July 8 Posted July 8 20 hours ago, pkenewell said: I've played with ElpanoxEvgeniy's original code and made a working version. It;s fine on straight segments but can be a little unpredictable on curved segments @GLAVCVS code is a bit more stable on curved segments. I added a gray helper line so you can see how it edits curved segments. Maybe that makes it clearer what is happening and therefore more predictable. For me @GLAVCVS code is not as usefull since it doesn't keep tangent lines tangent when changing curves. It does work quite nicely on straight segments though. 1 Quote
GLAVCVS Posted July 8 Posted July 8 (edited) 2 hours ago, dexus said: For me @GLAVCVS code is not as usefull since it doesn't keep tangent lines tangent when changing curves. Everything can be improved But, IMO, there are two fundamental aspects in which Lisp code has a clear advantage over others: self-sufficiency and versatility. Self-sufficiency: because the code is able to resolve by itself (using the two platforms it has available—Windows and AutoCAD) all the needs it may encounter to solve a problem. Versatility: a *.lsp file is much more versatile and adaptable across versions (for obvious reasons) than a *.arx file. @dexus Therefore, if you write something entirely in Lisp that solves whatever you consider important, I will also applaud your code. (P.S.: Sometimes the .arx file that’s supposed to be valid for a certain version of AutoCAD doesn’t work—as you can see in the image.) I believe AutoCAD has made it this far not because its applications are particularly fast or slow, but because it gives the user a great deal of freedom in handling drawing objects. Someone said in another thread on this forum that AutoCAD will eventually stop supporting Visual Lisp. The day that happens, I know many who will stop using AutoCAD and stick with whatever software best inherits its strengths. And I will be one of them. Edited July 8 by GLAVCVS 1 Quote
SLW210 Posted July 8 Author Posted July 8 The biggest advantage to LISP solution is usability, very few people are allowed to load programs on their work computers, but most can download and run a LISP. @GLAVCVS latest works fine for me as of now. Right now I'm just getting a few things done for after I retire to help those behind me do things easier. I might just do a whole new take on a solution to this issue and have the user input the new diameters/radii, lengths, etc. and redraw it. 1 Quote
GLAVCVS Posted July 8 Posted July 8 I think this thread is becoming interesting again. I suppose there will be some updates in the near future — I believe @Dexus has opened the door to some much-needed improvements. As for me, I take up the gauntlet. But I believe the basic rule should be not to rely on third-party libraries/APIs (except those inherent to Windows and AutoCAD). 2 Quote
dexus Posted Thursday at 09:20 AM Posted Thursday at 09:20 AM (edited) Here is a version that only uses lisp. You will have to download grsnap: https://www.lee-mac.com/grsnap.html It does flicker when I am preventing it from snapping to itself, rest seems to work fine. Keyboard input works a s well. Give it a try: offset.lsp Edited Friday at 09:36 AM by dexus 2 1 Quote
SLW210 Posted Thursday at 11:10 AM Author Posted Thursday at 11:10 AM Maybe later today, I'll see what I can come up with. Quote
GLAVCVS Posted Friday at 09:03 AM Posted Friday at 09:03 AM 23 hours ago, dexus said: Here is a version that only uses lisp. You will have to download grsnap: https://www.lee-mac.com/grsnap.html It does flicker when I am preventing it from snapping to itself, rest seems to work fine. Keyboard input works a s well. Give it a try: offset.lsp 8.91 kB · 3 downloads I don't know how this code behaves when running on other versions of AutoCAD and/or PCs. So I’ll speak based on what I see on mine: Basically, what your code proposes is the same as Evgeny's original code. But with less visual smoothness. Maybe that's why GRSnap doesn't seem visually useful. In any case, I don't understand why it's so important for the arcs to be governed by tangents. If, at the very least, you could control them so the user could adjust them with the cursor, I’d see some utility in it. I think you wrote this too quickly — you can probably do much better. P.S. Your spontaneity and sincerity make me feel comfortable saying this, because it makes me think you'll gladly accept others' honesty as well. Quote
GLAVCVS Posted Friday at 09:20 AM Posted Friday at 09:20 AM (edited) I'll try to find time in the coming days to modify and expand offsetea. I've found a couple of bugs in it, likely due to the lack of stress testing. Also, I'll try to find a way to rein in those arcs governed by tangents. I might include a few more improvements as well. But I'll leave that as a surprise. Edited Friday at 09:21 AM by GLAVCVS 1 Quote
dexus Posted Friday at 09:36 AM Posted Friday at 09:36 AM 15 minutes ago, GLAVCVS said: I don't know how this code behaves when running on other versions of AutoCAD and/or PCs. So I’ll speak based on what I see on mine: Basically, what your code proposes is the same as Evgeny's original code. But with less visual smoothness. Maybe that's why GRSnap doesn't seem visually useful. In any case, I don't understand why it's so important for the arcs to be governed by tangents. If, at the very least, you could control them so the user could adjust them with the cursor, I’d see some utility in it. I think you wrote this too quickly — you can probably do much better. P.S. Your spontaneity and sincerity make me feel comfortable saying this, because it makes me think you'll gladly accept others' honesty as well. No worries, I get that we have other usages, for my work changing the position of the arc segment without changing the tangentcy is important. If it doesn't keep that I'll have to fix it afterwards every time. I updated the code in the previous post to be a little bit less gittery, but I understand that not everyone will sacrifice smoothness to have snap enabled. Therefore here is a version without snap. So the only difference with the one from Evgeny's is that you are able to type in an offset distance as well as select an (inexact) point. offset - nosnap.lsp 1 Quote
SLW210 Posted Friday at 02:43 PM Author Posted Friday at 02:43 PM Not much time this week, should be better next week for playing with codes. Quote
GLAVCVS Posted yesterday at 08:35 AM Posted yesterday at 08:35 AM This weekend I spent some time alone with CrazyHorseSubTangentsArc. I want to share some snapshots of this memorable encounter. Beautiful! But I guess I should be able to show some even better images soon. 2 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.