Creating a stretching spring

#1

Hi, is there a simple way to have a line stretching between a fixed and a moving point? Can’t seem to get it working properly/exactly. Want to animate a steel spring that stretches and reverts using a line as parent.

Thanks.

(Luc Adriaenssen) #2

Take a look at : http://bongo.rhino3d.com/video/the-power-of-history

Luc

1 Like
#3

Thanks Luc, able to get close to what i needed using history. Still not perfect as i cannot get the one end of the spring exactly follow a radial movement.

From Antwerp too btw…https://discourse-cdn-aws1.com/mcneel/uploads/default/original/3X/8/5/85d04ae61fc5a5a4929f4f8c718da1193519f2d1.MP4

(Luc Adriaenssen) #4

Hi Eric Vanachterdenhoek,

To solve the enigma of making the loop of the spring rotate nicely circular some (complex) IK is necessary. Complex yes, because the use of the ‘rubber-band’ joint includes that every object being child of the rubber-band is inevitably scaling along with its parent – as you can see on layer 1 in this model Spring Eric.3dm (1.3 MB).

So on layer 2 I used an auxiliary axis to make the end loop of the spring make the correct turn and then a second branch of the IK (the scaling helix) is constrained to it. Hence the only child the rubber-band has is a point object. Problem solved.

The rest is History ! :grinning:

I hope you get the IK structure – if not please ask more explanation.

Hopefully we can do something in Bongo 3 about this annoying aspect of scaling in a Hierarchy .

Luc

#5

Hi Luc,

Took some time to figure out the IK, but have it working now. Think it is somewhat different to your solution but with similar result. Thanks for the tips.

Eric.https://discourse-cdn-aws1.com/mcneel/uploads/default/original/3X/c/9/c96f73851121c1ab11ffd26d68feb393d7ecf2e7.MP4

(Luc Adriaenssen) #6

Eric,

Could you please share the model. You make me curious.

Luc :thinking:

#7

Perhaps not as simple in it’s setup as yours but it works. Here you go:
Spring Eric Rebuilt.3dm (368.1 KB)
Eric.

(Luc Adriaenssen) #8

Nice Eric;

  • 2 times a ‘LookAt’ to keep both start- and end-loop in the right direction. An excellent idea especially for the end-loop since the Simple Constrains take hardly any computing. Object 9 could eventual be made a Hinge (Z) to get the same effect.
  • A Rubberband center-axis combined with a ‘Flow Along Curve’ (with History) to make the helix stretch.
  • Finally ‘Pipe’ everything (with History) to make the solids.

An first-rate solution!

Luc

PS I cannot find the “unnamed” object that Object 9 is LookingAt. Do you remember what it is and how it can be vanished.

#9

Hi Luc,

I use the double “look at” for gas springs so this was a logical re-use. Object 9 is looking at a point, if i recall its object 20.

Thanks,
Eric

(Luc Adriaenssen) #10

Eric,

???

…it is not.

I stripped your (rebuild) model down to the LookAt of object 9. Spring Eric Stripped.3dm (64.4 KB)
Object 20 can be deleted without repercussion on the LookAt of Object 9.

It is simply impossible to get a hold on the (target) point object. Same goes for Object 8: impossible to select! It also does not appear in Rhino’s list of named objects.

Very strange all! I’ll make a report to the developers for investigation.

Thanks for sharing.

Luc

#11

I’ll build a new one from scratch to check if i will have such ghost points again. I do remember a repeated rhino crash when constraining the rubber band origin to a moving/rotating point. Therefore the LookAt curve got a child point at the curve’s origin again that served as the Rubberband origin. In theory two identical points but with different functions.
Gas spring, linear damper ofwel gasveer, simple to animate if the cilinder looks at the piston pivot and vice versa, regardless of either pivot’s movement.

Eric.

(Luc Adriaenssen) #12

Thanks for your intended effort. Anyway: ghost-objects should NOT occur. Neither should crashes :woozy_face:.

Oh yes : “gasveer”. Not to be confused with “hydraulic piston”. Indeed LookAt is the thing cf. the Excavator (http://files.na.mcneel.com/bongo/2.0/samples/Excavator.3dm)

Luc

#13

Spring rebuilt again.3dm (558.9 KB)
Rebuilt with what i need as a minimum to get it to work.

Eric.

1 Like