Grasshopper

algorithmic modeling for Rhino

Hello.

I'm using GH to tag the length of a series of lines. So far it works but my problem is that i will like to limit the number of digits after the dot:
Ex: curve N (length : 1.34m), length dispalyed by the tag component: 1.34578728. I just want to round the total length.

Any ideas on how to do this

Thank you all

Views: 599

Attachments:

Replies to This Discussion

Feed the list of lengths to an expression component and use one of the following expressions:

format("{0:0.00} m",x)
or
round(x,2)& " m"
thank you works perfectly
I usually do this by feeding the number into an expression such as int(N*100)/100 which is two decimal places

but the format() function seems much cooler

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service