[Q] parametric - constrain plumb-line position

Wondering whether/how it is feasible to maintain the plumb-line position of a hook block constrained to the crane boom whilst the boom gets moved up/down?

Dynamic components allow you to lock the position of the component, so if both the hook block and the crane boom are both within the same component, you can force the hook block to follow the crane boom’s position.

Pretty much
Hook Block’s position = Crane boom’s position + size of the crane boom (so that they don’t overlap and occupy the same space

Thanks for the feedback, but I am not sure how to implement this plumb-line position constraints between the boom and the hook block. The horizontal movement (swivel) of the hook block together with the boom is covered (grouped the hook block with the boom).

But how to maintain the plumb-line if the boom is moved vertically (lowered/raised)? The position attributes X/Y/Z are referring to the origin but not to another group inside the component. When the boom is moved horizontally the hook block is supposed to maintain the plumb-line attitude (gravity) and at the same time the relative position to the tip of the boom

crane boom initial position

crane boom raised and hook block moved along the tilt (not wanted)

crane boom raised and hook block maintained plumb-line and relative position to boom tip (desired)

Obviously you make the boom a component with its red axis along its center line.
And as its origin you choose where it rotates, right where both cylinder center lines intersect.

The parent component, the boom, has a child component (hook plus cable (say=hook)) nested inside.
The hook rotates with the parent. Now make it rotate the same angle in opposite direction when rotating the boom. So the parent’s angle is used (passed on to the child) to rotate the nested component backwards.

1 Like

Like @Wo3Dan said,
Hook ROTX= -1*(Parent!ROTX)

Only problem is you’ll have to use the Redraw function every time you move the boom. I think there’s a way to have to redraw automatically with a Current command, but not sure.

1 Like

Perfect, that works like a charm! I am much obliged for the help!

It is (unfortunately) not redrawing automatically, this needs the extra manual click

See next file for basic solution:crane.skp (75.2 KB)
Note the quotation marks in the ‘Animate’ function. This allows for working with negative values along the line. Otherwise the animation won’t function properly.

1 Like

Similar as to having dynamic option menu, both require the extra click to ‘redraw’ the model unfortunately.

thank you both!

Thing happening now is that when the cranes gets swiveled (tower, boom and hook block) around the z-axis of the tower the hook block turns as well in its z-axis, which is not supposed to happened, and honestly I do not get it why this happening. can this prevented?

You have control over the X, Y, and Z axes in the dynamic attributes. You’ll have to provide the value in each to control if you want the hook to follow the axis of the component that it’s nested in or not. If not, it’ll require a math formula to have to move the oppose angle to balance out

1 Like

There we go, I am apparently not so good with the math stuff… That is where it gets a bit hard for average SU user

It took me awhile too, but in the end, it’s stuff we learned in high school if we remembered

Basic idea:
(y) Parent Angle moves +45 degrees
(x) Child angle moves -45 degrees
Formula: X = -Y

Since you don’t want any of the group angle is modify the hook angle, each X, Y and Z’s axes should be a negative of the group’s axes

Of course you are right, not really rocket science, but long forgotten those basics.

And your formula work peachy on the y-axis, the hook remains constraint perpendicular to the ground (after the redraw click) and thus I thought it work the same on the z-xis, but then it it not.

hook ROTZ= -1*(Parent!ROTZ)

hope that would negate it, like on y-axis, but for some reason it does not work

Check your component axes, that’s where your model will pivot from. You’ll probably want your axes to be in the middle of your object. Within your component, Right-Click-> Change Axes.
Right now it’s probably pivoting from the corner so your object is moving as it rotates

after some axis alignment the turning of the hook block got solved and boom up/down works alright (image A below), but when I swivel the entire crane the hook block turns off from being perpendicular (image B below). Not sure whether I am just getting the concept (perhaps with the axis) or Dynamic Components are just not meant for this kind of stuff

Image A

Image B

can you upload your file?

How are you grouping everything? Seems odd that when you rotate the entire crane that the hook would rotate on a different axes. Difficult for me at this point to determine where that would be a conflict in the DC code without seeing it.

I don’t think it’s an issue of DC not being able to handle it because I’ve seen more complex models.

Despite the assistance this does not seem to work with DC, stating to wonder whether it might a bug in REDRAW or DC is not designed for the complexity to constrain the plumb-line of an object to a combined vertical/horizontal rotation.
Or I am not getting the dependencies of axes between parent and child DC.

Scene 1 is the basic starting point, scene the result after the vertical/horizontal rotation (and redraw by click), the hook block not maintaining the plumb-line alignment. Scene 3 is a copy of S1, except having changed the axis and S4 is the after the vertical/horizontal rotation, which is even weirder than S2.

simple crane.skp (131.3 KB)

crane -DC.skp (164.9 KB)

This model I created should get you close to what you are after,…

1 Like

Wow, that is truly impressive! Seems that ANIMATE is somehow working better than REDRAW