fixed spelling errors

This commit is contained in:
casperlamboo 2015-06-12 21:19:56 +02:00 committed by Simon Voordouw
parent f8d022226f
commit 0670d54f4e
62 changed files with 114 additions and 95 deletions

View File

@ -31,7 +31,7 @@ $(document).ready(function () {
var slice = $("<li class='hidden'><a href='slice_test.html#" + localip + "'>" + name + "</a></li>");
var webworker = $("<li class='hidden'><a href='webworker_test.html#" + localip + "'>" + name + "</a></li>");
var editor = $("<li class='hidden'><a href='three.js-master/editor_viewer#" + localip + "'>" + name + "</a></li>");
var editor = $("<li class='hidden'><a href='three.js-master/editor_slicer#" + localip + "'>" + name + "</a></li>");
listSliceTest.append(slice);
listSliceWebworker.append(webworker);

View File

@ -4,16 +4,16 @@
"topThickness": 0.8,
"shellThickness": 0.4,
"brimOffset": 5.0,
"fillGritSize": 5.0,
"fillGridSize": 5.0,
"travelSpeed": 200.0,
"retractionAmount": 3.0,
"retractionEnabled": true,
"retractionSpeed": 50.0,
"retractionMinDistance": 0.0,
"supportAccaptanceMargin": 1.5,
"supportDistanceY": 0.4,
"supportAcceptanceMargin": 1.5,
"supportDistanceY": 0.2,
"supportUse": true,
"supportGritSize": 6.0,
"supportGridSize": 6.0,
"supportMargin": 2.0,
"supportPlateSize": 4.0,
"outerLine": {

View File

@ -134,6 +134,8 @@ D3D.Slicer.prototype.slice = function (layerHeight, height) {
for (var layer = 0; layer < layersIntersections.length; layer ++) {
var layerIntersections = layersIntersections[layer];
if (layerIntersections.length > 0) {
var y = layer * layerHeight;
var intersections = [];
@ -203,7 +205,7 @@ D3D.Slicer.prototype.slice = function (layerHeight, height) {
}
//think this check is not nescesary, always higher as 0
if (shape.length > 0) {
if (shape.length > 1) {
var part = new D3D.Paths([shape]).clean(0.01);
sliceParts.push(part);
}
@ -235,6 +237,7 @@ D3D.Slicer.prototype.slice = function (layerHeight, height) {
this.progress.sliceLayer = layer;
this.updateProgress();
}
}
return slices;
};
D3D.Slicer.prototype.slicesToData = function (slices, printer) {
@ -245,13 +248,13 @@ D3D.Slicer.prototype.slicesToData = function (slices, printer) {
var layerHeight = printer.config["layerHeight"];
var nozzleDiameter = printer.config["nozzleDiameter"] * scale;
var shellThickness = printer.config["shellThickness"] * scale;
var fillGritSize = printer.config["fillGritSize"] * scale;
var fillGridSize = printer.config["fillGridSize"] * scale;
var brimOffset = printer.config["brimOffset"] * scale;
var bottomThickness = printer.config["bottomThickness"];
var topThickness = printer.config["topThickness"];
var useSupport = printer.config["supportUse"];
var supportGritSize = printer.config["supportGritSize"] * scale;
var supportAccaptanceMargin = printer.config["supportAccaptanceMargin"] * scale;
var supportGridSize = printer.config["supportGridSize"] * scale;
var supportAcceptanceMargin = printer.config["supportAcceptanceMargin"] * scale;
var supportMargin = printer.config["supportMargin"] * scale;
var plateSize = printer.config["supportPlateSize"] * scale;
var supportDistanceY = printer.config["supportDistanceY"];
@ -266,12 +269,16 @@ D3D.Slicer.prototype.slicesToData = function (slices, printer) {
top: this.geometry.boundingBox.min.x * scale,
right: this.geometry.boundingBox.max.z * scale,
bottom: this.geometry.boundingBox.max.x * scale
}, fillGritSize, true, true);
}, fillGridSize, true, true);
console.log("generating outer lines and inner lines");
for (var layer = 0; layer < slices.length; layer ++) {
var slice = slices[layer];
if (layer === 0) {
console.log(slice.parts[0]);
}
for (var i = 0; i < slice.parts.length; i ++) {
var part = slice.parts[i];
@ -340,7 +347,7 @@ D3D.Slicer.prototype.slicesToData = function (slices, printer) {
top: this.geometry.boundingBox.min.x * scale,
right: this.geometry.boundingBox.max.z * scale,
bottom: this.geometry.boundingBox.max.x * scale
}, supportGritSize, true, true);
}, supportGridSize, true, true);
var supportAreas = new D3D.Paths([], true);
@ -375,7 +382,7 @@ D3D.Slicer.prototype.slicesToData = function (slices, printer) {
var slicePart = slice.parts[i];
var outerLine = slicePart.outerLine;
var overlap = supportSkin.offset(supportAccaptanceMargin).intersect(outerLine);
var overlap = supportSkin.offset(supportAcceptanceMargin).intersect(outerLine);
var overhang = outerLine.difference(overlap);
if (overlap.length === 0 || overhang.length > 0) {
@ -384,7 +391,7 @@ D3D.Slicer.prototype.slicesToData = function (slices, printer) {
//supportAreas = supportAreas.union(overhang);
supportAreas = supportAreas.union(overhang.offset(supportAccaptanceMargin).intersect(outerLine));
supportAreas = supportAreas.union(overhang.offset(supportAcceptanceMargin).intersect(outerLine));
}
}
}

View File

@ -1,7 +1,7 @@
D3D.SlicerWorker = function () {
'use strict';
this.worker = new Worker('../../webworker/worker.js');
this.worker = new Worker(window.location.origin + '/webworker/worker.js');
var scope = this;
this.worker.addEventListener('message', function (event) {

View File

@ -65,6 +65,19 @@ Sidebar.Geometry.Modifiers = function ( signals, object ) {
}
var button = new UI.Button( 'Snap to grid' );
button.onClick( function () {
geometry.computeBoundingBox();
object.position.y = -geometry.boundingBox.min.y;
object.updateMatrix();
} );
container.add( button );
//
return container;

View File

@ -125,7 +125,6 @@ Sidebar.Slicer = function ( editor ) {
var slicer = new D3D.SlicerWorker();
slicer.onprogress = function (_progress) {
console.log(_progress);
progress.setValue(Math.round(_progress.procent * 100) + "%");
};
slicer.onfinish = function (gcode) {

View File

@ -99,8 +99,8 @@ function init () {
var mesh = new THREE.Mesh(geometry, material);
mesh.rotation.x = -Math.PI/2;
mesh.scale.x = mesh.scale.y = mesh.scale.z = 0.5;
mesh.position.y = -0.1;
mesh.scale.x = mesh.scale.y = mesh.scale.z = 1;
//mesh.position.y = -0.1;
mesh.position.x = 60;
mesh.position.z = 60;