Find midpoint between two points

Oh SNAP! You did it!

Holy &*#$%.

You see, this is why I got so much sleep in trig class.

Thank you!

Ok, I had a look at the magic code and have discovered a small requirement. The Rod needs the ability to shift more to one circle or the other. Right now what you have here is a line drawn between two identical points, and so the line is always parallel with the centre of each circle.

I was hoping GH had a function where you could define a line length and then snap the end to a curve — then you could push the line towards the circle and the line end would slide along the circle path while using only a lateral input slider.

so you want to be able to change the rod length AND the position of one end of the rod along one of the circles?
then the other end of the rod touches the other circle at the correct distance?
if so, that’s probably a little bit easier.

that said, it’s hard to figure out exactly what you’re trying to do :wink:

here’s another one to look at:

what’s this one not doing properly? :smile: (11.7 KB)


Ok, now you’re just showing off. Just look at this mastery of grasshopper voodoo.
I swear this is the right amount of spaghetti noodles I expected.

If you were anywhere near where I work, I’d buy you a beer.

Thank you.


this is a synthetic geometry approach to solving your problem.

1 draw a line using your two given points as its endpoints
2 again using your two given points, draw a circle using Rhino’s 2point Circle command

the osnap Cen locates our midpoint.

@john_clagett in Rhino it’s much easier, just type between in the command line when picking a point and you can pick the two extremes.

1 Like

is there a list of such hidden easter eggs somewhere?

I have no idea where I learned that trick, but if I search the online Rhino help for “between” I get zilch.

Although the option is listed in the OSnap page, however when I navigate to it the url in the browser doesn’t update so I don’t know how to share a link to it either…

I/ve been using between since Rh4

yeah, between is a One-Shot Osnap.
and typing any Osnap will temporarily activate it.

here a link from the docs for anybody wanting to read up those easter eggs, which also contains some more info on more of such “hidden” snap functions.

what i also have found that the ctrl hover function to toggle those bunnies does not function on mac @dan can you have a look if thats so? also the short versions like AlonP instead of AlongParallel do not work on mac… i dont know if they are valid at all since i found that info here

Sorry, I don’t understand “ctrl hover function to toggle.”

Are you referring to this behavior (RH-36516)?

i am afraid not. what i meant is this (copied from the docs somewhere in the middle
under Object snaps using references):

To access reference object snaps from the Osnap control
Press the Ctrl key and hover over the Osnap control.
The alternate reference object snaps appear.

which does not work on mac at all, only through typing it into the value box,
which is without autocomplete pretty painful.

on mac, the osnap panel has a button for one-shot instead of cmmd hover…


i’m pretty sure windows doesn’t have the one shot button… i suppose it’s arguable that the way it’s being done on mac is more user friendly and discoverable… but i don’t know if that’s the reason the two versions are different in this regard or if it’s a technical reason (such as- focus may not go to the panel on macOS in the same way windows deals with it so a hover+key may not work? instead, you have to explicitly click on a panel or another window in order to bring focus? something similar to this happens when going between Rhino and Grasshopper).

fwiw, i believe i read @pascal explaining a different behavior for V6 windows… there’s now a shift-click and a ctrl-click in the osnap panel to bring up different one-shot options… something like that.

Shift-Hover is in V5 for Windows, it makes once-shots of the existing persistent snaps, and ctrl-hover gets you some of the more exotic one-shots. In V6/WIP adds a couple of exotic one-shots to the Shift-hover list - Between and Percent. I’m not sure what I said before, but I’m sticking to this one.


1 Like

thanks for clarifying.
what does Percent do?

Hi Jeff - with Percent, you pick a curve and enter a % (default =25) and the curve is temporarily marked off with snappable points at multiples of the requested %. The sequence starts at the picked end of the curve, which of course matters if the number does not fit cleanly into 100.
(btw, it is in V5 and probably there on the mac (can’t test now) as PercentageSnap. Just not discoverable… which reminds me I can add a macro and button for V6, I don’t think we have one yet.)

1 Like

what? cool.
i’m pretty sure i’ll make use of that one.

nice! it’s there (on mac)

making an alias for this now… thanks