Beispiel #1
0
    def g11_retract_recover(self, line, values):
        # print "g11_retract_recover", values

        if self.retracted:
            current_position = self.getRealPos()
            values = {
                    "F": PrinterProfile.getRetractFeedrate(),
                    "A": current_position[A_AXIS] + PrinterProfile.getRetractLength(),
                    }
            self.g0("G11", values)
            self.retracted = False
Beispiel #2
0
    def g10_retract(self, line, values):
        # print "g10_retract", values

        # Compute retract 
        if not self.retracted:
            current_position = self.getRealPos()
            values = {
                    "F": PrinterProfile.getRetractFeedrate(),
                    "A": current_position[A_AXIS] - PrinterProfile.getRetractLength(),
                    }
            self.g0("G10", values)
            self.retracted = True
Beispiel #3
0
    def g11_retract_recover(self, line, values):
        # print "g11_retract_recover", values

        current_position = self.getPos()

        rl = PrinterProfile.getRetractLength()

        current_position[A_AXIS] += rl

        self.planner.addMove(
            TravelMove(line,
                       displacement_vector=Vector([0.0, 0.0, 0.0, rl, 0.0]),
                       displacement_vector_steps=[
                           0.0, 0.0, 0.0, rl * self.steps_per_mm[A_AXIS], 0.0
                       ],
                       feedrate=min(PrinterProfile.getRetractFeedrate(),
                                    PrinterProfile.getMaxFeedrate(3))))

        self.setPos(current_position)