chiark / gitweb /
Add infill overlap, added move lines on current layer.
authordaid303 <daid303@gmail.com>
Fri, 10 May 2013 12:45:20 +0000 (14:45 +0200)
committerdaid303 <daid303@gmail.com>
Fri, 10 May 2013 12:45:20 +0000 (14:45 +0200)
Cura/gui/sceneView.py
Cura/util/profile.py
Cura/util/sliceEngine.py

index a4477e5b475a985b6dad7d8fa9d756d7990724fc..56a1402b922c75fe63c54151971f8056987dd0ba 100644 (file)
@@ -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):
index 8071cf9ff893e2d91f9b811a194b5c1aea53e617..c7ee435fc1d29421825c9d279bd94a3d4f609bbd 100644 (file)
@@ -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.')
index 0f2c19681243048271e4be2d896eec8585587611..38a74f9e56e9aef3ab252fe544bad847115fabeb 100644 (file)
@@ -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')),