def arc(x, y, i, j, z, f): if obj.Direction == "CW": code = "G2" elif obj.Direction == "CCW": code = "G3" return code + " I" + fmt(i) + " J" + fmt(j) + " X" + fmt( x) + " Y" + fmt(y) + " Z" + fmt(z) + F(f) + "\n"
def xyz(x=None, y=None, z=None): out = "" if x is not None: out += " X" + fmt(x) if y is not None: out += " Y" + fmt(y) if z is not None: out += " Z" + fmt(z) return out
def circularHoleExecute(self, obj, holes): '''circularHoleExecute(obj, holes) ... generate helix commands for each hole in holes''' PathLog.track() self.commandlist.append(Path.Command('(helix cut operation)')) self.commandlist.append(Path.Command('G0', {'Z': obj.ClearanceHeight.Value, 'F': self.vertRapid})) zsafe = max(baseobj.Shape.BoundBox.ZMax for baseobj, features in obj.Base) + obj.ClearanceHeight.Value output = '' output += "G0 Z" + fmt(zsafe) for hole in holes: output += self.helix_cut(obj, hole['x'], hole['y'], hole['r'] / 2, 0.0, (float(obj.StepOver.Value)/50.0) * self.radius) PathLog.debug(output)
def circularHoleExecute(self, obj, holes): '''circularHoleExecute(obj, holes) ... generate helix commands for each hole in holes''' PathLog.track() self.commandlist.append(Path.Command('(helix cut operation)')) self.commandlist.append( Path.Command('G0', { 'Z': obj.ClearanceHeight.Value, 'F': self.vertRapid })) zsafe = max( baseobj.Shape.BoundBox.ZMax for baseobj, features in obj.Base) + obj.ClearanceHeight.Value output = '' output += "G0 Z" + fmt(zsafe) for hole in holes: output += self.helix_cut(obj, hole['x'], hole['y'], hole['r'] / 2, 0.0, (float(obj.StepOver.Value) / 50.0) * self.radius) PathLog.debug(output)
def F(f=None): return (" F" + fmt(f) if f else "")
def arc(x, y, i, j, z, f): if obj.Direction == "CW": code = "G2" elif obj.Direction == "CCW": code = "G3" return code + " I" + fmt(i) + " J" + fmt(j) + " X" + fmt(x) + " Y" + fmt(y) + " Z" + fmt(z) + F(f) + "\n"