ocessed once Grasshopper is done with whatever it's doing now.
3) Grasshopper tells the Slider object that the mouse moved and the slider works out the new value as implied by the new cursor position.
4) The slider then expires itself and its dependencies ([VB Step 1] in this case, but there can be any number of dependent objects).
5) When [VB Step 1] is expired by the slider, it will in turn expire its dependencies (VB Step 2), and so on, recursively until all indirect dependencies of the slider have been expired.
6) When the expiration shockwave has subsided, runtime control is returned to the slider object, which tells the parent document that stuff has changed and that a new solution is much sought after.
7) The Document class then iterates over all its objects (they are stored in View order, not from left to right), solving each one in turn. (Assuming the object needs solving, but since in your example ALL objects will be expired by a slider change, I shall assume that here).
8) It's hard to tell which object will get triggered first. You'd have to superimpose them in order to see which one is visually the bottom-most object, but let's assume for purposes of completeness that it's the [VB Step 1] object which is solved first.
9) [VB Step 1] is triggered by the document, which causes it to collect all the input data.
10) The input parameter [x] is asked to collect all its data, which in turn will trigger the Slider to solve itself (it got expired in step 4 remember?). This is not a tricky operation, it merely copies the slider value into the slider data structure and shouts "DONE!".
11) [x] then collects the number, stores it into its own data structure and returns priority to the [VB Step 1] object.
12) [VB Step 1] now has sufficient data to get started, so it will trigger the script inside of it. When the script completes, the component is all ready and it will tell the parent document it can move on to the next object (the iteration loop from step 7).
13) Let us assume that the slider object is next on the list, but since it has already been solved (it was solved because [VB Step 1] needed the value) it can be skipped right away, which leaves us with the last object in the document which is still unsolved.
14) [VB Step 2] will be triggered by the document in very much the same way as [VB Step 1] was triggered in step 9. It will also start by collecting all input data.
15) Since all the input data for [VB Step 2] is either defined locally or provided by an object which has already been solved, this process is now swift and simple.
16) Upon collecting all data and running the user script, the component will surrender priority and the document becomes active again.
17) The document triggers a redraw of the Grasshopper Canvas and the Rhino viewports and then surrenders priority again and so on and so forth all the way up the hierarchy until Grasshopper becomes idle again.
[end boring]
Pretty involved for a small 3-component setup, but there you have it.
To answer somewhat more directly your questions:
- The order in which objects are solved is the same as the order in which they are drawn. This is only the case at present, this behaviour may change in the future.
- Adding a delay will not solve anything, since the execution of all components is serial, not parallel. Adding a delay simply means putting everything on hold for N milliseconds.
- [VB Step 1] MUST be solved prior to [VB Step 2] because otherwise there'd be no data to travel from [GO] to [Activate]. The only tricky part here is that sometimes [VB Step 1] will be solved as part of the process of [VB Step 2], while at other times it may be solved purely on its own merits. This should not make a difference to you as it does not affect the order in which your scripts are called.
--
The Man from Scene 24…
Added by David Rutten at 4:43pm on December 10, 2009
segments (ie. polylines)
2 = conic section (ie. arcs, circles, ellipses, parabolas, hyperbolas)
3 = standard freeform curve
5 = smoother freeform curve
The higher the degree, the less effect a single control-point has on the curve, but the further that weak effect reaches. Degree=5 curves are smoother, but it's also harder to add local details to it without adding a lot of control points. Rhino supports curves up to degree=11, but you almost never need more than 5.…
nent is the empty parameter component that will reference a curve. In this case it is used only so that I could disable the preview of the ellipse that includes the rather largish and distracting origin plane. I am not sure where the right half of the definition begins so I best start early.
Ellipse and its foci are all move Y-ward.
The moved ellipse is then moved z-ward.
Since I have moved the ellipse as well as its two foci, I need to have access to both the ellipse and these two points.
Exiting from the series component will be the numbers 1 and 2 that indicate the two focal points of the ellipse.
Now lines can be drawn between the original ellipse and the moved ellipse.
These lines are divided.
At this point the structure of the data is such that connecting a line only replicate the two lines already drawn since it will connect two rows of 11 points in this case. What is needed is an arrangement of 11 rows of 2 points (the parameter viewer is a reliable friend). To do this, I could have used the Path mapper, but now David has given us the Flip Matrix component that does this with ease.
Now a polyline will produce the rung-like lines connecting the points on each line.
I hope this makes sense and does not seem overly pedantic.…
Added by Robin Dripps at 9:04pm on September 19, 2010
your case), then subtract one and select the item at that index. Remember that items in lists are accessed using a zero-based system, so the first item is at index 0, the second item at index 1 and so on.
It's easier however to cheat and use an index of -1 and make sure Wrap is set to True. This will allow you to select the last item in a list without measuring the length of the list first. If you use -2 you'll select the second to last item, and so on and so forth.
--
David Rutten
david@mcneel.com
Tirol, Austria…
Added by David Rutten at 12:29pm on August 30, 2013
re-organized code, the preview at "(1)" is static, before the simulation; it is hidden to see the simulation. The preview at "(2)" is the simulation, which traces each tool path and then reveals each one piped.
…
Added by Joseph Oster at 5:56pm on November 1, 2017
Mmm really nice post. Usually light electronic Trip Hop, or spanish Hip-Hop.
Portishead
Radiohead
Massive Attack
Propellerhead
SFDK
Juaninacka
Tote King
Best Regards ;)
h 11 returns two values, and the lists with 10 and 6 return one. In any case, I changed the logic a bit.
Check it out in the other vb component. The idea is just to check if the list is odd or even first with the Mod operator. If the lsit is odd, return the middle item in the list as you have set it up. If the list is even, return the mid items also in the same way as you have set it up. I am attaching the edited .gh file, a Class1.cs file which shows in C# how I set up the component (translated vb code will follow), and the .gha I built from it.
The logic should be a bit easier to follow in this version. Check out the edited vb component in the definition for a 'translated version.'
Apologies for the C# ness...I currently do not have Visual Studio Express installed, just Visual C# express. This one is converting just fine to:
Dim list As New List(Of Object)()Dim out_v As New List(Of Object)()Dim out_i As New List(Of Integer)()If Not DA.GetDataList(0, list) Then ReturnEnd IfDim val As Object = list(Convert.ToInt32(Math.Floor(Convert.ToDouble(list.Count / 2))))Dim i As Integer = Convert.ToInt32(Math.Floor(Convert.ToDouble(list.Count / 2)))If (list.Count Mod 2) Then out_v.Add(val) out_i.Add(i)Else out_v.Add(val) out_i.Add(i) out_v.Add(list(i + 1)) out_i.Add(i + 1)End IfDA.SetDataList(0, out_v)DA.SetDataList(1, out_i)…
Added by Luis Fraguada at 11:43am on September 2, 2011
nd range component), then feed that into a list item component. In this case, 2 curves were referenced in from rhino into the same curve parameter.
When those are fed into a divide curve component, the data is structured into 2 separate data branches, (one for each line). so we end up with a list of points that lhas a data structure like this:
{0;0} N=11
{0;1} N=11
The series component defines the range of items I want to retrieve. By feeding the list of points into a list item, then using the series of numbers as the items to retrieve, you get the corresponding items out of both branches of data. The explode tree component separates the branches, (list of points for each curve), then connect them!
Hope that helps with an understanding of one possible approach!
…
ber of mesh vertices is defined as (precision_+1)^2.So if you would like to have its beam, diffuse and ground-reflected components as well, that means 3 * 8760 values per single point.Example: if you set your precision_ input to 20, the number of values would be a couple of millions:
(20+1)^2 * 8760 * 3 = 11 589 480 hourly values
Check the attached definition below. The outputs that you need are: "Ebeam", "Ediffuse", "Eground".They contain annual hourly values for each tilt and azimuth combination (that's what upper mesh vertices represent) in a data tree.…