Inconsistent behaviour when using user parameters to change angles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to come up with a way whereby I can design parts with living hinges built in that I can toggle between being folded or flat by using a user parameter like a boolean flag, i.e., bent or not bent.
It's very close to working, but under some conditions, some angles get flipped.
In the screencast below, I have broken this down to its simplest form for demonstration.
4 lines joined to gether in a row, each given an angle relative to the previous one, defined in a user parameter.
Then in the sketch itself, I define each angle as:
180-(180-angle_x)*bent)
where I use 'bent' like a boolean value, i.e., 0 or 1.
So you can see that when 'bent' = 0, the formula = 180, i.e., the lines are colinear.
When 'bent' = 1, we end up with the formula being equal to angle_x.
This seems to work if the angles are small enough that the last line does not go beyond vertical, then you can flip 'bent' between 0 and 1 and get the expected behaviour.
However, if the sum of the angles extends beyond vertical, the last one gets flipped when flipping between 0 and 1.
This can be worked around by stepping 'bent' up or down in smaller increments, e.g., 1 -> 0.5 -> 0 and likewise going the other way.
The provided example is drastically simplified - the real application where I want to use it has more geometry around each bend, so I don't think sheet metal is the answer.
Anyone have any ideas how to mitigiate this issue I'm having? I've tried adding intermediate construction lines between each angle as well to have something less than 180 in each angle in an attempt to bias the fold direction, but this did not help.
Cheers,
Stu