algorithmic modeling for Rhino
The double click popup window for inserting components accepts a number of different input formats. If you provide a plain component name (or the abbreviation or a word used in the description) then you will see a list of potential matches, sorted from most relevant to least relevant:
Some components and objects support initialisation codes, which means you can assign certain values directly from the popup box. You can do this by adding an equals symbol after the name and then the value you wish to assign. For example, the [Curve Offset] component allows you to specify the offset distance via the popup box by typing =5 after the offset command:
However the popup box also supports a set of special formats that allow you to create specific objects without even typing their names. As of 0.9.0077 (which hasn't been released yet at the time of writing) you can use the following shortcuts to create special objects. In the notation below optional parts of a format will be surrounded by square brackets and hashes (#) will be used to indicate numeric values. So #,#[,#] means;
at least two numeric values separated by a comma, with an optional second comma and third number.
A complete list of special formats (not all of these are supported yet in 0.9.0076):
Note that decimal places will be harvested from formats that indicate sliders. I.e. the format 0..2..10 is not the same as 0..2..10.00, as the former will create an integer slider from zero to ten whereas the latter will create a floating point slider with two decimal places from zero to ten.
Thanks for this! May I request that this become the official Popup shortcut thread? Can we add to this all of the slider shortcuts and anything else that might exist?
Absolutely, better to have it all in one place. I just added three more shortcuts I just implemented (<, > and =) and also added some information about slider decimal places. Any further changes to the popup shortcuts will be included here.
What would it look like?
would it not be something like:
Exp=contains(x,y) or !=contains(x,y)
where the exclamation mark is expressive.... get it? :)
you would have to handle a second '=' for situations like:
It's sort of difficult to figure out which bits of text represent variables, and even then the input order will probably be just the order in which the variables first appear, which may not be desirable. Since it's annoying to 'swap' two inputs, it would be great if this could be defined directly as well.
How about the following notation:
f(x, y) = x^2 + sin(y)
The 'f(*) = ' pattern tells me an expression is called for, the contents in between the brackets tell me which variables will be inputs and in what order they should appear, and everything after the first equals sign will become the expression proper.
And of course this would also allow you to fairly quickly set up just the inputs, if you want to omit the expression at first:
f(x, y, t)
that actually seems mathematically quite coherent. I for one will surely appreciate it.
excelent. thanks David
Along the same lines can Merge and Entwine have a bracketed value for the number of inputs. e.g.
Entwine(5) gives an new Entwine component with 5 inputs. And similarly Entwine(2) would reduce the the number from the default.
EDIT: I suppose it could be Entwine=5 or Entwine=2