Ejemplo n.º 1
0
 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"
Ejemplo n.º 2
0
 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
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
    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)
Ejemplo n.º 5
0
    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)
Ejemplo n.º 6
0
 def F(f=None):
     return (" F" + fmt(f) if f else "")
Ejemplo n.º 7
0
 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"
Ejemplo n.º 8
0
 def F(f=None):
     return (" F" + fmt(f) if f else "")