Problems related to Curve.SplitByParameter

Dear all

I’m using Curve.SplitByParameter and I’ve encountered the following inconvenience . I have two questions about Curve.SplitByParameter. Please let me know if you know anything about it.

[Situations]

image

(Figure1)
Using Curve.SplitByParameter, PolyCurve(A) was split. As a result, it was split into two Curves (B1, B2).
However, when the two divided curves were put together, they did not match the shape of the PolyCurve before the division. A part of the curve behind the specified parameter is missing.

(Figure2)
I thought it was a bug, so I examined Curve.SplitByParameter using simple data, and found the following problem caused by the scale setting.

(Figure3)
When the scale was set to something other than extra large, there seemed to be no problem.
However, when the scale was set to extra-large, it happened that it was not split correctly.

[questions]

Please let me know the possible causes and solutions for the following two events that I found.

・Curve.SplitByParameter may not split well depending on the data.

・One of the causes seems to be the scale setting, but it does not seem to be the only cause.

I would be very grateful if you could tell me about it. Thanks in advance.

The geometry scaling is the cause. When you split the curve, the resulting data (curves) have to be defined from the remaining values. If the start point and the end point are too close, the geometry scaling will toss the curve as you’re effectively producing a non- curve with the end points and all intermediate values are the same as the precision behind the decimal is lost - that is instead of drawing a line from (0.1,0) to (0,0.2) you are drawing a line from (0,0) to (0,0). Working in Medium or large scaling should resolve the issue.

1 Like

Thank you for your prompt reply. I now understand that the scale setting can solve this problem.

However, I am afraid I have an additional question.
I tried to change the scale setting to Medium as shown in the attached Dynamo file, but the problem persists.
I would appreciate it if you could open the Dynamo file and check it.

If you know of any possible causes other than the scale setting, could you please let me know?

Thank you again for your help.

curve_splitbyparameter_medium.dyn (28.7 KB)

For me working fine as expected.

1 Like

Thanks for the answer.

I will attach a diagram of what I am having trouble with.
When I split PolyCurve(A) with Curve.SplitByParameter, I was expecting it to split as shown in the upper right of the figure.
However, in the current situation, the end of the Curve has disappeared as shown in the lower right.

Experiencing the same issue when running your script (with different scale settings). I did a trouble-shoot to see if the curve could still be created in two halves using the points provided (plus the mid-point of joined curve). The two curves can be generated so I’d deduce there is something amiss with the Split at Parameter node.

Split Curve curve_splitbyparameter_medium2.dyn (45.2 KB)

1 Like

Try split by points. You can pull the points using the same parameters you would split by.

1 Like

Some workaround:

Nurbscurve works as expected.

1 Like

@JacobSmall i tried like this same result. i mean not as expected by @stamura

1 Like

Dear all,

Thanks so much for sharing your solution!
My question has been answered.
I will be incorporating solution of Andy_Grout into my work this time!

Once again, thank you all for your kindness.