def getCraftedGcode( self, gcodeText, repository ): 'Parse gcode text and store the joris gcode.' self.lines = archive.getTextLines(gcodeText) self.repository = repository self.layersFromBottom = repository.layersFrom.value self.parseInitialization() for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) return gcodec.getGcodeWithoutDuplication('M108', self.distanceFeedRate.output.getvalue())
def getCraftedGcode(self, gcodeText, repository): "Parse gcode text and store the skirt gcode." self.repository = repository self.lines = archive.getTextLines(gcodeText) self.parseInitialization() self.parseBoundaries() self.createSkirtLoops() for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) return gcodec.getGcodeWithoutDuplication("M108", self.distanceFeedRate.output.getvalue())
def getCraftedGcode(self, gcodeText, repository): 'Parse gcode text and store the skirt gcode.' self.repository = repository self.lines = archive.getTextLines(gcodeText) self.parseInitialization() self.parseBoundaries() self.createSkirtLoops() for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) return gcodec.getGcodeWithoutDuplication( 'M108', self.distanceFeedRate.output.getvalue())
def getCraftedGcode(self, gcodeText, repository): 'Parse gcode text and store the dwindle gcode.' self.lines = archive.getTextLines(gcodeText) self.repository = repository self.parseInitialization() self.area = self.infillWidth * self.layerHeight self.oneOverSteps = 1.0 / float(repository.slowdownSteps.value) self.halfOverSteps = 0.5 * self.oneOverSteps for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) return gcodec.getGcodeWithoutDuplication('M108', self.distanceFeedRate.output.getvalue())
def getCraftedGcode( self, gcodeText, repository ): 'Parse gcode text and store the skin gcode.' self.lines = archive.getTextLines(gcodeText) self.repository = repository self.layersFromBottom = self.repository.layersFrom.value self.parseInitialization() self.skinInfillInset = 0.5 * (self.infillWidth + self.skinInfillWidth) * (1.0 - self.infillPerimeterOverlap) self.clipLength = 0.5 * self.clipOverPerimeterWidth * self.perimeterWidth self.parseBoundaries() for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) return gcodec.getGcodeWithoutDuplication('M108', self.distanceFeedRate.output.getvalue())
def getCraftedGcode(self, gcodeText, repository): "Parse gcode text and store the dwindle gcode." self.lines = archive.getTextLines(gcodeText) self.repository = repository self.parseInitialization() if self.operatingFlowRate == None: print("Warning, there is no operatingFlowRate so dwindle will do nothing.") return gcodeText self.area = self.infillWidth * self.layerHeight * self.volumeFraction self.oneOverSteps = 1.0 / float(repository.slowdownSteps.value) self.halfOverSteps = 0.5 * self.oneOverSteps for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) return gcodec.getGcodeWithoutDuplication("M108", self.distanceFeedRate.output.getvalue())
def getCraftedGcode(self, gcodeText, repository): 'Parse gcode text and store the dwindle gcode.' self.lines = archive.getTextLines(gcodeText) self.repository = repository self.parseInitialization() if self.operatingFlowRate == None: print('Warning, there is no operatingFlowRate so dwindle will do nothing.') return gcodeText self.area = self.infillWidth * self.layerHeight * self.volumeFraction self.oneOverSteps = 1.0 / float(repository.slowdownSteps.value) self.halfOverSteps = 0.5 * self.oneOverSteps for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) return gcodec.getGcodeWithoutDuplication('M108', self.distanceFeedRate.output.getvalue())
def getCraftedGcode(self, gcodeText, repository): 'Parse gcode text and store the skin gcode.' self.lines = archive.getTextLines(gcodeText) self.repository = repository self.layersFromBottom = self.repository.layersFrom.value self.parseInitialization() self.skinInfillInset = 0.5 * (self.infillWidth + self.skinInfillWidth ) * (1.0 - self.infillPerimeterOverlap) self.clipLength = 0.5 * self.clipOverPerimeterWidth * self.perimeterWidth self.parseBoundaries() for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) return gcodec.getGcodeWithoutDuplication( 'M108', self.distanceFeedRate.output.getvalue())
def getCraftedGcode(self, gcodeText, repository): "Parse gcode text and store the skin gcode." self.lines = archive.getTextLines(gcodeText) self.repository = repository self.layersFromBottom = repository.layersFrom.value self.horizontalInfillDivisionsFloat = float(repository.horizontalInfillDivisions.value) self.horizontalPerimeterDivisionsFloat = float(repository.horizontalPerimeterDivisions.value) self.verticalDivisions = max(repository.verticalDivisions.value, 1) self.verticalDivisionsFloat = float(self.verticalDivisions) self.parseInitialization() self.clipLength = 0.5 * self.clipOverEdgeWidth * self.edgeWidth self.skinInfillInset = 0.5 * (self.infillWidth + self.skinInfillWidth) * (1.0 - self.infillPerimeterOverlap) self.parseBoundaries() for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) return gcodec.getGcodeWithoutDuplication("M108", self.distanceFeedRate.output.getvalue())
def getCraftedGcode(self, gcodeText, repository): 'Parse gcode text and store the cool gcode.' self.repository = repository self.coolEndLines = settings.getAlterationFileLines(repository.nameOfCoolEndFile.value) self.coolStartLines = settings.getAlterationFileLines(repository.nameOfCoolStartFile.value) self.halfCorner = complex(repository.minimumOrbitalRadius.value, repository.minimumOrbitalRadius.value) self.lines = archive.getTextLines(gcodeText) self.minimumArea = 4.0 * repository.minimumOrbitalRadius.value * repository.minimumOrbitalRadius.value self.parseInitialization() self.boundingRectangle = gcodec.BoundingRectangle().getFromGcodeLines(self.lines[self.lineIndex :], 0.5 * self.edgeWidth) margin = 0.2 * self.edgeWidth halfCornerMargin = self.halfCorner + complex(margin, margin) self.boundingRectangle.cornerMaximum -= halfCornerMargin self.boundingRectangle.cornerMinimum += halfCornerMargin for self.lineIndex in xrange(self.lineIndex, len(self.lines)): line = self.lines[self.lineIndex] self.parseLine(line) if repository.turnFanOffAtEnding.value: self.distanceFeedRate.addLine('M107') return gcodec.getGcodeWithoutDuplication('M108', self.distanceFeedRate.output.getvalue())