Spiral Pocket Circle Gadget

This forum is for users to submit their own gadgets to the community

Spiral Pocket Circle Gadget

Postby DVE2000 » Mon Jul 29, 2019 1:32 am

I kind of just did this one for fun. I know there's a spiral gadget already available, but this one is more concerned with using a tool and its stepover to create a spiral for either cleaning the surface a material with a spiral pattern instead of a 2D pocket, or to hog out all the material of a circle in a spiral pattern.

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.

Capture.JPG


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

To install, download the zipfile, change .zip to .gadget and then double click the renamed file or open the file with Aspire/Vcarve Pro.

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.
Attachments
Spiral_Pocket_Circle.zip
(7.71 KiB) Downloaded 98 times
DVE2000
 
Posts: 22
Joined: Fri Aug 17, 2018 7:59 pm
Model of CNC Machine: CAMaster

Re: Spiral Pocket Circle Gadget

Postby jimwill2 » Mon Jul 29, 2019 1:58 am

I downloaded your gadget and played with it a little... well done! Thanks.
Jim Williams
jimwill2
Vectric Wizard
 
Posts: 584
Joined: Tue Aug 31, 2010 1:48 am
Location: Superior, Colorado
Model of CNC Machine: CaMaster Stinger w/recoil, FTC

Re: Spiral Pocket Circle Gadget

Postby TReischl » Tue Jul 30, 2019 3:17 pm

Hello DVE.

Neat gadget.

I have thought for a long time a spiral tool path would be very handy, especially for 3D work that is round in shape. So I downloaded and installed. It sort of works for what I had in mind. The hang up for what I would like to do is that if I spec a tool it leaves that amount around the periphery. Also noticed that it does not like ball nose end mills (of course, it is designed for pocketing not finish tool pathing in 3D).

Then it dawned on me! I spec'd a very small end mill, let it generate the path projected onto the 3d model, and voila!

What I really, REALLY like is the ability to control where the toolpath starts, inside or outside. I absolutely do not like that the normal version of "spiraling" starts in the middle. I like to start on the outside where I know the first cuts will be shallow most of the time.

Here is one I just did:

Capture.JPG


I selected a .007 diameter tool to control the amount of stepover then projected the spiral toolpath onto the 3D model. I like it!!! (yea, this one has a lot of wasted air cutting time because it is not actually round, but hey, the concept works great!)



So yea, this is a really handy gadget and I will be using it. Off I go to do a few more test runs on real models. Should work just fine now that I figured out not to try to tell it the actual size of the ball nose I will be using.

Edit: One of the really great things about this is that it ends the decelerate, step over, accelerate motion that results in a very slight mark on the work piece. Not to mention that it is a tad faster because of that.
"If you see a good fight, get in it." Dr. Vernon Jones
User avatar
TReischl
Vectric Wizard
 
Posts: 2963
Joined: Thu Jan 18, 2007 6:04 pm
Location: Leland NC
Model of CNC Machine: 8020 Build 48X36X10 RP 2010 Screenset

Re: Spiral Pocket Circle Gadget

Postby scottp55 » Tue Jul 30, 2019 3:56 pm

Thanks DVE2000 :)
Downloaded, but haven't played with it as this laptop is amazingly slow.

Ted,
Let us know how playing with it turns out :)
Haven't seen those marks on my work since Stepover Retract came out, but then my machine is small and tight.
DO remember sanding out that mark on a dozen Tiny Owls, before it came out though.
Looks interesting!! :)
scott
scott
User avatar
scottp55
Vectric Wizard
 
Posts: 3141
Joined: Thu May 09, 2013 11:30 am
Location: Kennebunkport, Maine, US
Model of CNC Machine: ShopbotDesktop 5.5"Z/spindle/VCP10

Re: Spiral Pocket Circle Gadget

Postby DVE2000 » Tue Jul 30, 2019 8:17 pm

You're welcome, guys!

Ted, the reason I came up with this is *exactly* because of the decelerate-stepover-accelerate motion of a normal pocketing toolpath. I'd been creating some Corian and fiberglass resin coasters, and the normal pocketing toolpath for resin cleanup leaves a lovely line of circles where the pocketing circles start and stop. I know I have to sand anyway, but that just makes it take a bit more effort.

It's really easy to allow other types of bits in the gadget - in fact I have all the other types in the code but they're just commented out. You could use a text editor and remove the comment (which is -- in lua) from the part of the code which has the allowed bits. It's line 292 in the code.

Gary
DVE2000
 
Posts: 22
Joined: Fri Aug 17, 2018 7:59 pm
Model of CNC Machine: CAMaster

Re: Spiral Pocket Circle Gadget

Postby TReischl » Wed Jul 31, 2019 12:37 am

Thanks for that tidbit. I am a programmer but have never looked into doing anything in LUA. You might say that I have seen enough code to last the rest of my life! 8)
"If you see a good fight, get in it." Dr. Vernon Jones
User avatar
TReischl
Vectric Wizard
 
Posts: 2963
Joined: Thu Jan 18, 2007 6:04 pm
Location: Leland NC
Model of CNC Machine: 8020 Build 48X36X10 RP 2010 Screenset

Re: Spiral Pocket Circle Gadget

Postby DVE2000 » Thu Aug 01, 2019 10:45 am

It’s a pretty simple language. I only learned it to be able to create Vectric Gadgets. It may be simple, but it’s powerful at the same time. The SDK has plenty of good examples. As do the existing gadgets.
DVE2000
 
Posts: 22
Joined: Fri Aug 17, 2018 7:59 pm
Model of CNC Machine: CAMaster

Re: Spiral Pocket Circle Gadget

Postby scottp55 » Thu Aug 01, 2019 1:50 pm

Gary......Consider me Code Illiterate:(
Did open, but only in Notepad which didn't show Line#s.
Can you recommend a different program that Does show Line#, and pretty please tell me how to change the Line to include Tapered Ball Noses?
It would be VERY much appreciated!!
Played with it on a Dome/Dish, and liking the possibilities for Tiny 3D :)
Thanks!
scott
scott
User avatar
scottp55
Vectric Wizard
 
Posts: 3141
Joined: Thu May 09, 2013 11:30 am
Location: Kennebunkport, Maine, US
Model of CNC Machine: ShopbotDesktop 5.5"Z/spindle/VCP10

Re: Spiral Pocket Circle Gadget

Postby Mark's Wood Chips » Thu Aug 01, 2019 3:49 pm

scottp55 wrote:Can you recommend a different program that Does show Line#
scott


Scott,

Look for "Notepad++"

Mark
User avatar
Mark's Wood Chips
Vectric Craftsman
 
Posts: 159
Joined: Thu Mar 19, 2015 12:36 pm
Location: Hubertus, WI 53033
Model of CNC Machine: ShopSabre 23 with Rotary

Re: Spiral Pocket Circle Gadget

Postby DVE2000 » Thu Aug 01, 2019 4:13 pm

Scott, open Spiral_Pocket_Circle.lua with Notepad, hit ctrl-f and type in "ball" without the quotes. Hit Enter. Close the Find dialog. Your cursor will be on the correct line. Hit the Home key, use the arrow keys to get to the first dash, remove the double dashes with delete, and hit ctrl-s to save. You should be good to go.

This is what the line looks like before:
Code: Select all
  --dialog:AddToolPickerValidToolType("ToolChooseButton", Tool.BALL_NOSE)


And afterwards:
Code: Select all
  dialog:AddToolPickerValidToolType("ToolChooseButton", Tool.BALL_NOSE)
Last edited by DVE2000 on Thu Aug 01, 2019 4:24 pm, edited 1 time in total.
DVE2000
 
Posts: 22
Joined: Fri Aug 17, 2018 7:59 pm
Model of CNC Machine: CAMaster

Re: Spiral Pocket Circle Gadget

Postby ger21 » Thu Aug 01, 2019 4:14 pm

In Notepad, try View > Status Bar, and you'll get line numbers.
You may need to turn of Wordwrap in the Format menu.
Gerry - http://www.thecncwoodworker.com
ger21
Vectric Wizard
 
Posts: 1502
Joined: Sun Sep 16, 2007 2:59 pm
Location: Shelby Township, MI, USA
Model of CNC Machine: Custom DIY

Re: Spiral Pocket Circle Gadget

Postby scottp55 » Thu Aug 01, 2019 6:47 pm

Thanks all!! :)
May not get to it till tomorrow, BUT what a helpful forum for all!! :D
Thanks for the Idjit instructions Gary!!
scott
scott
User avatar
scottp55
Vectric Wizard
 
Posts: 3141
Joined: Thu May 09, 2013 11:30 am
Location: Kennebunkport, Maine, US
Model of CNC Machine: ShopbotDesktop 5.5"Z/spindle/VCP10

Re: Spiral Pocket Circle Gadget

Postby DVE2000 » Sun Sep 15, 2019 10:18 pm

This won’t work with version 10, unfortunately. They’ve added an additional argument to the AddToolPicker function. I opened a bug asking for a new version of the API. The one on the website is still for 9.5. Tech support replied that the new API should be out within the next couple of weeks.

I may try see if I can guess at the argument for now. Seems to be a required tool database number.

I’ve been working on enhancements to allow you to select any shape, and a spiral will be created to the diameter of the smaller of the X or Y lengths of the shape bounding box. This will easily allow spirals to be added to existing circles. I just need some final testing.
DVE2000
 
Posts: 22
Joined: Fri Aug 17, 2018 7:59 pm
Model of CNC Machine: CAMaster


Return to Gadgets - User Submissions

Who is online

Users browsing this forum: No registered users and 2 guests