Material Selector's F.A.Q
How to use the formulas entry
The formulas are calculated thanks to the eval function. By doing this you can directly use javascript object methods and constants.
Math.PI // Returns PI Math.sqrt(x) // Returns the square root of x Math.exp(x) // Returns the exponential of x Math.pow(x,n) // Returns x power n Math.sin(x) Math.cos(x) etc..
It is also possible of using ^ for powers, Ex: Ro / ( E^0.5 ), but you must be careful because sometimes doesn't works without extra parenthesis Ex: Ro / E^0.5
Criteria Values
- When a formula can not be evaluated the criteria will display -1.
- When values have a range (Ex: 150 ~ 250) you can choose between using the minimum, the median or the maximum value thanks to the check-boxes "On values range choose".
Importing and Modifying Data
It is possible add or to modify the exiting data by using the Browse button. The Browse button will allow you to load your own CSV files, the materials will be then added or will overwrite the existing materials in case the material name already exists.
CSV files rules & comments:
- Each material must be separated by a new line.
- The column separator must be | .
- Float numbers use a . . Numbers that could not be read will be replaced by ?
- Range values use ~ as separator, and only the first two values will be read by the code.
- Only rows containing at least 3 columns will be imported.
- When exporting to CSV files often " are proposed as text delimiter. Leave empty this option.
- The file must contain materials only (do not add the headers!).
If you want to take a look to an example just look to the server files at the Exporting Data question.
Exporting Data
- You can select the values from the materials table and copy-pasteit in softwares like LibreOffice Calc
- If you want to download the files used by the server here are the links: Aluminium, Steel, Plastic, Extras.
Debugging data
The best way to check if the data is correctly read is by using the Calculate Criteria button. Thanks to this button you can make simple tests like just entering the Young Modulu's E and checking if you have the same value in the criteria.
Normally you shouldn't need to debug the csv files, but it may be useful when importing csv files with problems.