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.
Is there a way to create a constraint so a line is always a percentage of another line?
ryan_sommers
Member Posts: 1 ✭
For instance, I'd like to make pieces from wood and make mortises exactly 1/3 of the size of the full wood dimension.
0
Best Answer
-
Jake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646Hi Ryan,
I can see a couple ways of doing this. If the size of the piece of wood is known in advance you wan just set a variable woodLength to be the length of the wood, and then set another variable mortise to be (#woodLength/3).
If you want to cut a little faster and looser and be able to drag/change the original wood piece in the sketch, you can do something like this:
https://cad.onshape.com/documents/8076a0228dacd2837a997718/w/d9e7f139de58423e8322012f/e/445697bfb42cd81403bfc4fd
I made a line line out of 3 line segments, constrained them so they are parallel to each other, and then constrained them all to be of equal length. I then made another line that was equal in length to one of the line segments. It's a little sketchy (pun maybe intended) but it works.
Jake Rosenfeld - Modeling Team5
Answers
I can see a couple ways of doing this. If the size of the piece of wood is known in advance you wan just set a variable woodLength to be the length of the wood, and then set another variable mortise to be (#woodLength/3).
If you want to cut a little faster and looser and be able to drag/change the original wood piece in the sketch, you can do something like this:
https://cad.onshape.com/documents/8076a0228dacd2837a997718/w/d9e7f139de58423e8322012f/e/445697bfb42cd81403bfc4fd
I made a line line out of 3 line segments, constrained them so they are parallel to each other, and then constrained them all to be of equal length. I then made another line that was equal in length to one of the line segments. It's a little sketchy (pun maybe intended) but it works.
Have you looked into using variables?
https://cad.onshape.com/help/Content/variable.htm