Formula Parameters
Last updated
Last updated
Formula Parameters are used to calculate properties of Rhino geometry based on their Geometry Parameters: Area and Length. Formula Parameters can be used in combination with Number Parameters.
To create a new Formula Parameter go to the Create Parameter panel and then click on New, for example, call this parameter CostArea. In the Function tab introduce this formula: "Area*Cost". In this case, Area and Cost refer to the Area and Cost Parameters that were created before (Area is a Geometry Parameter that measures the area of Rhino geometries and Cost is a Number Parameter that you can manually modify). Be aware that you need to introduce in the formula the names of these parameters in the same format that they were created. Once you are done click on Save. If you click on Close your Formula Parameter will not be created. Now select the Rhino objects where you want to assign the parameter and click on Assign and select the corresponding parameter, CostArea in this case. Do not forget to click on Save to complete this action.
The CostArea Parameter will calculate the product of multiplying the Area Parameter (Geometry) by the Cost Parameter (Number). This value can be modified just by changing the value of the Cost Parameter.
If you select several objects that have been assigned Formula Parameters, Metrics will give you automatically the total value of that Formula Parameter for the objects that you have selected. Be aware, that if some of those objects have value equal to 0, the total value will still be calculated.
If some of the objects that have been assigned a Formula Parameter, do not have also assigned one of the parameters included in the formula, Area or Cost in this case, the result in the Parameters Panel will be "NaN".