Corrected error which caused spring offset in Maya 8.0 onwards (due to way Maya generates PolyHelix i.e. now center of rotation at center of Helix and it was at bottom edge previously)
Also script will now generate the spring automatically for a Piston built by Davvey's Piston Generator once Top Node of Piston has been loaded)
These Scripts will build Dimensional accurate Springs and the GUI will show the English Equivalent during the setting up of the various options.
Just install scripts in any Maya script path and install Icon and Image files in MayPrefsIcons directory
NOTE:- Maya's POLY HELIX Tool is required to run this script.
Type DVY_Springs in command line or middle mouse drag it to a shelf. There is an Icon file supplied to use with the Shelf Button.
Enter Spring dimensions and GUI will also show English equivalent sizes. Select top and Bottom Spring ends as required then press Build Spring Button.
The Script can build the following styles of Springs.
Closed_Ground_End, Closed_Flat_End, Open_End,
Hook_Loop_End, Closed_Loop_End, xtended_Loop_End, Cone_End
As each option is selected an image of the style will be updated in the GUI.
The top and Bottom ends can be the same or different styles.
Generally Compression springs are built using the first three styles and extension using the remaining four styles. The Top and Bottom sections are point and aim constrained to Top and Bottom Locators which can be used to "operate the Spring". The spring will stretch as the Top and Bottom Locators are move in the Y-axis To Move the spring use the Top Go Node to Translate and Roate the Spring.
The Spring is generated from a PolyHelix which is a locked Node to prevent deletion of its construction History. The Helix has is its Height attribute connected to the output of a distance node which is in turn connected to the world space postions of the Top and Bottom Locators. The Spring Body is constrained to the Bottom End Section of the Spring and this ensures realistic stretching of the spring when either end of the spring is pulled.
There is a smoothing attribute on the Spring Top Node which will apply a smoothing action to the springs main body.
If required the script can build a Spring to match a Round Cap End Piston previously built using Davvey's Piston Generator. To use this option load the Pistons Top Group Node into the GUI before pressing the Build Spring Button.
Note:- The Scale of the Spring will be adjusted to set correct Spring size relevant to the correct size for the Users Maya Unit settings i.e mm, cm, m, in, ft, yd.
TO DELETE A SPRING
PLEASE USE THE DELETE SPRING BUTTON IN THE GUI. THE REASON FOR THIS IS THAT THERE ARE LOCKED NODES IN THE SPRING GROUP WHICH MEANS THE NODE CANNOT BE
Installation example (for Maya 8.0):
1. Install scripts in the Maya Script directory
E:Documents and SettingsDavveyMy DocumentsMaya8.0scripts
2. Install all icons (xpm files) in
E:Documents and SettingsDavveyMy DocumentsMaya8.0prefsicons
Thanks and enjoy any comments good or bad let me know at Davvey@ntlworld