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 Monday at 03:21 PM Posted Monday at 03:21 PM 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 Monday at 03:43 PM Posted Monday at 03:43 PM 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 yesterday at 12:05 PM Author Posted yesterday at 12:05 PM 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 yesterday at 12:49 PM Posted yesterday at 12:49 PM 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 yesterday at 02:46 PM Posted yesterday at 02:46 PM (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 yesterday at 03:18 PM by GLAVCVS 1 Quote
SLW210 Posted yesterday at 04:35 PM Author Posted yesterday at 04:35 PM 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 23 hours ago Posted 23 hours ago 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
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.