Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
List of Math Operations
michael_mcdonald047
Member Posts: 23 ✭✭
Is there a list of valid math expressions and operation such as cos( ), log( ), abs( ), etcetera?
Tagged:
0
Best Answer
-
abefeldman Member Posts: 166 ✭✭✭Also check out https://cad.onshape.com/help/#numeric-fields.htm and expand the "Accepted unit keywords" field.Abe Feldman
UX/PD/Community Support5
Answers
UX/PD/Community Support
https://forum.onshape.com/discussion/7128/a-few-expression-tips#latest
Twitter: @onshapetricks & @babart1977
AdivB = (A/B>= 0) ? floor(A/B) : ceil(A/B)
Had a quick look at the Feature Script documentation but not sure which part is relevant.
Found the following but can't see a square function anywhere.
https://www.onshape.com/en/resource-center/tech-tips/tech-tip-using-numeric-fields
You can divide by mm in your expression to cancel the units ((#rise/mm)*(#rise/mm)) which will give you a numerical value, that will get interpreted as a linear dimension (a "length") which is what the Pattern is looking for.
You could also change your Variables to be unitless - then this wouldn't be an issue.
Hope that helps!