ExternalToolpathOptions: Difference between revisions
Jump to navigation
Jump to search
| Line 38: | Line 38: | ||
tool.Stepdown = 2.0 | tool.Stepdown = 2.0 | ||
tool.Stepover = 1.0 | tool.Stepover = 1.0 | ||
tool.RateUnits = Tool.MM_SEC -- MM_SEC, MM_MIN, METRES_MIN, | tool.RateUnits = Tool.MM_SEC -- MM_SEC, MM_MIN, METRES_MIN, INCHES_SEC, INCHES_MIN, FEET_MIN | ||
tool.FeedRate = 30 | tool.FeedRate = 30 | ||
tool.PlungeRate = 10 | tool.PlungeRate = 10 | ||
Latest revision as of 11:17, 16 November 2024
This object is used to hold the settings for an external toolpath.
Constructor
ExternalToolpathOptions()
Create a new object ready to have its parameters set
Properties
.CreatePreview
Interaction: Read and Write
Returns: (bool) if true, create preview in 2d view for this toolpath
.StartDepth
Interaction: Read and Write
Returns: (double) Start depth for toolpath below material surface
Example Code:
function CreateToolpath(name, vectors, start_depth)
-- Create tool we will use to machine vectors
local tool = Tool("Lua End Mill",
Tool.END_MILL -- BALL_NOSE, END_MILL, VBIT
)
tool.InMM = true
tool.ToolDia = 3.0
tool.Stepdown = 2.0
tool.Stepover = 1.0
tool.RateUnits = Tool.MM_SEC -- MM_SEC, MM_MIN, METRES_MIN, INCHES_SEC, INCHES_MIN, FEET_MIN
tool.FeedRate = 30
tool.PlungeRate = 10
tool.SpindleSpeed = 20000
tool.ToolNumber = 1
tool.VBit_Angle = 90.0 -- used for vbit only
tool.ClearStepover = 1.0 -- used for vbit only
-- Create object used to set home position and safez gap above material surface
local pos_data = ToolpathPosData()
pos_data:SetHomePosition(0, 0, 5.0)
pos_data.SafeZGap = 5.0
-- object used to pass data on toolpath settings
toolpath_options = ExternalToolpathOptions()
toolpath_options.StartDepth = start_depth
toolpath_options.CreatePreview = true
-- Create our toolpath
local toolpath = ExternalToolpath(name,tool, pos_data, toolpath_options, vectors)
if toolpath:Error() then
DisplayMessageBox("Error creating toolpath")
return
end
local toolpath_manager = ToolpathManager()
success = toolpath_manager:AddExternalToolpath(toolpath)
return success
end
References
Please Note: The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at Vertric Developer Information