it works is as follows:
The GH_Document has a list of objects that have scheduled a solution (or rather, it maintains a list of callback delegates those objects have registered).
It also contains a TimeSpan field, which remembers the shortest schedule.
If the ScheduleSolution method is called during a solution, the timer won't be started until the solution finishes. So the schedule doesn't control how often the solutions will occur, it controls the delay between solutions.
Let's imagine the following scenario (with insanely scaled up time spans):
At noon exactly, a new solution starts. It doesn't matter what triggered it.
While the solution is still running at 12:01, a component (A) schedules a new solution 15 minutes later. This component registers a callback delegate along with the schedule.
While the solution is still running at 12:02, another component (B) schedules a solution with a 5 minute delay. Since 5 minutes is less than 15 minutes, the document forgets about the 15 minute schedule and instead switches to a 5 minute schedule. (B) does not register a callback.
While the solution is still running at 12:03, a third component (C) schedules a solution with a 10 minute delay. 10 minutes is further into the future than 5 minutes, so the document does not accept this new schedule. (C) does however register a callback.
At 12:05, the solution finishes. The SolutionEnd event is raised, viewports and canvasses are redrawn.
Also at 12:05, the document starts a timer that will fire an event 5 minutes from now, at 12:10.
Nothing happens in this interval, and at 12:10 the schedule timer fires.
The document notices it has a list of two callbacks (registered to A and C respectively), so it invokes them. This allows (A) and (C) to perform some sort of preparation. The most common action is to expire the component that gets the callback, so it'll get included in the imminent solution.
Once the document has invoked all schedule callbacks, it starts a new solution.
Note that (A) and (C) got called back way earlier than they requested. They scheduled solutions for 15 and 10 minutes respectively, but instead got the call only 5 minutes in. They can either play ball and accept the new schedule, or they can choose to not expire themselves and instead schedule a new solution for the future.
If at point 7 instead of nothing happening, a new solution was triggered by some other event (user dragging a slider or changing a wire), all the callbacks are still handled, but now even earlier than they expected.
-----
You can always schedule a solution, which is what makes this solution more flexible than other approaches. It doesn't matter that a solution is already running. It doesn't matter that the schedule comes from another thread*.
On the other hand, schedules are annoying because the time you request is not necessarily the time you get.
Also, if you have 50 components that all want to schedule, you must pick a delay big enough so that they all manage to register their callbacks before the new solution starts. This may be tricky.
* I'm actually not 100% sure about the threadsafety, it could be that there's bugs under rare conditions.…
Added by David Rutten at 7:00am on February 11, 2015
ult, my 3dm is very large.
Another problem, when the fonction is ok, the draw in grasshopper is ok, when i bake i have only a litte part of the opération.....
If you could help me, thank you
[Edit] Here the description in the null item :
{0;0}0. Brep: brep.m_T[43047] trim is not valid. trim.m_type = seam, the edge is manifold, but brep.m_L[trim.m_li=1114].m_type is not outer.brep.m_L[1114] loop is not valid. brep.m_T[loop.m_ti[21]=43047] is not valid.brep.m_F[0] face is not valid. brep.m_L[face.m_li[1114]=1114] is not valid.ON_Brep.m_F[0] is invalid.1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. …
to do?
2) if (abs(sin(3 * pi() * ptList / ptLast)) < 0.5)
abs and sin are written with upper case letter and they are part of Math: Math.Abs(), Math.Sin()
Where is pi() coming from? It's a constant, not a function: Math.PI
3) if (ptList == A(n + 1))
Where is ptList defined?
A is of type Object, you cannot use it as a function. You've assigned the constants zero or one to A at the top of the script, how is it ever supposed to be == to ptList?
4) Zf(n) = Z(n) + 12 * A(n);
Again, Zf and Z are not defined anywhere as far as I can tell.
5) M = ptLast - n;
Where does M come from?
6) The script doesn't seem to do anything. Any values you want to output from your script back into Grasshopper have to be assigned to the A parameter, but you're only assigning to A right at the top.
Perhaps it would be better if you explained in English what you are trying to accomplish with this script.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…
Added by David Rutten at 11:39am on April 12, 2010
ipants from 12 countries to attend lectures and technical seminars furthering their understanding of digital design and fabrication in architecture. This year LaN extends the workshop with parallel intro sessions in all LAN ports–Barcelona / Boulder / Brooklyn / Bozeman (Aug 10-12). In 2009, you choose your modules.
Register Online
*please note, participants who have previously attended a LaN workshop automatically get a discount of total price.
Key Dates:
June 1, 2009: Workshop Launch - Applications Open @ 10% off price
June 19, 2009: Workshop Applications Open at 5% off
July 10, 2009: Applications open
August 7, 2009: Applications Closed
August 10-12, 2009: PHASE I - Modules [North America and Barcelona]
August 16-22, 2009: PHASE II - Modules [Barcelona @ IaaC / Institute for advanced architecture of Catalonia ]
August 24-30, 2009: PHASE III - Urban Drifts Workshop [Barcelona @ IaaC / Institute for advanced architecture of Catalonia]
*please note: all Rhino courses will be taught by a Rhino Certified Trainer
PHASE I: Aug 10-12
Phase I will be conducted in parallel in BARCELONA / BOULDER / BROOKLYN / BOZEMAN and are meant to familiarize participants with software and techniques. Phase I registration is inclusive of both module 1 & 2.
1. Rhino Introduction - 12hrs
2. RhinoFab: Rhino + Fabrication - 12hrs
PHASE II: Aug 17 - 22
Phase II modules will take place at the Institute for Advanced Architecture of Catalonia [IaaC] in Barcelona, Spain and will deal with scripting, parametric design and fabrication provided by FabLab BCN.
3. RhinoScript - 20hrs
4. Parametric Modelling in Rhino: Grasshopper - 20hrs
5. Introduction to Digital Fabrication - 20hrs
6. Machining Processes- 20hrs
PHASE III: Aug 24-30 ‘Urban Drifts’ Workshop - 40hrs
Register Online
Contact: bcn2@livearchitecture.net
More Information: http://www.livearchitecture.net…
of radius of 3, 6, 12 and 18 to randomly populate the grid.
Where each circle has a proximity distance of its own and if any circles overlap / pass in that distance they are Culled (removed).
The Proximity distances of the circles are:
3 = 6
6 = 12
12 = 18
18 = 36
I want to Randomly populate the grid with the circles so that the rules are kept.
I really cant think how to go about this further from what I have done so far.
Any help is appreciated and if you need more info please ask.
NOTE
[This relates to my university project where the distances are Meters on a grid, and the circles are the columns radius. I've added a quick sketch to try and explain the principle of what I am trying to do]…