chiark / gitweb /
Added comments
authorJaime van Kessel <nallath@gmail.com>
Wed, 13 Nov 2013 15:17:04 +0000 (16:17 +0100)
committerJaime van Kessel <nallath@gmail.com>
Wed, 13 Nov 2013 15:17:04 +0000 (16:17 +0100)
Added comments from the master himself.

Cura/gui/sceneView.py
Cura/util/objectScene.py

index 686b3da4eb4aefb0dd450f054b8fd1dae807b937..5974fd8b674ec483fd4e22d382d8f52fe01d7fd3 100644 (file)
@@ -1282,6 +1282,7 @@ void main(void)
                        glVertex3f(-size[0] / 2, -size[1] / 2+10, 0)
                        glEnd()
 
+               #Cornerpoints for big blue square
                v0 = [ size[0] / 2, size[1] / 2, size[2]]
                v1 = [ size[0] / 2,-size[1] / 2, size[2]]
                v2 = [-size[0] / 2, size[1] / 2, size[2]]
@@ -1303,6 +1304,7 @@ void main(void)
                glDrawArrays(GL_QUADS, 12, 8)
                glDisableClientState(GL_VERTEX_ARRAY)
 
+               #Draw checkerboard
                sx = self._machineSize[0]
                sy = self._machineSize[1]
                for x in xrange(-int(sx/20)-1, int(sx / 20) + 1):
@@ -1315,6 +1317,7 @@ void main(void)
                                y1 = max(min(y1, sy/2), -sy/2)
                                x2 = max(min(x2, sx/2), -sx/2)
                                y2 = max(min(y2, sy/2), -sy/2)
+                               #Black or "white"  checker
                                if (x & 1) == (y & 1):
                                        glColor4ub(5, 171, 231, 127)
                                else:
@@ -1325,7 +1328,7 @@ void main(void)
                                glVertex3f(x2, y2, -0.02)
                                glVertex3f(x1, y2, -0.02)
                                glEnd()
-
+               #if UM2, draw bat-area zone for head. THe head can't stop there, because its bat-area.
                glDisable(GL_BLEND)
                glDisable(GL_CULL_FACE)
 
index f73016ac2b368858e7832b0abb192996b73afc96..0d2058086da1a9cfa7ac6fcc0ef290892934fdc3 100644 (file)
@@ -70,6 +70,7 @@ class _objectOrderFinder(object):
                                return True
                return False
 
+       #Check if printing one object will cause printhead colission with other object.
        def _checkHit(self, addIdx, idx):
                addPos = self._scene._objectList[addIdx].getPosition()
                addSize = self._scene._objectList[addIdx].getSize()
@@ -98,16 +99,19 @@ class Scene(object):
                self._sizeOffsets = numpy.array([0.0,0.0], numpy.float32)
                self._machineSize = numpy.array([100,100,100], numpy.float32)
                self._headOffsets = numpy.array([18.0,18.0], numpy.float32)
+               #Print order variables
                self._leftToRight = False
                self._frontToBack = True
                self._gantryHeight = 60
-
+       # Physical (square) machine size.
        def setMachineSize(self, machineSize):
                self._machineSize = machineSize
 
+       # Size offsets are offsets caused by brim, skirt, etc.
        def setSizeOffsets(self, sizeOffsets):
                self._sizeOffsets = sizeOffsets
 
+       #size of the printing head.
        def setHeadSize(self, xMin, xMax, yMin, yMax, gantryHeight):
                self._leftToRight = xMin < xMax
                self._frontToBack = yMin < yMax
@@ -121,6 +125,7 @@ class Scene(object):
        def objects(self):
                return self._objectList
 
+       #Add new object to print area
        def add(self, obj):
                self._findFreePositionFor(obj)
                self._objectList.append(obj)
@@ -133,6 +138,7 @@ class Scene(object):
        def remove(self, obj):
                self._objectList.remove(obj)
 
+       #Dual(multiple) extrusion merge
        def merge(self, obj1, obj2):
                self.remove(obj2)
                obj1._meshList += obj2._meshList
@@ -199,6 +205,7 @@ class Scene(object):
                                return True
                return False
 
+       #Check if two objects are hitting each-other (+ head space).
        def _checkHit(self, a, b):
                if a == b:
                        return False