mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-23 11:33:49 +01:00
fixed bug
This commit is contained in:
parent
d9869634c7
commit
c0a84e4207
@ -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);
|
||||||
|
|
||||||
|
@ -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] = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user