Added toolpath order difference in v9 and v10+

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

Added toolpath order difference in v9 and v10+

Post by adze_cnc »

My education of writing a gadget has stalled a bit. Learning Lua and the SDK on the fly seems daunting.

I wanted to quickly test the validity of creating a number of "VCarve / Engraving" toolpaths. So I hard coded some values and called a CreateVCarvingToolpath function linearly rather than in a loop.

An excerpt of the code is below. The CreateVCarvingToolpath function is hard coded to write a flat tool. This is just to show the names of the three toolpaths expected:

Code: Select all

CreateVCarvingToolpath( 
                       "Test VCarve Rough 1", 
                       0.0, 0.125, vbit_angle,
                       tool_dia, tool_stepdown, 
                       tool_stepover_percent, tool_in_mm 
                      )
    
CreateVCarvingToolpath( 
                       "Test VCarve Rough 2", 
                       0.125, 0.0625, vbit_angle,
                       tool_dia, tool_stepdown, 
                       tool_stepover_percent, tool_in_mm 
                      )
    
CreateVCarvingToolpath( 
                       "Test VCarve Finish", 
                        start_depth, flat_depth, vbit_angle,
                        tool_dia, tool_stepdown, 
                        tool_stepover_percent, tool_in_mm 
                       )
The sample code run in VCarve 11 (trial) produces results in this image:

--
VCarve v11 (trial) proper order at the tail of the list
VCarve v11 (trial) proper order at the tail of the list
--

It adds the tools to the end of the list after the three exisiting toolpaths. Ignore the lack of a "...[Pocket]" toolpath as that's a known limitation that I hadn't compensated for.

The same code run in VCarve Pro v9.519 results in this image:

--
VCarve Pro v9.519 reverse order at the head of the list
VCarve Pro v9.519 reverse order at the head of the list
--

Each toolpath is added to the top of the list before the three existing toolpaths. After the three CreateVCarvingToolpath functions are run the toolpaths they create are in "reverse order"—although each end mill "[Pocket]" toolpath does come before its associated v-bit toolpath.

I can find nothing in the SDK PDF document (for the ver 9 series) indicating how to add the toolpath either at the end of the list or in the order they are created.

I don't really want to collect all the toolpaths into a stack / queue and bulk create them later using "last in first out" (LIFO) logic.

Any thoughts?

Steven

User avatar
Adrian
Vectric Archimage
Posts: 14541
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: Added toolpath order difference in v9 and v10+

Post by Adrian »

I can't remember which version (I think it was 10) it was but there was a change to the software itself regarding where new multi-part toolpaths were added.

Before that change they were added to the top and after they were added to the bottom. Not sure about the ordering but it's probably connected to the difference in the "under the hood" workings between the different versions.

Post Reply