Dynamic Block Stretch Width & Height

Dynamic Block Stretch Width & Height

gslantz
Participant Participant
623 Views
18 Replies
Message 1 of 19

Dynamic Block Stretch Width & Height

gslantz
Participant
Participant

I'm still trying to learn how to use Stretch Actions in dynamic blocks and I've run into a couple of issues.

 

I have a shape that I need to stretch in both width and height. I can get the height adjustment working by itself, but when I add a Stretch Action, some of the angles change even though I need them to remain fixed. The top corners are also filleted, and the fillets seem to break apart or "explode" when I try to constrain the geometry.

 

I know that geometric/parametric constraints generally shouldn't be mixed with dynamic block actions, but I'm not sure how to keep certain dimensions and angles constant while still using Stretch Actions.

I'm also trying to stretch both ends of the shape simultaneously (for example, keeping the shape centered while increasing the overall width), but I haven't been able to figure out how to set that up.

 

I've searched through YouTube tutorials and online resources, but I haven't found anything that addresses these specific situations. If anyone can explain the correct approach or point me to a tutorial that covers these topics in detail, I'd really appreciate it. I'm trying to understand the underlying concepts, not just fix this one particular block.

gslantz_1-1786370519393.png
gslantz_2-1786370573248.png

gslantz_0-1786369912657.png

 

0 Likes
Accepted solutions (3)
624 Views
18 Replies
Replies (18)
Message 2 of 19

h_s_walker
Mentor
Mentor

Is this what you are talking about? (See the image below). If it is just expand the windows to encompass the linework which needs to be fixed. 

Also you might need to recreate your linear stretch as some of the linework isn't moving.

One more question. Is the shape in the block the correct shape and it just needs to change in width and height?

h_s_walker_0-1786371809363.png

 

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 3 of 19

gslantz
Participant
Participant

The shape is correct. Basically, the top and bottom dimensions have to stay the same and they can't stretch or break apart. I was able to get one of my blocks to work, kind of. A screen shot is an example of what I am trying to accomplish. 

gslantz_1-1786372101762.pnggslantz_0-1786371936339.png

 

0 Likes
Message 4 of 19

Libbya
Mentor
Mentor
Accepted solution

Set LUPREC system variable to 8 so that you can see the actual values.

 

To adjust for the angles you need to select each stretch action in turn and adjust both their angle offset and distance multipliers appropriately.  Angle offset is just as it sounds.  It determines the angle the items are stretched relative to the angle the grip is moved.  Distance multiplier is also just as it sounds.  It multiplies the distance the objects are stretched relative to each unit the grip is moved.  The angles in this case are all easy to find.  The are 6°, 174°, 186°, and 354°.  To find the distance multiplier draw a right triangle with one leg with a length of 1 unit drawn at the angle of grip movement.  Draw a line perpendicular to that first line (don't worry about the length).  Draw the hypotenuse of the right triangle at the 6° angle.  Fillet (radius 0) the end point of the hypotenuse with the second line you drew.  The distance modifier is the length of the hypotenuse. 

 

See attached.

Message 5 of 19

Brock_Olly
Advisor
Advisor
Accepted solution

Hi @gslantz ,

I did one side with normal stretch actions.
Offset the horizontal stretch angle by -6 degrees and the length by 1/cos(6).
Do the inverse at the bottom.

 

Then you can move the vertical line to the right and stretch it 90° by sin(6)

I see the bottom bend doesn't have a fillet, I kept it that way.

Message 6 of 19

Brock_Olly
Advisor
Advisor

Ah I was too slow 😅 

Good job @Libbya !

I personally think it's cleaner to use cos and sin values in the calculator input, which gives the full value (I think?) instead of 8 decimals.

 

After reviewing it converts the sin/cos to a static value so it's indeed best to set LUPREC var to 8 first.

Message 7 of 19

gslantz
Participant
Participant

@Brock_Olly @Libbya 

I used the LUPREC system and changed the variable to 8. Now when I click a specific action the whole action is shown. I can't find where to adjust the distance and angle multipliers. Is it a command or a setting I need to click on?

gslantz_0-1786376525911.png

 

0 Likes
Message 8 of 19

Libbya
Mentor
Mentor

Select one stretch action and go to the properties palette to see the properties.  

Message 9 of 19

gslantz
Participant
Participant

@Libbya 

 

I am now working on a shape with a radius at the top that needs to have a set radius of 3". When I do the same thing as above, which I got working, thank you, the shape changes its height as I adjust the width. It also messes up the vertical linear action, and it is no longer an accurate representation of the shapes height. Any thoughts on how to address this?

gslantz_0-1786384713700.pnggslantz_1-1786384765979.png

 

0 Likes
Message 10 of 19

h_s_walker
Mentor
Mentor

Post removed by author

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 11 of 19

Brock_Olly
Advisor
Advisor

The relation of the width and the top of the arc is not linear, meaning we cannot drive it with a stretch factor.

Do you have a set of widths you can predefine? If so you can work with a table and predefine the positions of the grip point/width.

You can also try to fully define it with use of constraints.  
The formula for the top of your arc in relation to the width of the rectangular base is:
w = r − √(r² − (w/2)²)
w = 3 − √(9 − (w/2)²)
Which you can define using parameters and link to parametric dimensions.

Message 12 of 19

gslantz
Participant
Participant

I was able to add constraints to the shape and I had to cut the ends of the arc and make them independent. As seen in the file attached. 

The issue now is that when I type a dimension in for the width, the shape explodes or distorts. This is weird to me because the shape behaves just fine when I toggle the width

gslantz_0-1786461696274.pnggslantz_1-1786461736306.png

 

0 Likes
Message 13 of 19

h_s_walker
Mentor
Mentor

Constraints and Parameters are not happy bedfellows. You need to use one or the other.

Howard Walker
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Left Handed and Proud

0 Likes
Message 14 of 19

gslantz
Participant
Participant

When I used parameters, specifically the width, the height parameter changes and are no longer accurate. 

0 Likes
Message 15 of 19

gslantz
Participant
Participant

@Brock_Olly Could you possibly explain this in more detail?

0 Likes
Message 16 of 19

Brock_Olly
Advisor
Advisor

Which part?

You can mathematically predict the height of your arc with that formula.
If you are okay with limiting the block to set widths, we can work with a table and 'hard code' the values.

You can also make the model fully parametric with constraints and plug that formula in.
Constraints have the benefit of working with parameters (which can be formulas), normal actions cannot.

0 Likes
Message 17 of 19

gslantz
Participant
Participant

So, if we make the shape fully constrained, we can plug in a formula that will allow us to adjust the width and height separately?

If I were to mathematically predict the heigh with the formula, and 'hard code' the values, I would have to do that for hundreds of values as the set dimensions can always change.

0 Likes
Message 18 of 19

Brock_Olly
Advisor
Advisor
Accepted solution

@gslantz I'm not that proficient with constraints so there might have been a better way, though here's what I think you're after.

In the end I didn't need the formula since everything is constrained.

 

Message 19 of 19

gslantz
Participant
Participant

Thank you @Brock_Olly! 

 

That was exactly what I was after. 

0 Likes