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
right? When the dataTree is this simple its not really a problem, but when it grows and I want to be able to refer to a specific GH branch e.g. {11;320} and I need to read this specific branch in Python? How do I do this?
I know that there is the function tree.Path(x) this will give me the GH Path, but how do I figure out what x needs to be? I guess there must be a simple answer :).
Thanks Rasmus…
Added by Rasmus Holst at 1:24am on October 14, 2013
n trying to find a way of ordering within a 3D point of view according to the position of each of the geometry vertice points (meaning: ordering points from 0 to 11 from lowest to highest position). Help please? :)…
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.…
s the "Surface Populating" definition: I manage to populate my geometry over the surface, but after I bake it, I have to delete the boxes that define my components limits as well! Is there any way of populating and baking only the chosen component, without having to delete the boxes afterwards?
Secondly:
Basically: I am trying to cover a surface with two types of components [ an open one and a closed one] , which will be proliferated over my tubular surface according to the main sunlight direction.
1. I introduce the surface component.
2. I use "Divide Interval2" in order to have division into U and V.
3. i generate the target boxes [ "surfaceBox"] .
4. I use "Isotrim" ( same intervals) and "BRepArea" to find centroid of each area.
5. My "Curve" component introduces sun angle, with its "End Points".
6. I use "Vector 2Pt" to specify sun-light direction.
7. I want to measure the angle between sun-light and the surface normals, at the position of each component; after generating the centre points, I need the normals of each centre point to get the surface's points' UV, and "Evaluate" the srf at points.
8."Angle" and "Vector" components: I use them in order to evaluate the angle between the sun direction and the srf.
9. I convert this angle to degree by using a "Function" [ to see if the angle is bigger from the max.angle or not...]
10. Function "x,y" gives me boolean data.
11. Data become "Dispatch"ed...
12. Two "Morph" components , each one linked to one part of the "Dispatch" data, generate "closed" and "open" components over the srf.
The result should have been different types of components, based on the surface's curvature, diraction and sun-light direction...
I do not understand where the mistake is in this definition...
Thx in advance1
Spyros K.…
ge on top) of Sameer's definition he used:
{A;B} (i) > {A} (i)
Let's suppose that you have 5 curves selected in your definition. So you will have:
- Data with 5 Branches
- N=11 (as default value from Divide Curve)
- data structure (0;0) (0;1).....(0;4)
Here the question: WHY?? the points coming out from this Path Mapper belong to the fifth curve (and not the fourth, the third...etc.)?
Thanks a lot!…
11 number instead of 10 (0-10, 10-20, etc). Also grasshopper numbered (i've numbered it for easier view) the panels vertically starts from bottom left.
Questions:
1. How to generate correct number ranges (0-9, 10-19, etc)?
2. How to change the numbering horizontally so i could select items by row?
3. I also found out that some surface have correct U and V direction and some of the have it inverted (U in V position, vice versa). This has cause some problems in my design. is there a way grasshopper or rhino to change its U &V ?
First time posting here. sorry if there's any mistake or misunderstanding.
Thanks,
Wilson…