Obtaining axis for 'rotationAround' function
antlu65
Member Posts: 61 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 z-axis.
EDIT: Ok, literally right after I posted this question, I typed the letter 'Z' and found the 'Z_AXIS' constant through the auto-complete 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 z-axis.
EDIT: Ok, literally right after I posted this question, I typed the letter 'Z' and found the 'Z_AXIS' constant through the auto-complete menu. Lol.
2
Best Answer
-
haha 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))
2
Answers
-
haha 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))
2 -
Thanks for the tip! I've seen some of your company's YT segments on OnShape (I think that's what encouraged me to start learning it in the first place). You guys do amazing work!
1 -
No way! Glad to hear it was helpfulantlu65 said:Thanks for the tip! I've seen some of your company's YT segments on OnShape (I think that's what encouraged me to start learning it in the first place). You guys do amazing work!
0
