Drilling handles multiple locations

Jog rates started
Automatically create default tool in new job.
This commit is contained in:
sliptonic
2016-08-16 08:53:33 -05:00
committed by Yorik van Havre
parent e790963a45
commit 2f04ea9586
20 changed files with 1941 additions and 224 deletions

View File

@@ -131,9 +131,9 @@ class ObjectSurface:
for loop in loops:
p = loop[0]
loopstring = "(loop begin)" + "\n"
loopstring += "G0 Z" + str(obj.SafeHeight.Value) + "\n"
loopstring += "G0 Z" + str(obj.SafeHeight.Value) + "F " + PathUtils.fmt(self.vertRapid) + "\n"
loopstring += "G0 X" + \
str(fmt(p.x)) + " Y" + str(fmt(p.y)) + "\n"
str(fmt(p.x)) + " Y" + str(fmt(p.y)) + "F " + PathUtils.fmt(self.horizRapid) + "\n"
loopstring += "G1 Z" + str(fmt(p.z)) + "\n"
for p in loop[1:]:
loopstring += "G1 X" + \
@@ -239,8 +239,8 @@ class ObjectSurface:
# generate the path commands
output = ""
output += "G0 Z" + str(obj.ClearanceHeight.Value) + "\n"
output += "G0 X" + str(clp[0].x) + " Y" + str(clp[0].y) + "\n"
output += "G0 Z" + str(obj.ClearanceHeight.Value) + "F " + PathUtils.fmt(self.vertRapid) + "\n"
output += "G0 X" + str(clp[0].x) + " Y" + str(clp[0].y) + "F " + PathUtils.fmt(self.horizRapid) + "\n"
output += "G1 Z" + str(clp[0].z) + " F" + str(self.vertFeed) + "\n"
for c in clp:
@@ -261,14 +261,21 @@ class ObjectSurface:
if toolLoad is None or toolLoad.ToolNumber == 0:
self.vertFeed = 100
self.horizFeed = 100
self.vertRapid = 100
self.horizRapid = 100
self.radius = 0.25
obj.ToolNumber = 0
obj.ToolDescription = "UNDEFINED"
else:
self.vertFeed = toolLoad.VertFeed.Value
self.horizFeed = toolLoad.HorizFeed.Value
self.vertRapid = toolLoad.VertRapid.Value
self.horizRapid = toolLoad.HorizRapid.Value
tool = PathUtils.getTool(obj, toolLoad.ToolNumber)
self.radius = tool.Diameter/2
if tool.Diameter == 0:
self.radius = 0.25
else:
self.radius = tool.Diameter/2
obj.ToolNumber = toolLoad.ToolNumber
obj.ToolDescription = toolLoad.Name