algorithmic modeling for Rhino
Tags:
Hi Ryan, the types Point3d and Line are structes, not classes. As such they cannot be null and you cannot tell whether a point is defined or not (because if it isn't defined, it'll just be {0,0,0}). Point and Lines can have Unset values (meaning they contain invalid numbers), but that isn't happening here.
Because you didn't post your actual file I can't say whether treating all points a single list input will be a good alternative, but you may want to consider that.
Another alternative would be to use the System.Object hint instead of Point3d. System.Object is a class and can therefore be null, and it can also contain any other type. This way you can tell whether an input is defined or not, but you lose some type-safety in the process (see attached).
Thanks David that helps!
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by