Curve.Split(IEnumerable<double>) RH5-6 behavior change


Hey there,
the following code works differently in R5 than in R6, for a closed curve:

private void RunScript(Curve C, double t, ref object A)
   Print(C.Domain.ToString()); //returns: 0.249, 1.249
   A = C.Split(new double[]{0,t}); //returns one curve in R6, two in R5.

in R6 I can fix it by replacing 0 with C.Domain.T0, but it has been a change that has ruined at least one of my tools. Anyway, I just wanted to report it.

Does anyone know the reason for this change? It seems to be something underlying related to the domain of the curve but I would like to know why, because it seems to have consequences on other sides.


Curve.Split() (7.3 KB)

(Dale Fugier) #2

Hi @Dani_Abalde,

In your example, the hard-coded parameter value of 0 does not fall within the curve’s domain, which is [0.249, 1.249].

– Dale


I know, but works in R5…

(Dale Fugier) #4

I know, but this was a bug in R5…