Jump to content

Recommended Posts

Posted

 

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.

  • Like 2
Posted

*s* remains for the future as a small device abandoned on the moon that, perhaps one day, will be used by the next visitor.

  • Like 2
Posted

I have AutoCAD 2026 at work.

Posted

Aj, unlucky.

Hopefully Alexander Rivilis will make an updated version for newer versions! 🤞

  • Like 1
Posted

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.

  • 2 weeks later...
Posted
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?

  • Like 1
Posted
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.

  • Like 1
Posted
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.

 

  • Like 1
Posted (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.)

 

img.png.415fa4f79ef5246db854b30122ceba9c.png

 

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 by GLAVCVS
  • Thanks 1
Posted

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.

 

 

 

 

  • Like 1
Posted

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

 

  • Like 2
Posted (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 by dexus
  • Like 2
  • Agree 1
Posted

Maybe later today, I'll see what I can come up with.

 

 

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

 

Posted (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 by GLAVCVS
  • Like 1
Posted
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

 

  • Like 1
Posted

Not much time this week, should be better next week for playing with codes.

Posted

This weekend I spent some time alone with CrazyHorseSubTangentsArc.

I want to share some snapshots of this memorable encounter.

CrazyHorseCalledSubTangentArc.gif.25b7f5a5588708d0bc7cea10d6a5ffe2.gifCrazyHorseSubTangent.gif.32a15600171ab264770f14587680645f.gif

 

Beautiful!

But I guess I should be able to show some even better images soon.
😃

  • Funny 2

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