algorithmic modeling for Rhino
Something like where I can put in a Formula.
Example: A Text Panel shows eather "true" or "false".
If it shows true nothing happens,
but when it shows false it has to choose a number of a range i defined,
till it shows true (he´d have to try all the numbers in the range than, until it´s true [in reference to the rules i created])
SUM
Tags:
Hi Sum,
the expression parser has a function called If(), you can do something like the following:
If(x < 10, "Small!", "Large!")
The signature for If() is:
If(condition, resultOnTrue, resultOnFalse)
condition is any expression that evaluates to a boolean. If condition is True, then the first result is returned, otherwise the other result is returned.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I want to do a connection betwenn the slider of the maxBuilding hight and the expression channels "true" (and they have to be true). Becouse of that I need something that automatically controlls my max building hight (so that the panels show me "true")
I send you a screenshot and the GH + Rhino file.
I would be very glad if you could help me with that.
Seems that Im completely in my work, sothat I cant explain anything bout it to anybody else any more.
Lets make it clear(er)!
I have a couple of randome lines on a survace witch represent building axes.
Along these axes I extruded buildings with an implementation (with contole the actual building hight on control points depending on the max exposure angle and distance of building to eatch other (and the hight of the building parts next to them)).
All of this is an urban study for the dense in a city (depending on FAR(Floor area ratio), the maximum exposure angle and the maximum building depth).
Theses three things are controlled by sliders (couse the GH file must be useable for every building site).
What I want now is that the maximum building hight (at the moment controlled by a slider too and depending on what the FAR, building depth, the exposure and how many lines (buildings) there are say --> the panels only say "true" if all these parameters work perfectly together) is contolled automatically depending on what the control panel says (true or false).
In clearer words, I want to replace the slider by an implementation which reacts on true or false (of the panel at the end of the implementatino (see screenshot above). If it says true all good. But if it says false it has to adjust the max building hight until the panel again says true.
I hope its now more understandable.
Files are attached 1 post deeper.
Thank you!
I don't believe what you are describing is possible with ordinary components in Grasshopper. You will need to do this with a script. or maybe Galapagos.
The If statement in the expression will happily handle a condition and react accordingly, but what you require is an iterative device that will keep changing until the condition is met.
There is a possibility that you could carry out a range of options for building size and cull until the smallest condition is met, but this would be very processor intensive as every possibility (step size) in your range would need to be created and then evaluated.
Hm, tought about something like this already, but did hope for another possibility.
Can you please give me an example via screenshots if you got that time.
Thank you.
Have a look at this thread for two of the different approaches, Galapagos and Brute Force. It should set you off in the right direction, but I'm afraid that's all I can offer at the moment.
http://www.grasshopper3d.com/forum/topics/simple-min-2d-bounding-box
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by