Same parameters, different curves

Hello all,

I am working on a new project and I noticed something interesting when working with arcs and I was wondering if anyone else can see the same issue or might know what it is caused by?

When I create a bi-arc or a catenary and deconstruct the midpoint I find that I get different z values and though the values are only slightly different I’m wondering what could be causing this if all the parameters are Identical?

My next step would be to scale the geometry up - but if they are slightly different values, they will potentially have a bigger deviation further down the code

Thank you,


Odd (9.4 KB)

Precision and floating point error.

You can change the amount of decimals in grasshoppers settings. File>Preferences>Display.

For instance change it to 2 and you can get.

However this will still give you issues with components like equality which use the actual numbers.

Which is why you should always check things like equality between numbers with a tolerance. You can see ways to do that here: EQUALS component not working

Side note, you don’t need to reparameterize the curves. Point on curve already uses normalized length.

1 Like

I see, I’m guessing the precision in grasshopper is controlled by the document options in Rhino?(Thank you for pre-empting my question)

And yes thank you, I thought as much - I was seeing if it would make a difference to the z values. It seems odd that the length is coming out the same even when displayed to 6dp but not the mid point