fixed bug

This commit is contained in:
casperlamboo 2015-05-07 17:43:27 +02:00
parent d9869634c7
commit c0a84e4207
2 changed files with 2 additions and 2 deletions

View File

@ -119,7 +119,7 @@ gcode = slicer.getGcode(printer);
var canvas = document.getElementById("canvas"); var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d"); var context = canvas.getContext("2d");
//var layer = 0; var layer = 0;
//var img = slicer.drawPaths(printer, layer, layer + 1); //var img = slicer.drawPaths(printer, layer, layer + 1);
//context.drawImage(img, 0, 0); //context.drawImage(img, 0, 0);

View File

@ -96,7 +96,7 @@ D3D.Slicer.prototype.slice = function (height, step) {
var min = Math.ceil(Math.min(line.line.start.y, line.line.end.y) / step); var min = Math.ceil(Math.min(line.line.start.y, line.line.end.y) / step);
var max = Math.floor(Math.max(line.line.start.y, line.line.end.y) / step); var max = Math.floor(Math.max(line.line.start.y, line.line.end.y) / step);
for (var layerIndex = min; layerIndex < max; layerIndex ++) { for (var layerIndex = min; layerIndex <= max; layerIndex ++) {
if (layerIndex >= 0) { if (layerIndex >= 0) {
if (layersIntersections[layerIndex] === undefined) { if (layersIntersections[layerIndex] === undefined) {
layersIntersections[layerIndex] = []; layersIntersections[layerIndex] = [];