04 Selecting Items in Data Trees

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the last thing I want to show is something which is not new but it's better since the last since the developed yet released version it is a way to select items from a tree so if we have all of these items and let's just remind yourself that we want that we have a list here at 0 0 0 we have photos at the end as well which is at at path 0 1 2 3 4 5 6 5 8 then of course in between we have 0 0 1 0 0 2 0 0 3 and so on furthermore within these lists we have items which have an index so the argument index 4 can be identified as 0 0 8 4 and the item metal index 9 give me the 5 s 0 0 o 0 0 0 oh dear 0 0 0 right so what if we're going to take from this tree a specific set of points right say that we want to select only the points that have that are part of of the even tree so the first three zero two four and sorry I mean all the way up here so we will ignore all the trees which are sort of odd local sorry all the branches which are odd in between the even branches we can create a as a piece of text which represents a selection logic for items in the tree and we can use a piece of text and a split tree component split tree component to actually apply best selection pattern to a whole tree I am going to once again go back to two grids here to make it a bit more complicated okay let's increase the number star a bit okay and I will also simplify this tree so it isn't there are too many zeroes which you don't care about so listen I shall look at the tree we have this point it has no we're done on zeros it has a bunch of past let's represent the first grid and a bunch of paths the facets represent the second grid starting with one so we want to select all the items in in this branch and this branch and this branch and this branch and this branch and then again as well 40 second tree works like all the items in the first the third and fifth and so on and so forth so we can write this again using a text panel to generate a list we can say well please like everything in 0 record 0 and this operation actually picked everything in the first branch because that's the only one that actually matches this particular pattern I can go and say well I'd love to like to have all the items in 0 from a 2 and out and 0 comma 4 and 0 comma 6 and then you can see how to slowly grows over here and I can in fact let's let's just write a full pattern so we get a good sense of how much time we're wasting by packing it all my hand what for one point six and one point eight okay this these are ten patterns which select all the columns in e-cigarettes which are even or fall to putting depending on how you will look at it this is a lot of typing we can we can represent this logic cleaner by using the options we have for for a selection notation or splitting notation for example I can go in here and say well it's either 0 or 1 and they're all the same so in fact I will allow both 0 & 1 up here so it's always 0 come on 1 because both numbers are allowed flaking out the lead the second half of my of my patterns ah it works the same way same result fewer patterns but I prefer to here to use those brackets to say well please only it doesn't matter functionally it works in the same way but but uh visually it more clearly defines which bits belong together and which push it up which weights it don't 0 or 1 if we add a third way to this so if I pick 3 planes while 9 is 2 and let's say 1 over here it doesn't work because the third grade is at index 2 right it's it has a new number here and we're not we're not allowing 2 so I could go in here and say well allow 4 comma 2 as well but if this is my logic I can say please allow all the possible paths all the possible numbers at the first index the question mark means any single number is allowed to be used in the first first location and now know many how many no matter how many grids I have it'll always work because this number just goes up and up and up and it will always be true because it's always a single number and we don't care about we can also simplify the second number instead of having five different paths we can say well right before I can write a list it says well it's either 0 or 2 or 4 or 6 or 8 and again we have the same result it's the same thing and as before if we make this grit bigger if we start adding columns they will be omitted because they are beyond the number 8 right 8 was the highest number we had before and now we have to go back in and say well it's actually 8 and 10 and then 12 and 14 if you make a bit bigger and bigger and bigger so this is also very very annoying to do it by hand we can use a synchronization say well it's 0 2 and then sort of it implies an infinite sequence of those two numbers so what typing 0 & 2 we can make X because you won't be going all the way to hundred and this selection scheme works works all the way down to the highest numbers you want and I think it's this one which is slowing me down yes okay and let me delete the last plane here it's a bit annoying so this better means select all the items which are in a branch which has any number at the start with and then any number in a sequence 0 2 4 8 6 8 to infinity in a second bit and it actually allows us to and what one of the things is does this component outputs a positive and a negative result and in positive you find all of all the items which which accept which pass this is test and the negative year-old items which which fail is test so in fact you have here all the items which didn't pass end up in this tree here the loans and data end up in this tree here there's fewer because we have one more column to implement out is we have 1 2 3 4 5 columns that we're taking they were accepting we only have 1 2 3 4 bit omitting so this tree is in fact a bit shorter industry because it has fewer items in it I can see questions going past a given moment to learn them yeah so there's a question about the square brackets notation the latest version which was released a few days ago or zero point nine zero zero six two it doesn't quite support secret annotation and it doesn't support brackets square brackets everywhere either I'm currently using own I know 63
Info
Channel: Grasshopper 3D
Views: 30,149
Rating: 4.9487181 out of 5
Keywords: Grasshopper Tutorial, Video tutorial, Rutten, Grasshopper, Rhino3D, CAD, GH3D
Id: q_MFx9-WO90
Channel Id: undefined
Length: 10min 40sec (640 seconds)
Published: Fri Nov 22 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.