algorithmic modeling for Rhino
Normally expressions are applied after the data is collected (and converted to whatever the local type is). If you want to use Format() you might want that to be applied before the number becomes a string no?
Then, it's also possible to perform some sort of string operation (say, convert to upper case), in which case you want the breps to be converted to strings before the expression is executed.
How to solve this conflict?
--
David Rutten
david@mcneel.com
Poprad, Slovakia
the problem is always more complex than I imagined. Would it be terribly difficult to evaluate the expression on the native data type first, within a try-catch block, where the catch then .ToString()s the data before trying the evaluation a second time? is that super inefficient?
It's not inefficient so much, but it is ambiguous. What if the expression works before and after?
A possible solution is to not allow an expression as such, but just a formatting rule and always apply it before the data is converted to string.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2025 Created by Scott Davidson.
Powered by