It allows you to create spirals that are going to be used for climb or conventional cut directions. The start and end points of the spiral are changed so that when you create a on-vector profile toolpath, the selection of climb or conventional cut is honored properly. The tool also creates the bounding circle around the spiral for visual effect, but the circle is not needed for actual cutting. The circles are also put on their own Layer.
What I think is really nice about the gadget is that you can select multiple spirals, run the gadget, and you can change all the parameters for the selected spirals at once (except for center x and center y). The old spirals are deleted, and new ones are created with the new parameters. If you select the outer/visual circles at the same time, they're also deleted and redrawn. You can selected whatever things you like before you run the gadget - only spirals and their associated circles will be affected.
You could do something like create a spiral, and then use the Array Copy tool to create a pattern. Seeing the spirals would still be all selected, you could rerun the gadget and change the parameters for all the spirals. Similar to the Circle tool, except you can have more than one spiral selected.
The arc tool for contours in the Lua SDK doesn't behave well. You can create spirals with lots of little straight lines (the way the original spiral gadget does it) or create them with Bezier curves. The Bezier approximation uses way less points, but the inner portions of the spirals are a bit off. It doesn't really matter though - the cutting overlap will take care of the little inaccuracies at the center of the spiral.
ToDo:
- Creating ToolPaths automatically would be nice. I may get to it at some point
- Grouped spirals are currently ignored
For programmers, I managed to figure out a few cool things that I haven't seen for other Gadgets. The first was being able to disable or change label texts when the dialog is first opened. I figured out how to use a JavaScript timer to call a function to read the bits of a hidden text box. The Lua script can set the value/bits of the text box. This allows the script to disable the centerx/y text fields if multiple spirals are selected. It also allows the script to change the text of the "Add" button to apply. It pretty much eliminates the race condition when the dialog is displayed. It goes: create dialog, add and set fields in lua, show dialog, timer times out in 1ms and then calls the JavaScript function, fields are read and the control elements are modified
I figured out how to do tooltips as well. I don't think I've seen those for any other Gadgets. For some fields, you get a useful little popup by the mouse with some additional info. May get annoying for users though.
I also put the entire dialog display in a loop. Hitting Enter instead of just closing the Gadget will Add/Apply and then the dialog is reopened. You close the dialog by hitting Escape or clicking the Close button. This makes it more like the Create Vector tool in Aspire/Vcarve.