Shatter at Curve ends with set dimension

Shatter (10.8 KB)

This might have come across in the forum. I am trying to shatter a set dimension at curve ends. Currently, I don’t get uniform division. I do aware when curves might not be able to achieve a set dimension. Can someone give me a suggestion.
Thank you, E

If your curves contain curvy portions, applying the same curve parameter does not necessarily yield the same length.
In this case, If you’d like to get some dashed lines, it would be better to use Extend Curve.

Shatter (17.0 KB)

Or try to use Evalute Length.

Shatter (16.9 KB)

1 Like

Check this as well.

Shatter (16.2 KB)

1 Like

Thank you both.

Further from my previous conversation. I finding strange Data Tree happening.

This script is cropped of my whole script. Thanks to HS_Kim and Jakinta.

I am facing a strange data tree when the curve division length is large than the given curve. Data tree is not simplifying even if I used simplify command.
Can you advise please.Shatter Question Data|attachment (11.8 KB)

Your curve parameters are empty.

Sorry, I am not clear.

I want to perform the script both by chance shorter curve length than given dimension and for longer curves. these data tree output messing up in further script.

You can try with Suirify instead.

As @HS_Kim said, you didn’t internalize your curve params:

It’s also saved as R6 so is missing Subtraction in R5.

“Simplify” is not the answer to most GH problems.

It’s also saved as R6 so is missing Subtractionin R5.

R6 has been out for over a year, might be time to update if you would like to help more on the forum. More than likely the people asking this level of question are new users with a new Rhino since it is the Rhino available to purchase / trial currently.

I’m well aware of that deliberate abandonment of R5 users @Michael_Pryor, thanks anyway for the advice. For various reasons, I decided not to pay for the privilege of debugging Grasshopper R6 and providing customer support on this forum.

Apologies, Didn’t realise it wasn’t internalise. Attaching again script.
Shatter Question Data|attachment (17.1 KB)

Suirify works thankyou Jakinta, but I like to understand the cause without Suirify.
Thankyou, E

I’ve studied your code and see what it’s doing but am not so sure about your objective?

  1. First, you Shatter the curve based on DivLength. Do you realize that may result in more than two curves? And that the last curve will usually be shorter than all the others because it’s the “remainder” of what’s left of the original curve after dividing it by “Length”?
  2. Second, you subtract ‘Offset’ from the length of the curve pieces from step 1. In some cases, the offset can be larger than the length of the last fragment, which results in a negative number.

The GH code works exactly as expected. GIGO.

Why so far from the origin?

Shatter Question Data|attachment (19.3 KB)

Thank you Joseph for your points. I will try to do ‘check step’ before hand. Helpful.
In terms of origin due to couple of reason, I should have share base script near to origin.
Regards, E