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.

How to Query World Axes

marena_richardsonmarena_richardson Member Posts: 20 EDU
I am trying to rotate a part 90 degrees around standard world coordinate system axes (x, y, z). I know how to use opTransform and rotationAround to do that, but I am not sure how to query for the world axes. 

Comments

  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    edited January 2016
    The world axes aren't created as entities in a default part studio – just the origin and the default planes. However, if I understand what you're asking correctly, you don't need to create an axis entity.

    rotationAround() takes in a Line object, which can be constructed from just data. You can make a rotation around the x axis like so:
    var xAxis is Line = line(vector(0, 0, 0) * inch, vector(1, 0, 0));
    var transform is Transform = rotationAround(xAxis, 90 * degree);


  • marena_richardsonmarena_richardson Member Posts: 20 EDU
    Yep, that's what I was asking. Thanks!
Sign In or Register to comment.