Extending line at both ends

Hi!
Is there any way that Rhino can automaticaly extend line at its both ends for an certain value? See pictrue attached.
The extend it self should be from the midde of the curve, so that the curve doesnt change its position.

Hi Mario - no, nothing automatic for that in plain Rhino, I think. - It should be easy enough to script, I’ll see if I can find anything in my pile of scripts.

-Pascal

Hi @mario_pende

If it’s just a straight line - Scale around curve’s Midpoint could probably help.

ok thanx.
But just one thing…Im going to have around 15 or 20 such lines, all diferent lenghts and different position in space. So selecting them all and activating a script that would lengtehn them all in one take would be THE MAIN GOAL :slight_smile:

Hi Mario - here is something that should work OK:

ExtendLInesByLengthFromMidPt.py (1.6 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

-Pascal

you can use boxedit, simply select all curves then use center and option transform objects individually then a delta appears and you can add whatever you need. that probably only works when the lines are showing the same direction though if you dont use scale.

I am surprised that Extend command cannot do it. The Extend command should have number/length option.

Actually, it has. Use dynamic extend. And you’ll have distance to input.

Pascal, THANK YOU A BUNCH! :slight_smile:

But Im having a trouble puting it on a keyboard alias. I did like you said but it says nknown commad.
Heres how Ive typed the command alias:

_-RunPythonScript"C\Users\Mario\Google Drive\VisaulArq"

The py file you gave me is saved in that VisualArq directory

You are correct - ExtendDynamic command has this option - we can type extension length.

Hi Mario -

! _-RunPythonScript "C\Users\Mario\Google Drive\VisaulArq\ ExtendLInesByLengthFromMidPt.py"

-Pascal

Pascal, when I copy this path…and activate my keyboard shortut, it opes the directory “visualarq” and asks me to select an script. Is this ok?
Im asking couse I thought that the scrip would be automaticaly engaged?
If not, ok. this is also fine :slight_smile:

It should run automatically if the following things are correct:

  1. The path is correct, including the script name ( no spelling mistakes)
  2. The script exists and is in the folder the path points to.
  3. You didn’t forget the dash in front of -RunPythonScript.