From 090bdf248ac2ddce82b3f564d530bdb686906d91 Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Thu, 11 Jun 2015 14:34:30 +0200 Subject: [PATCH] Added slice abstraction to Slice class --- settings/user_settings.json | 3 +- slice_test.html | 26 +++- src/box.js | 6 +- src/slice.js | 70 ++++++++++ src/slicer.js | 213 ++++++++++++++---------------- src/slicerworker.js | 2 +- webworker/benchmark.js | 9 -- webworker/worker.js | 57 ++++---- webworker_benchmark.html | 74 ----------- webworker_benchmark_resutaten.txt | 19 --- webworker_test.html | 4 +- 11 files changed, 221 insertions(+), 262 deletions(-) create mode 100644 src/slice.js delete mode 100644 webworker/benchmark.js delete mode 100644 webworker_benchmark.html delete mode 100644 webworker_benchmark_resutaten.txt diff --git a/settings/user_settings.json b/settings/user_settings.json index 9715865..3994c88 100644 --- a/settings/user_settings.json +++ b/settings/user_settings.json @@ -11,7 +11,8 @@ "printer.retraction.speed": 50, "printer.retraction.minDistance": 5.0, "printer.shellThickness": 0.4, - "printer.speed": 50.0, + "printer.speed": 50.0, + "printer.brimOffset": 5.0, "printer.temperature": 210.0, "printer.topThickness": 0.8, "printer.travelSpeed": 200.0, diff --git a/slice_test.html b/slice_test.html index d6dc373..66bcf44 100644 --- a/slice_test.html +++ b/slice_test.html @@ -14,6 +14,7 @@ + - - - - - - - \ No newline at end of file diff --git a/webworker_benchmark_resutaten.txt b/webworker_benchmark_resutaten.txt deleted file mode 100644 index bc3bdda..0000000 --- a/webworker_benchmark_resutaten.txt +++ /dev/null @@ -1,19 +0,0 @@ ------------ RESULTATEN TORUS KNOT -------------- - -Buffer Geometry x 0.53 ops/sec ±134.70% (8 runs sampled) - -Buffer Geometry Transferrable Object x 63.04 ops/sec ±2.19% (67 runs sampled) - -Geometry JSON x 0.50 ops/sec ±6.55% (6 runs sampled) - -Fastest is "Buffer Geometry Transferrable Object" - ------------ RESULTATEN KUBUS -------------- - -Buffer Geometry x 5,360 ops/sec ±19.42% (85 runs sampled) - -Buffer Geometry Transferrable Object x 1,535 ops/sec ±10.17% (35 runs sampled) - -Geometry JSON x 3,831 ops/sec ±2.52% (82 runs sampled) - -Fastest is "Buffer Geometry" \ No newline at end of file diff --git a/webworker_test.html b/webworker_test.html index e8eab79..7dc8ffa 100644 --- a/webworker_test.html +++ b/webworker_test.html @@ -86,7 +86,7 @@ function init () { downloadButton.style.display = 'initial'; downloadButton.onclick = function () { - downloadFile("gcode.gcode", gcode.join('\n')); + downloadFile("gcode.gcode", gcode); }; }; @@ -99,7 +99,7 @@ function init () { var mesh = new THREE.Mesh(geometry, material); mesh.rotation.x = -Math.PI/2; - mesh.scale.x = mesh.scale.y = mesh.scale.z = 1; + mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.5; mesh.position.y = -0.1; mesh.position.x = 60; mesh.position.z = 60;