TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
Interested in some really terrific mobile apps? Visit www.turboapps.com for details.

Spin Pitch
Read 6137 times
* April 04, 2010, 06:47:18 AM
I'm trying to animate the compression and decompression of a coiled spring.
The only command I can find in AniLab which seems to apply is SetPropertyValue, but I have been unable to determine what that value ought to be. "Spin"; "Pitch"; "Spin Pitch"; "Spin_Pitch" do not seem to be viable.

How does one do this?

Clarification:
Correctly it is the PropertyName that I need.
From what I can determine then <propertyname>, <initial value + (incremental value*StepNum)> appears to be the syntax.

This feature other than "New and exciting" since 4.1, does not seem to have much documentation and no list of supported property names. Google returns little of any use, and I have found no examples of its use other than the example given for changing pen width.

Is this a real feature? Does SetPropertyValue really do anything other than change pen width?
« Last Edit: April 04, 2010, 09:38:21 AM by Kevin_K »

Logged


* April 04, 2010, 02:00:07 PM
#1
You could create the spring by Sweeping a profile along an exploded Helix (which makes it a 3D Spline), with "Use compound path" enabled. Then all you need do is vary the height of the Spline.

Henry H
« Last Edit: April 04, 2010, 08:51:53 PM by Henry Hubich »

Logged


April 05, 2010, 04:10:38 AM
#2
If you've got variable pitch and/or ground ends, perhaps a cheat is acceptable. A simple 3D stretch may do, and so long as you don't overdo the stroke, the change in wire size is barely noticable.

Logged
Julian

TC18 / 38.5 Platinum, AL5. XP, Core2 Duo E6750 OC'd 3.0Ghz, Render test: 3mins 3sec.


April 05, 2010, 11:26:22 AM
#3

Hi Kevin,

your question appears to relate to animating 2D objects, using constraints, information for which you will find under Animation and Constraints, in the AL4_UserGuide, page 26.  You select the property name from the VariableName drop down list and enter required values next.

However, as you may be wanting to animate a 3D spring object, then you will need to use, preferably, the Key Frame Editor, with the results shown in Henry and Julian's examples.  Again, this is better covered in the AL4_UserGuide, IMHO.

Finally, a tip, don't forget to UNDO the scenario, after each scenario run.

I hope this helps.

Regards Tim


Logged
You can design without engineering, but you cannot engineer without design.
Using Win 10 with Designer 2016/2017 and TurboCAD Pro. Plat. 2018/2019 + Lightworks (64-bit versions) + AnimationLab 5.2.
Windows 10 Pro 1903 (Build 18362.476) 64-bit


* April 05, 2010, 12:07:26 PM
#4
Thanks Henry and Julian, both.

Henry I'm having two problems making this work. One is that the spring has to be represented from LSolid to Lfree and close to LSolid it's returning errors that the object has become self intersecting, when it hasn't.
I've also set the spring up so that the wire is slightly undersized for d to try to fudge my way past this problem. It still generates the self-intersection error even at Pitch*1.5... so while I thank you for the suggestion I don't think I can get there from here.

Revolve doesn't generate this error even at exactly LSolid for objects which do not revolve exactly 1 time. If the revolve is exactly 1 turn, a tiny change in axial dimension handles the self-intersection error. Revolve does not twist the profile when a non-circular profile is used.

The other issue is that the wire may not be round wire. With round wire twisting of the swept profile doesn't matter. In the space available with the difference in k between round and rectangular wire I believe I'm stuck using the latter.

Scaling the sweep not only changes the cross-section of the wire, but also changes the twist angle. I would have to run a new sweep for each render for the cross-section to be retained, and the twist angle can't be set finely enough to compensate consistently... the spring will appear to jiggle oddly through it's range of motion. If the sweep is exploded once this ceases to be an issue, but then I'm left with the axial dimension of the wire changing proportional to the scale.

Julian:
The issue of representing ground ends was resolved by revolving two separate single turns at a pitch equal to the axial wire dimension and then splitting them across the axis of revolution and deleting the remnant. The base end remains stationary and correctly located to match the end of the active coils, and the free travel end can be moved axially as a linear transformation to match the change in pitch.

This is for both, patent documentation of an assembly, and presentation animation for shareholders and prospective buyers. It should be as close to accurate as possible through the full range of motion. Other parts depend upon a dimensional relationship with the spring deformation... in places this relationship is critical. Scaling a helical sweep does not seem to produce a coil with the dimensional integrity required for daxial even discounting the twist problem.

While this strategy seems to work within certain limits with a circular profile, it doesn't seem to be doing what I need done as the wire changes cross-section with scale. It doesn't show in the overall image but does show in two of the detail views as a (mystery gap) where the change in pitch doesn't match the change in length.

In theory I could set up copies of the spring assigned to layers by using revolve and get the results I need, but TC seems to choke on a file this size... running 16 GB RAM and 32 GB in swap files, so more memory isn't a solution.

It looks as if I'm going to have to set up 300 springs in Xrefs and manually swap the file name and then manually compile the animation from stills unless I can figure out how SetPropertyValue works with this... if it works at all.


Add decent documentation of the SetPropertyValue feature, a list of valid PropertyName(s) and/or Swap Xref Actor <filepath> to my wishlist for AniLab.

Logged


* April 05, 2010, 12:48:58 PM
#5

Hi Kevin,

your question appears to relate to animating 2D objects, using constraints, information for which you will find under Animation and Constraints, in the AL4_UserGuide, page 26.  You select the property name from the VariableName drop down list and enter required values next.

However, as you may be wanting to animate a 3D spring object, then you will need to use, preferably, the Key Frame Editor, with the results shown in Henry and Julian's examples.  Again, this is better covered in the AL4_UserGuide, IMHO.

Finally, a tip, don't forget to UNDO the scenario, after each scenario run.

I hope this helps.

Regards Tim



Thanks Tim, but no... Constraints aren't necessary. I had considered using constraints to illustrate the expansion of the coil in compression (ODexp)but it isn't necessary to the illustration of the operational principle of the device and postings here lead me to believe that it would add unwarranted additional variables to the difficulty just making the spring work correctly.

Not a 2D issue. There is no 2D constraint which will allow the setting of pitch for the spring in steps that AniLab can animate.
To my knowledge there is no 2D constraint which can illustrate spring pitch for a solid, animated or not.

I appreciate your input but the solution offered by the use of a helical sweep does not appear to generate the desired result through the range of motion without a great deal of additional work... which would also require single frame manual rendering, and having to compensate twist angle for each new sweep generated.

So far my best option appears to be manual rendering of single frames using a single Xref and a library of springs generated by profile revolution.

Since the Revolution contains a Property "Spin Pitch" it would be really nice if this property was a valid PropertyName and it was documented (if anything were documented) for the AniLab SetPropertyValue feature... or if AniLab allowed changing actors by Xref filepath.

300 springs in various stages of compression exceed TC's ability to load and render the model even when only one spring is visible at one time.

Logged


April 05, 2010, 01:01:20 PM
#6
Just to get the basic concept of what's required, are you able to post pictures of the spring at LSolid & Lfree ?

Logged
Julian

TC18 / 38.5 Platinum, AL5. XP, Core2 Duo E6750 OC'd 3.0Ghz, Render test: 3mins 3sec.


* April 05, 2010, 01:33:48 PM
#7
These are the extents images.

These were generated using revolve. The ends are separate with constant pitch and sliced across the revolution axis. The free travel end is simply moved to match the length of the active coils.

Logged


* April 05, 2010, 02:35:28 PM
#8
Thanks Henry and Julian, both.

Henry I'm having two problems making this work. One is that the spring has to be represented from LSolid to Lfree and close to LSolid it's returning errors that the object has become self intersecting, when it hasn't.

Kevin, for a round wire spring it isn't that complicated. There's no need to write a script. Attached screenshot shows the only two commands required for the sample I posted earlier. (The Spline used as a sweep path is the "Actor.")

Non-round wire does indeed pose a problem because of the twist. As you're probably aware, a Sweep has a parameter called "Twist Angle," which can be adjusted so that the orientation of a swept profile remains constant. The required value of this parameter for a helix is a function of the helix angle -- which of course changes as the height of the heilx is varied. A script could be written to calculate what "Twist Angle" is correct for each step in the variation of helix height, but I really don't know enough about AniLab to understand how (or even if) this could be applied to the animation.

Henry H
« Last Edit: April 06, 2010, 10:27:16 AM by Henry Hubich »

Logged


* April 06, 2010, 03:19:04 AM
#9
I don't understand what screenshot you mean, and I don't understand how this helps.

Even if the Twist Angle setting could be used in AniLab, it just isn't adequate.
Twist Angle is a formatted field which prevents it accepting precise enough input.
Rounding error causes it to either over-correct or under-correct slightly.





Logged


* April 06, 2010, 10:47:30 AM
#10
I don't understand what screenshot you mean, and I don't understand how this helps.

Even if the Twist Angle setting could be used in AniLab, it just isn't adequate.
Twist Angle is a formatted field which prevents it accepting precise enough input.
Rounding error causes it to either over-correct or under-correct slightly.

Forgot to attach the screenshot. Fixed now. Maybe it won't help.

I really don't understand what a formatted field is. The Properties dialog for a Rail Sweep will accept input that appears sufficiently precise.

Henry H

Logged


April 06, 2010, 01:00:54 PM
#11
Kevin, are you able to get your spring manufactured from square wire? A few years ago, we restored an ancient (80~90yrs?) safety valve but couldn't find a supplier for the spring. It was explained that spring steels today are only available as round or obround (specialists only). None would entertain using material I could supply. We ended up using a die-spring.

Henry's method with round wire is probably your only option. No other method seems to work here, except this cheat
« Last Edit: April 06, 2010, 05:00:13 PM by Julian Thomas »

Logged
Julian

TC18 / 38.5 Platinum, AL5. XP, Core2 Duo E6750 OC'd 3.0Ghz, Render test: 3mins 3sec.