def addSupportLayer(self, endpoints, layer): 'Add support layer before the object layer.' # TODO refactor to parent object - avoid duplication for line in self.supportStartLines: layer.preSupportGcodeCommands.append(line) aroundPixelTable = {} aroundWidth = 0.25 * self.interfaceStep boundaryLoops = self.boundaryLayers[layer.index] halfSupportOutset = 0.5 * self.supportOutset aroundBoundaryLoops = intercircle.getAroundsFromLoops( boundaryLoops, halfSupportOutset) for aroundBoundaryLoop in aroundBoundaryLoops: euclidean.addLoopToPixelTable(aroundBoundaryLoop, aroundPixelTable, aroundWidth) paths = euclidean.getPathsFromEndpoints(endpoints, 1.5 * self.interfaceStep, aroundPixelTable, aroundWidth) feedRateMinuteMultiplied = self.supportFeedRate * 60 supportFlowRateMultiplied = self.supportFlowRateRatio * self.supportFeedRate for path in paths: supportPath = SupportPath(self.slicedModel.runtimeParameters) supportPath.addPath(path) layer.supportPaths.append(supportPath) layer.postSupportGcodeCommands.extend(self.supportEndLines)
def skirt(self): 'Add skirt to model' if self.layersTo > len(self.slicedModel.layers): self.layersTo = len(self.slicedModel.layers) self.addLayerToUnifiedLoop(self.slicedModel.layers[0]) brimLoops = self.createSkirtLoops(0, self.brimLoopsCount) if self.gapOverPerimeterWidth != 0: for layerIndex in xrange(1, self.layersTo): self.addLayerToUnifiedLoop(self.slicedModel.layers[layerIndex]) skirtLoops = self.createSkirtLoops(self.skirtGap, 1) for layerIndex in xrange(self.layersTo): for skirtLoop in skirtLoops: supportPath = SupportPath(self.slicedModel.runtimeParameters) supportPath.addPath(skirtLoop) self.slicedModel.layers[layerIndex].supportPaths.append(supportPath) if self.outerInner: brimLoops.reverse() for brimLoop in brimLoops: supportPath = SupportPath(self.slicedModel.runtimeParameters) supportPath.addPath(brimLoop) self.slicedModel.layers[0].supportPaths.append(supportPath)
def skirt(self): "Add skirt to model" if self.layersTo > len(self.slicedModel.layers): self.layersTo = len(self.slicedModel.layers) self.addLayerToUnifiedLoop(self.slicedModel.layers[0]) brimLoops = self.createSkirtLoops(0, self.brimLoopsCount) if self.gapOverPerimeterWidth != 0: for layerIndex in xrange(1, self.layersTo): self.addLayerToUnifiedLoop(self.slicedModel.layers[layerIndex]) skirtLoops = self.createSkirtLoops(self.skirtGap, 1) for layerIndex in xrange(self.layersTo): for skirtLoop in skirtLoops: supportPath = SupportPath(self.slicedModel.runtimeParameters) supportPath.addPath(skirtLoop) self.slicedModel.layers[layerIndex].supportPaths.append(supportPath) if self.outerInner: brimLoops.reverse() for brimLoop in brimLoops: supportPath = SupportPath(self.slicedModel.runtimeParameters) supportPath.addPath(brimLoop) self.slicedModel.layers[0].supportPaths.append(supportPath)
def addSupportLayer(self, endpoints, layer): 'Add support layer before the object layer.' # TODO refactor to parent object - avoid duplication for line in self.supportStartLines: layer.preSupportGcodeCommands.append(line) aroundPixelTable = {} aroundWidth = 0.25 * self.interfaceStep boundaryLoops = self.boundaryLayers[layer.index] halfSupportOutset = 0.5 * self.supportOutset aroundBoundaryLoops = intercircle.getAroundsFromLoops(boundaryLoops, halfSupportOutset) for aroundBoundaryLoop in aroundBoundaryLoops: euclidean.addLoopToPixelTable(aroundBoundaryLoop, aroundPixelTable, aroundWidth) paths = euclidean.getPathsFromEndpoints(endpoints, 1.5 * self.interfaceStep, aroundPixelTable, aroundWidth) feedRateMinuteMultiplied = self.supportFeedRate * 60 supportFlowRateMultiplied = self.supportFlowRateRatio * self.supportFeedRate for path in paths: supportPath = SupportPath(self.slicedModel.runtimeParameters) supportPath.addPath(path) layer.supportPaths.append(supportPath) layer.postSupportGcodeCommands.extend(self.supportEndLines)