algorithmic modeling for Rhino
<empty> means you have a string (text) there with no characters. Basically "".
You can remove these like you would remove any arbitrary piece of data, using culling operations. You can use the String Length component to find all zero-length strings, then cull them accordingly.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
David
I am trying to do this:
"If you want to remove specific values from a tree, you should create a cull pattern that is FALSE for those values and TRUE for everything else. In this particular case it should be easy, because when you feed ZERO into a boolean parameter it is automatically converted to FALSE, and anything else is converted to TRUE."
but I am not sure how to feed the "P" value for the cull pattern.
Should I feed it with a expresion?
Thanks!
Should I feed it with a expresion?
Yes and No. You need to generate a culling pattern of Booleans i.e. 0's and 1's or TRUE and FALSES
To generate this pattern you can either use [Equality], [Similarity], [Larger Than] or [Smaller Than] etc. see below for example. Say you wanted to cull everything that was not greater than 0 (-ve)
Of you can add an more complicated expression with the Fx component
I could really use a "cull if null" button on the output rightclick menu of components. Not sure if it is a general enough request, though.
although this topic is rather old, here is my way since it took me some time to realize that:
you can just use "text length" and "cull pattern" as David already mentioned. Although Cull Pattern works with Bolleans (True and False) you can also input numbers - everything with the value of 0 will be taken as False and all other numbers will be taken as True.
This means every data with at least a String (or Text) length of 1 will stay while all empty data will be removed.
and 5 years later :) Thank you for this one .)
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
© 2024 Created by Scott Davidson. Powered by