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.

Discrpencies in documentation related to using acos, atan and other trignometric functions

atharva_patwardhanatharva_patwardhan Member, Developers Posts: 1
acos, atan and other trigonometric functions return results in radians and not degrees while I was using feature script, though the documentation mentions otherwise

Documentation Link : https://cad.onshape.com/FsDoc/library.html#module-units.fs 


Comments

  • konstantin_shiriazdanovkonstantin_shiriazdanov Member Posts: 1,221 ✭✭✭✭✭
    edited December 2018
    30*degree in Onshape is a value in radians because internally degree=pi/180*radian. so "degree" is just built in constant which is used to translate angular values from derees to radians
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,310
    edited December 2018
    It is correct. All units in Onshape are in meters and radians.  Therefore you will have to convert it to degrees if that is the units you want. It is shown in the docs as 90 * degree (which is the syntax you use to define a degree value) because that is easier to understand than PI / 2 radians.

    Sorry for the confusion.
    Senior Director, Technical Services, EMEAI
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,174
    The arc trig functions don't return values in degrees or radians -- they return *angles*.  They are internally represented in radians, yes, but that should only matter for printing it, doing crazy optimization, worrying about floating-point roundoff error, or not making the best use of the units system.  Most frequently the latter.  Things you can do with angles are adding them together, multiplying by numbers, comparing to other angles, dividing them by each other to get numbers, passing them to trig functions and receiving them from inverse trig functions.  You can also pass them to operations like opRevolve.  It doesn't matter if the underlying units are radians or degrees for any of those things and there's almost nothing else people generally want to do with angles.
    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    @atharva_patwardhan

    If you really need the number of degrees represented by your angle you can do something like the following:


    But like Ilya said, you really only need to do this if you are trying to print output to the user.  Otherwise, you can just leave it as it's ValueWithUnits (angle) representation, and it will remain useful for math, trig function, and input into Onshape operations.
    Jake Rosenfeld - Modeling Team
Sign In or Register to comment.