Divide distance of snap

Hi!

Lets say I have to points separated by 5m. I one to draw a line that starts at one point and finishes at one third the distance of the other.

  • I know I can do between but this only gets me half.
  • I dont want to calculate it and input it.

It would be great to have a shortcut to make the distance that you have on the bottom appear on the input command and then I would be able to divide it…

Any ideas?

Thank you!

you can enter fractions in de command line. so, if you draw a line by clicking one point and move to the next, you’ll see the length down below. if total length is 10 and you want just 1/3th of it, just start typing ‘(10/3)’ and click in your viewport for the right direction.

Thank you Hessel! I was aware of this but I am trying to avoid the process of looking at the number below having to type it out manually and then execute the division.

Create a line between the points.
Divide with EqualChordLenth, Split=No and the number of divisions equal to the denominator of the fraction (3 if 1/3 or 2/3; 7 if 3/7, etc.).
Trim the line using the appropriate point created by divide.
Delete the points.

Thank you David! That is useful but is still incredibly inefficient.

Just as a reference here is how it works on microstation. But I am guessing nothing like this exsists in rhino.

1

well, if it takes you two seconds longer is that really so inefficient? also how often are you using that special case for, to be fair you are asking for a shortcut so you might be having a bunch to work off like that right now, but what exactly is it if i may ask? and is it for each step different or could you work the same ratio off for several times?

generally maybe the way of approaching your task may be inefficient?

here a simple trick, if you use orient with option copy and scale 1d you could do that pretty fast.
just divide the curve prior into your ratio then orient it along your desired connections taking the distance of the entire points as a reference, you will end up with the same ratio wherever you place it.

that of course only works if you dont keep switching it all the time which then would question the way you work probably anyway.

Bildschirmfoto 2021-05-20 um 23.56.28

Bildschirmfoto 2021-05-20 um 23.56.34

1 Like

You are right… That was an exaggeration on mi part.

The thing is that I use this method to precisely move, extrude etc elements in relation to others. For example if I want create x amount of floor slabs between the highest and the lowest point of my building. The method that you are proposing involves first creating a line, using a command to split it in set parts, then copying the element and finally removing those points and the curve each time you want to do that.

But you are probably right my workflow should adapt to the capabilities of the software that I am using so ill adapt it.

Thanks again for the help!

Hi Miguel -

It doesn’t exist but is very easy to create.
You can use the GrasshopperPlayer command to run the attached Grasshopper file. It will then ask for two points and a fraction (e.g. “1/3”) and will then create the line.
If you frequently need this, you can create an alias, keyboard shortcut, or toolbar button to run that file. You can also use the Rhino 7 Script Compiler to turn the grasshopper file into a command.

Fraction Line.gh (13.4 KB)

-wim

2 Likes

cool, i am too ignorrant obviously, did not know that existed. running grasshopper without having to open it. but how would i, considering i keep the gh file in the same folder, address the location file in the alias? and is that script compiler available for mac?

edit: ok i found how to run a gh file via alias using the dashed version and entering the location and filename with quotation marks.

Hi All - if you are willing to make a line, then the PercentageSnap one-shot will be helpful.

-Pascal

1 Like

@pascal

What could be useful is to ask Rhino to parse a measured distance (using the distance One Shot cmd) inside the value combo (Mac) or the Cmd Line (Win) to make calculations in the context of the running command in one step.

If I am not wrong, actually Rhino just collect that number and set it as a length constraint internally.
We are then forced to memorise it or copy/paste it from the Cmd Line and make the calculation in a second step.

This could be a general rule btw.

  • Line
  • Start Point
  • One Shot (Distance)
  • Measure distance from point A to point B
  • Get the number
  • Make any calculation
  • End point

Regards
Rodolfo Santos

1 Like