Shatter curve fails - parameters outside domain for closed curve

I’m trying to shatter curves by known parameters, this works fine for open curves but not for the closed curve in the set of curves.

So I then decided to reparameterise the curve and change the domain (the domain wasn’t based on the length of the curve), but this doesn’t actually change the curve’s domain:


Since I am using the actual length parameter for shattering this proves to be a problem:

I also included a check to make sure that the parameters for the curve are in the domain: 0 to Curve length, but since its domain is not to length, I’m not sure what else to do.

Shatter curve fails.gh (20.2 KB)

Okay, converting parameters to length using Length parameter and evaluate length almost does the trick, still figuring out why it fails.

Shatter curve fails.gh (20.7 KB)

Are those millimeters?
Why are you drawing 29 kilmeters away from the origin?
Some intersections might fail just because you are too far from the origin… numbers rounding and such…


Also, please attach a .gh definition that have the steps before of what you attached…

It’s a sample file one of the devs sent me, I just used it as base and I know it’s far away from the origin. I thought I moved it to the centre, but that may have been in a different file. And it’s in mm indeed.

It’ll be too long and hard to understand. If anything is unclear, please let me know and I’ll make sure to add it.


Shatter curve fails.gh (20.2 KB)

1 Like

@maje90 Thanks, that’s an elegant solution!

Another solution is to split the open from the closed curves and use a combination of the methods I posted earlier (one for the closed and one for the open curves). Open curves have domains that are equal to their length, which means parameters values can be used, whereas closed curves require a translation from parameters to length values.