From: daid303 Date: Fri, 10 May 2013 12:45:20 +0000 (+0200) Subject: Add infill overlap, added move lines on current layer. X-Git-Tag: 13.05~21 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2dc401f0993ed28ecdfca9d43198c4ff547ba2fd;p=cura.git Add infill overlap, added move lines on current layer. --- diff --git a/Cura/gui/sceneView.py b/Cura/gui/sceneView.py index a4477e5b..56a1402b 100644 --- a/Cura/gui/sceneView.py +++ b/Cura/gui/sceneView.py @@ -828,6 +828,8 @@ void main(void) glColor3f(0, c, c) self._gcodeVBOs[n][8].render(GL_QUADS) self._gcodeVBOs[n][9].render(GL_QUADS) + glColor3f(0, 0, c) + self._gcodeVBOs[n][10].render(GL_LINES) else: glColor3f(c, 0, 0) self._gcodeVBOs[n][0].render(GL_LINES) @@ -1091,14 +1093,26 @@ void main(void) normal[:,1] *= lineWidth b = numpy.zeros((len(a)-1, 0), numpy.float32) - b = numpy.concatenate((b, a[:-1] + normal), 1) b = numpy.concatenate((b, a[1:] + normal), 1) b = numpy.concatenate((b, a[1:] - normal), 1) b = numpy.concatenate((b, a[:-1] - normal), 1) + b = numpy.concatenate((b, a[:-1] + normal), 1) + #b = numpy.concatenate((b, a[:-1]), 1) + #b = numpy.concatenate((b, a[:-1]), 1) b = b.reshape((len(b) * 4, 3)) pointList = numpy.concatenate((pointList, b)) ret.append(opengl.GLVBO(pointList)) + + pointList = numpy.zeros((0,3), numpy.float32) + for path in layer: + if path.type == 'move' or path.type == 'retract': + a = path.points + a = numpy.concatenate((a[:-1], a[1:]), 1) + a = a.reshape((len(a) * 2, 3)) + pointList = numpy.concatenate((pointList, a)) + ret.append(opengl.GLVBO(pointList)) + return ret def getObjectCenterPos(self): diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 8071cf9f..c7ee435f 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -158,7 +158,7 @@ setting('cool_head_lift', True, bool, 'expert', 'Cool').setLabel('C #setting('infill_type', 'Line', ['Line', 'Grid Circular', 'Grid Hexagonal', 'Grid Rectangular'], 'expert', 'Infill').setLabel('Infill pattern', 'Pattern of the none-solid infill. Line is default, but grids can provide a strong print.') setting('solid_top', True, bool, 'expert', 'Infill').setLabel('Solid infill top', 'Create a solid top surface, if set to false the top is filled with the fill percentage. Useful for cups/vases.') setting('solid_bottom', True, bool, 'expert', 'Infill').setLabel('Solid infill bottom', 'Create a solid bottom surface, if set to false the bottom is filled with the fill percentage. Useful for buildings.') -#setting('fill_overlap', 15, int, 'expert', 'Infill').setRange(0,100).setLabel('Infill overlap (%)', 'Amount of overlap between the infill and the walls. There is a slight overlap with the walls and the infill so the walls connect firmly to the infill.') +setting('fill_overlap', 15, int, 'expert', 'Infill').setRange(0,100).setLabel('Infill overlap (%)', 'Amount of overlap between the infill and the walls. There is a slight overlap with the walls and the infill so the walls connect firmly to the infill.') #setting('support_rate', 50, int, 'expert', 'Support').setRange(0,100).setLabel('Material amount (%)', 'Amount of material used for support, less material gives a weaker support structure which is easier to remove.') #setting('support_distance', 0.5, float, 'expert', 'Support').setRange(0).setLabel('Distance from object (mm)', 'Distance between the support structure and the object. Empty gap in which no support structure is printed.') #setting('joris', False, bool, 'expert', 'Joris').setLabel('Spiralize the outer contour', '[Joris] is a code name for smoothing out the Z move of the outer edge. This will create a steady Z increase over the whole print. It is intended to be used with a single walled wall thickness to make cups/vases.') diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 0f2c1968..38a74f9e 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -197,6 +197,7 @@ class Slicer(object): 'downSkinCount': int(profile.calculateSolidLayerCount()) if profile.getProfileSetting('solid_bottom') == 'True' else 0, 'upSkinCount': int(profile.calculateSolidLayerCount()) if profile.getProfileSetting('solid_top') == 'True' else 0, 'sparseInfillLineDistance': int(100 * profile.calculateEdgeWidth() * 1000 / profile.getProfileSettingFloat('fill_density')) if profile.getProfileSettingFloat('fill_density') > 0 else -1, + 'infillOverlap': int(profile.getProfileSettingFloat('fill_overlap')), 'initialSpeedupLayers': int(4), 'initialLayerSpeed': int(profile.getProfileSettingFloat('bottom_layer_speed')), 'printSpeed': int(profile.getProfileSettingFloat('print_speed')),