Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. 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.

Inverse Tangent

Chad_FortuneChad_Fortune Member Posts: 6 PRO
I see Inverse Tangent "atan()" exposed inside FeatureScript documentation, but when I try to use it in a Part Studio I get errors. I created a Featurescript to be able to use the inverse tangent to pull the answer out. Inverse tangent is a pretty commonly used in trig and the workaround is a backwards way of getting an answer.

On a side note, atanh and tanh functions are shown under Math: math, but the atan, asin, and acos functions are under Math: units. Other trig functions are located under both tags.

Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,212
    Without specific errors, I can't be sure, but the reason is probably that atan returns an angle, not a number.  That is also the reason for the difference in which FS module they are located in.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • john_mcclaryjohn_mcclary Member, Developers Posts: 3,936 PRO
    OnShape in very picky about it's units.

    try throwing a '/ degree' at the end of atan if you just want a unitless number, and make sure you add '* degree' where degrees are required for input.

    I've had a similar problem in an equation, here is what my result looked like in the end to clear all the errors:
    atan(((DeltaY_90 / Shingles_Per_90)- .3125) / (sin(90 * degree / Shingles_Per_90) * (Outside_Dia / 2))) / degree;

    Hope that helps
  • Chad_FortuneChad_Fortune Member Posts: 6 PRO
    Thanks John, I'm still getting used to having to add those.
Sign In or Register to comment.