Why doesn't grasshopper shatter at the specified point?

I have this simple curve and I’m trying to split it at the point. The problem is that when I’m using the shatter command it doesn’t actually split it at the point, but at some other random point near it. Any suggestions or alternatives on how to do this would be appreciated
Shatter problem.gh (17.6 KB)
.

shatter wants a parameter t as a number, you’re feeding it point coordinates that get translated to numbers (not the same thing)

don’t know what is your final goal with this definition, but correcting those t parameters is for sure an important thing to do :slight_smile:

for instance here, if you want to shatter curve A based on the point in B:

you can use CurveClosestPoint to find the parameter of the closest point to B along A:

note that the lengths of the shattered curves is different :+1:

similar thing happens here:

Thank you very much, this was exactly what I was looking for.
Could I just ask you why was it splitting it at a different point then, and not just translating directly the point I was connecting?

I think a 3D point cast as number returns the distance between the point itself and the Origin

that distance is a numberic value, so it’s accepted as t paramenter (any number is accepted as t parameter as long as it stays in the domain of the curve)
the thing is, the distance between that point and the origin is probably not the t parameter at which you want to split your curve :slight_smile:

here are two wonderful readings on the topic by David Rutten (who happens to be the creator of Grasshopper :+1: )

1 Like