+
+ vertexTotal = 0
+ for obj in scene.objects():
+ if scene.checkPlatform(obj):
+ for mesh in obj._meshList:
+ vertexTotal += mesh.vertexCount
+
+ f.write(numpy.array([vertexTotal], numpy.int32).tostring())
+ for obj in scene.objects():
+ if scene.checkPlatform(obj):
+ for mesh in obj._meshList:
+ vertexes = (numpy.matrix(mesh.vertexes, copy = False) * numpy.matrix(obj._matrix, numpy.float32)).getA()
+ vertexes -= obj._drawOffset
+ vertexes += numpy.array([obj.getPosition()[0], obj.getPosition()[1], 0.0])
+ f.write(vertexes.tostring())
+
+ commandList += ['#']
+ self._objCount = 1
+ else:
+ for n in order:
+ obj = scene.objects()[n]
+ for mesh in obj._meshList:
+ f.write(numpy.array([mesh.vertexCount], numpy.int32).tostring())
+ f.write(mesh.vertexes.tostring())
+ pos = obj.getPosition() * 1000
+ pos += numpy.array([profile.getPreferenceFloat('machine_width') * 1000 / 2, profile.getPreferenceFloat('machine_depth') * 1000 / 2])
+ commandList += ['-m', ','.join(map(str, obj._matrix.getA().flatten()))]
+ commandList += ['-s', 'posx=%d' % int(pos[0]), '-s', 'posy=%d' % int(pos[1])]
+ commandList += ['#' * len(obj._meshList)]
+ self._objCount += 1