Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

This section is for general discussion about Gadgets
User avatar
adze_cnc
Vectric Wizard
Posts: 4364
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by adze_cnc »

This thread is for discussion (bug reports, feature requests, praise, etc.) for the "Tapered Inlay Plug with Rough Clearing" gadget found here: viewtopic.php?p=282243

I'd like to keep discussion here so that the gadget thread always has, as the last post, the most recent version of the gadget.

Some additional features I see needed for the gadget:
  • inlay material thickness in a different unit of measure than the job (e.g. 5mm inlay thickness in a 0.375 inch thick job)
  • better help
  • v-bit only toolpath creation: currently you must select a square-end clearance tool
  • layer selection rather than manually pre-selecting the vectors (layers are your friend)
    • with layer selection in place a full tapered inlay (base and plug) toolpath creation gadget becomes possible
  • additional options for the square-end cutter: e.g. selecting "climb cut" rather than the hard-coded "conventional cut". Also "offset" or "raster" clearing (setting the clearance pass to "first", last", or "none" on raster)
—Steven

User avatar
jimandi5000
Vectric Wizard
Posts: 1053
Joined: Wed Mar 11, 2015 6:50 pm
Model of CNC Machine: Home Made 60 x 120
Location: North Houston Tx.
Contact:

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by jimandi5000 »

Hi Steven,
I have completed a very deep dive on the Zank toolpath method for making the plug toolpaths. I have found that it does not work as well as you may think.
Issues I found starts with the first toolpath start depth not being at 0. As per the video, the first pass is 3.5mm deep with 1mm bottom.
Each toolpath is calculated individually. Therefore, the clearing calculations don't stair step the waste material away from the upper portion of the toolpath.
This effects the v- bit side loading as deeper cuts.

Thoughs?
Thanks,
Jim

User avatar
adze_cnc
Vectric Wizard
Posts: 4364
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by adze_cnc »

jimandi5000 wrote:
Thu Nov 25, 2021 6:41 am
As per the video, the first pass is 3.5mm deep with 1mm bottom.
Video?

User avatar
jimandi5000
Vectric Wizard
Posts: 1053
Joined: Wed Mar 11, 2015 6:50 pm
Model of CNC Machine: Home Made 60 x 120
Location: North Houston Tx.
Contact:

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by jimandi5000 »

adze_cnc wrote:
Thu Nov 25, 2021 8:29 am
jimandi5000 wrote:
Thu Nov 25, 2021 6:41 am
As per the video, the first pass is 3.5mm deep with 1mm bottom.
Video?
Here you go....

This is what I used to build the Eazy Zank Gadget


https://www.youtube.com/watch?v=RY0zLv3wcyc
Thanks,
Jim

User avatar
adze_cnc
Vectric Wizard
Posts: 4364
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by adze_cnc »

Thanks. I had seen that video (viewtopic.php?p=264755#p264755). I came up with the same method that Stefan details before I saw the video. It works. The important part is that the "roughing" toolpath(s) must stop before the final toolpath's start depth (his start depth of 7mm and flat depth of 2mm). I detail that further in: viewtopic.php?p=282314#p282314

The important point is that we are preventing a square-end bit and a v-bit from plunging way deeper than the machine can handle by removing above what VCarve/Aspire thinks is not there. Also, that what we are doing can't be any worse than only creating the one toolpath.

User avatar
adze_cnc
Vectric Wizard
Posts: 4364
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by adze_cnc »

Discussion continued here from this question
ozymax wrote:
Fri Jun 03, 2022 10:58 am
Ok, I now have the gadget appearing in the Aspire gadget list.
I select a closed vector and open the gadget and now get this error message.

Any idea?
Well, I have done a few things to see if I can figure this out.
  • made it as if my VCarve 9 installation had never had this gadget installed (removed Registry entries, removed and re-installed gadget). No message.
  • found a copy of Aspire v4.5 gadget SDK documents (the v4.5 PDF is labelled version 2.01 and the one I used for VCarve 9 is version 2.05)
  • had a quick look to see if the calls in the gadget were changed from that v2.01 to v2.05 and they don't seem to be
All in all this should work in Aspire v4.5. I wonder:
  • perhaps you don't have permission to write to the Windows registry
  • perhaps Aspire v4.5 returns a version number that is not 4.5 (Adrian found that v10.5 gives a version of 27 for some reason).
The second can be tested by copying the following code:

Code: Select all

-- VECTRIC LUA SCRIPT
function b2str(b) return b and "true" or "false" end 
function main()
	local aspire = b2str(IsAspire())
	local beta = b2str(IsBetaBuild())
	MessageBox("Aspire: " .. aspire .. " ; Beta: " .. beta .. " ; App: " .. GetAppVersion() .. " ; Build: " .. GetBuildVersion())
	return true;
end
Then go into Aspire and either create a new job or open an existing one. Then select Edit > Paste. A pop-up should appear with some build versions.

ozymax
Vectric Craftsman
Posts: 245
Joined: Thu Jan 02, 2014 4:34 am
Model of CNC Machine: Home built cnc router using Masso G3.

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by ozymax »

Thanks for looking into this for us "Old version folk".
I'm not clear exactly where to post the new script. Is it to go in the registry and if so where exactly?
I can see the gadget in the registry list under the Aspire location, but not sure where or what to do with it.
The registry is not an area I've had much to do with and like to be sure of what I'm doing in there.
This is what I see.
Registry.jpg
Cheers.

User avatar
adze_cnc
Vectric Wizard
Posts: 4364
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by adze_cnc »

 
I guess I shouldn't have mentioned the registry and the lua script in the same post.

Registry

Thanks for the image showing the registry entry for the gadget. That and your initial error screenshot actually helps a great deal.

Nothing more needs to be done within the registry. It is also good to know that you can navigate to that entry if needed.

Aspire v4.5 lua script

I had meant for the code snippet in the previous post to be run from within Aspire.
  1. click "Select All" for the code snippet in my previous post
  2. either press Ctrl+C to copy the code or right-click the mouse on the selected code and select copy from the pop-up menu
  3. either open an existing Aspire file or create a new Aspire job
  4. either press Ctrl+V or select "Edit > Paste" to run the script from within Aspire
You should get a pop-up showing the version number info. A screen shot of that would be great.

Older version compatibility

Up to and including Windows 7 or maybe even Windows 8 you could run programs originally made for Windows 3.1 (originally released 1992). I've got programs on my Mac only a few years old that prevent me from upgrading to the latest OS version as they will become inoperable.

I run VCarve v9.519 but realized that if I posted any gadgets here people using v10 or or higher might want to run them too. So, I've had to come up with a way to ensure compatibility between the two. Difficult in that the way tools are selected and represented is different between the old and new versions.

But with a little thought and a little extra coding I've been able to make things compatible between pre-v10 and post v10.

Other Gadgets

Two other gadgets that I've written that might be of use sometime:

ozymax
Vectric Craftsman
Posts: 245
Joined: Thu Jan 02, 2014 4:34 am
Model of CNC Machine: Home built cnc router using Masso G3.

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by ozymax »

adze_cnc wrote:
Sat Jun 04, 2022 7:57 am
You should get a pop-up showing the version number info. A screen shot of that would be great.
Here is the screen shot of the pop-up after I pasted the script.
Aspire number.jpg
Hope that means something to you. :D

User avatar
adze_cnc
Vectric Wizard
Posts: 4364
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by adze_cnc »

One last thing (again copy and paste into Aspire):

Code: Select all

-- VECTRIC LUA SCRIPT
function main()
	MessageBox("lua version: " .. _VERSION)
	return true;
end
I think I might have found a likely culprit. It's two simple typos that have been around since the beginning. They shouldn't cause a problem but they might.

ozymax
Vectric Craftsman
Posts: 245
Joined: Thu Jan 02, 2014 4:34 am
Model of CNC Machine: Home built cnc router using Masso G3.

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by ozymax »

I get this message.
Lua.jpg
Lua.jpg (5.4 KiB) Viewed 9266 times

User avatar
adze_cnc
Vectric Wizard
Posts: 4364
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by adze_cnc »

Hello again,

VCarve and Aspire 9+ are using Lua version 5.2. I've had a look at the differences between v5.1 and v5.2 and my typos may just be causing a problem.

I've update the release thread: here

ozymax
Vectric Craftsman
Posts: 245
Joined: Thu Jan 02, 2014 4:34 am
Model of CNC Machine: Home built cnc router using Masso G3.

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by ozymax »

Hmmmm, still no go.
I downloaded the new v1.45, unzipped the file and saved it in the gadget folder for Aspire 4.5.
I took some screen shots to see if they help.
Computer pathway.jpg
Gadget select.jpg
Error.jpg
The error is the same as the original, so I'm thinking the typos were not the culprit. :(

User avatar
adze_cnc
Vectric Wizard
Posts: 4364
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by adze_cnc »

It's going to be my "Moby Dick" moment to get this working under Aspre v4.5...

Something that you can try if you're up to editing the lua text file using "notepad".

In the file Tapered_Inlay_Plug.lua
 
notepad.png
 
at lines 265 & 266 [ in the section "function LoadInlayDefaults(options)" ]
 
notepade line numbers.png
 
change from:

Code: Select all

if VERSION < 10 then
   options.def_VBit_name = registry:GetString("VBitName", options.def_VBit_name)
   options.def_EndMill_name = registry:GetString("EndMillName", options.def_EndMill_name)
else
to:

Code: Select all

if VERSION < 10 then
   options.def_VBit_name = registry:GetString("VBitName", "")
   options.def_EndMill_name = registry:GetString("EndMillName", "")
else
and line number 275 (about 7 lines below the previous lines) change from:

Code: Select all

g_toolpath_type = registry:GetString("ToolpathType", g_toolpath_type)

Code: Select all

g_toolpath_type = registry:GetString("ToolpathType", "Tapered Inlay")
These are the only places that "GetString" mentioned in the error message box are. We're just forcing them to be absolute text as a default instead of some computed variable.

Directory Note

You can move the "Tapered_Inlay" folder up to the level that the "Tapered Inlay v1_45" is to save a click in the menu. Something like this:
 
gadget menu.png
 
Thanks again,
Steven

ozymax
Vectric Craftsman
Posts: 245
Joined: Thu Jan 02, 2014 4:34 am
Model of CNC Machine: Home built cnc router using Masso G3.

Re: Tapered Inlay (Paul Zank method) Plug with Rough Clearing: discussion

Post by ozymax »

Ok "Moby", I think I have done this correctly.
Here is the adjusted lua file showing the 2x sections modified.
My file is showing that line 277 is the one that matches your previous posting above, not 275.
So going by the screen shot, have I done it correctly. The red circle is my cursor location to identify the line number.
lua change.jpg
When I try the gadget in Aspire I now have a new message.
New error.jpg

Post Reply