Skip to content

Commit

Permalink
Merge pull request #3599 from GeneGH/Edits
Browse files Browse the repository at this point in the history
Path Simulator - Recognition of canned cycle cancellation
  • Loading branch information
sliptonic committed Jun 21, 2020
2 parents 92a4fe6 + 894a94c commit e1bfab2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Mod/Path/PathScripts/PathSimulatorGui.py
Expand Up @@ -192,15 +192,20 @@ def PerformCutBoolean(self):
pathSolid = None

if cmd.Name in ['G0']:
self.firstDrill = True
self.curpos = self.RapidMove(cmd, self.curpos)
if cmd.Name in ['G1', 'G2', 'G3']:
self.firstDrill = True
if self.skipStep:
self.curpos = self.RapidMove(cmd, self.curpos)
else:
(pathSolid, self.curpos) = self.GetPathSolid(self.tool, cmd, self.curpos)

if cmd.Name in ['G80']:
self.firstDrill = True
if cmd.Name in ['G81', 'G82', 'G83']:
if self.firstDrill:
extendcommand = Path.Command('G0', {"X": 0.0, "Y": 0.0, "Z": cmd.r})
extendcommand = Path.Command('G0', {"Z": cmd.r})
self.curpos = self.RapidMove(extendcommand, self.curpos)
self.firstDrill = False
extendcommand = Path.Command('G0', {"X": cmd.x, "Y": cmd.y, "Z": cmd.r})
Expand Down Expand Up @@ -248,14 +253,17 @@ def PerformCutVoxel(self):
cmd = self.opCommands[self.icmd]
# for cmd in job.Path.Commands:
if cmd.Name in ['G0', 'G1', 'G2', 'G3']:
self.firstDrill = True
self.curpos = self.voxSim.ApplyCommand(self.curpos, cmd)
if not self.disableAnim:
self.cutTool.Placement = self.curpos
(self.cutMaterial.Mesh, self.cutMaterialIn.Mesh) = self.voxSim.GetResultMesh()
if cmd.Name in ['G80']:
self.firstDrill = True
if cmd.Name in ['G81', 'G82', 'G83']:
extendcommands = []
if self.firstDrill:
extendcommands.append(Path.Command('G0', {"X": 0.0, "Y": 0.0, "Z": cmd.r}))
extendcommands.append(Path.Command('G0', {"Z": cmd.r}))
self.firstDrill = False
extendcommands.append(Path.Command('G0', {"X": cmd.x, "Y": cmd.y, "Z": cmd.r}))
extendcommands.append(Path.Command('G1', {"X": cmd.x, "Y": cmd.y, "Z": cmd.z}))
Expand Down

0 comments on commit e1bfab2

Please sign in to comment.