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.
Rotate part by sketch line (or, angle derived from 2 lines not hard coded)
james_sleeman
Member, Developers Posts: 21 ✭✭
I have this part and a sketch (the diagonal highlighted line), I want to rotate the part around the top left edge running away from the viewer (the edge perpendicular to the intersection of the two highlighted lines), so that the back edge (vertical highlighted line) is now coincident with that sketch line (diagonal highlighted line).
The rotate part tool only seems to allow you to enter an absolute value for the degrees of rotation, there is no way to derive this from sketch/part elements that I can see.
I could just read off that angle (which happens to be 5.744 degrees in this case) and copy-paste it into the rotate tool but that of course is anything but a parametric way to do it.
Is there a better way?
The rotate part tool only seems to allow you to enter an absolute value for the degrees of rotation, there is no way to derive this from sketch/part elements that I can see.
I could just read off that angle (which happens to be 5.744 degrees in this case) and copy-paste it into the rotate tool but that of course is anything but a parametric way to do it.
Is there a better way?
0
Best Answer
-
Jake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646Hi @james_sleeman
I can think of two ways to do this. First, you could use the "measure value" custom feature to store the measured angle between the lines as a variable, and then use that variable as the input to your feature:
https://cad.onshape.com/documents/77baa8153589a7fc5f289829/w/cffd0f2a7077380d5378a885/e/d3174bf5315e6aafcb889367
Second, you could create two mate connectors at the point of intersection of the lines, one aligned with the first line and one aligned with the second. Then you could use the transform by mate connectors option of the transform feature.
Another option (with slightly different design intent) would be to drive the angle of the sketch with a variable defined before that sketch, and then drive the transform with the same variable.
Here is an example doc using all three methods:
https://cad.onshape.com/documents/580ed1ad613de5443536f67c/w/241089b9c53b3955d897f9bc/e/1c110741a3dbc9af85136235
Jake Rosenfeld - Modeling Team7
Answers
I can think of two ways to do this. First, you could use the "measure value" custom feature to store the measured angle between the lines as a variable, and then use that variable as the input to your feature:
https://cad.onshape.com/documents/77baa8153589a7fc5f289829/w/cffd0f2a7077380d5378a885/e/d3174bf5315e6aafcb889367
Second, you could create two mate connectors at the point of intersection of the lines, one aligned with the first line and one aligned with the second. Then you could use the transform by mate connectors option of the transform feature.
Another option (with slightly different design intent) would be to drive the angle of the sketch with a variable defined before that sketch, and then drive the transform with the same variable.
Here is an example doc using all three methods:
https://cad.onshape.com/documents/580ed1ad613de5443536f67c/w/241089b9c53b3955d897f9bc/e/1c110741a3dbc9af85136235