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.
Obtaining axis for 'rotationAround' function
antlu65
Member Posts: 55 EDU
Hi, newbie question, apologies if redundant.
Would like to use the 'rotationAround' function. How do I obtain the z axis (normal vector of the Top plane) for use as the 'line' parameter? I know I can obtain a Line with evLine(), but I'm not sure how to obtain a query that returns the zaxis.
EDIT: Ok, literally right after I posted this question, I typed the letter 'Z' and found the 'Z_AXIS' constant through the autocomplete menu. Lol.
Would like to use the 'rotationAround' function. How do I obtain the z axis (normal vector of the Top plane) for use as the 'line' parameter? I know I can obtain a Line with evLine(), but I'm not sure how to obtain a query that returns the zaxis.
EDIT: Ok, literally right after I posted this question, I typed the letter 'Z' and found the 'Z_AXIS' constant through the autocomplete menu. Lol.
2
Best Answer

Evan_Reese Member Posts: 2,056 PROhaha sometimes it's like that. You mentioned evLine, which is a function to evaluate a query (like an edge you could pick) and return a line, which isn't what I think you needed. If you need an axis not on the origin, all you need is the line() function which takes a vector and direction. If you look at the documentation for Z_AXIS you'll see it's identical to using the line function.
line(vector(0, 0, 0) * meter, vector(0, 0, 1))
Evan Reese / Principal and Industrial Designer with Ovyl
Website: ovyl.io2
Answers
Website: ovyl.io
Website: ovyl.io