mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-19 04:27:55 +01:00
fix join
This commit is contained in:
parent
f1475e8b97
commit
3f43477ef6
@ -16,14 +16,14 @@ System.config({
|
||||
},
|
||||
|
||||
map: {
|
||||
"Doodle3D/clipper-js": "github:Doodle3D/clipper-js@0.0.2",
|
||||
"Doodle3D/clipper-js": "github:Doodle3D/clipper-js@master",
|
||||
"babel": "npm:babel-core@5.8.38",
|
||||
"babel-runtime": "npm:babel-runtime@5.8.38",
|
||||
"casperlamboo/EventDispatcher": "github:casperlamboo/EventDispatcher@master",
|
||||
"core-js": "npm:core-js@0.9.18",
|
||||
"json": "github:systemjs/plugin-json@0.1.0",
|
||||
"three.js": "github:mrdoob/three.js@r72",
|
||||
"github:Doodle3D/clipper-js@0.0.2": {
|
||||
"github:Doodle3D/clipper-js@master": {
|
||||
"clipper-lib": "npm:clipper-lib@1.0.0"
|
||||
},
|
||||
"github:jspm/nodelibs-assert@0.1.0": {
|
||||
|
@ -5,7 +5,7 @@
|
||||
"lib": "src"
|
||||
},
|
||||
"dependencies": {
|
||||
"Doodle3D/clipper-js": "github:Doodle3D/clipper-js@^0.0.2",
|
||||
"Doodle3D/clipper-js": "github:Doodle3D/clipper-js@master",
|
||||
"casperlamboo/EventDispatcher": "github:casperlamboo/EventDispatcher@master",
|
||||
"three.js": "github:mrdoob/three.js@r72"
|
||||
},
|
||||
|
@ -6,8 +6,6 @@ const scale = 100;
|
||||
export default function generateInfills(slices, settings) {
|
||||
console.log("generating infills");
|
||||
|
||||
// need to scale up everything because of clipper rounding errors
|
||||
|
||||
let {
|
||||
layerHeight,
|
||||
fillGridSize,
|
||||
|
@ -27,7 +27,8 @@ export default function generateInnerLines(slices, settings) {
|
||||
// var outerLine = part.shape.clone().scaleUp(scale).offset(-nozzleRadius);
|
||||
var outerLine = part.shape.scaleUp(scale).offset(-nozzleRadius, offsetOptions);
|
||||
|
||||
if (outerLine.length > 0) {
|
||||
|
||||
if (outerLine.paths.length > 0) {
|
||||
part.outerLine.join(outerLine);
|
||||
|
||||
for (var shell = 1; shell < shells; shell += 1) {
|
||||
@ -35,8 +36,8 @@ export default function generateInnerLines(slices, settings) {
|
||||
|
||||
var innerLine = outerLine.offset(-offset, offsetOptions);
|
||||
|
||||
if (innerLine.length > 0) {
|
||||
part.innerLines.paths.push(innerLine);
|
||||
if (innerLine.paths.length > 0) {
|
||||
part.innerLines.push(innerLine);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
|
@ -104,23 +104,22 @@ export default class extends EventDispatcher {
|
||||
this.progress.generatedGCode = true;
|
||||
this._updateProgress(settings);
|
||||
|
||||
this.dispatchEvent({
|
||||
type: 'finish',
|
||||
gcode
|
||||
});
|
||||
this.dispatchEvent({ type: 'finish', gcode });
|
||||
|
||||
console.log(slices);
|
||||
|
||||
return gcode;
|
||||
}
|
||||
|
||||
_updateProgress (settings) {
|
||||
var supportEnabled = settings.config["supportEnabled"];
|
||||
var supportEnabled = settings.config['supportEnabled'];
|
||||
|
||||
var progress = {};
|
||||
|
||||
var procent = 0;
|
||||
var length = 0;
|
||||
for (var i in this.progress) {
|
||||
if (!(!supportEnabled && i === "generatedSupport")) {
|
||||
if (!(!supportEnabled && i === 'generatedSupport')) {
|
||||
progress[i] = this.progress[i];
|
||||
if (progress[i]) {
|
||||
procent += 1;
|
||||
@ -131,9 +130,6 @@ export default class extends EventDispatcher {
|
||||
|
||||
progress.procent = procent / length;
|
||||
|
||||
this.dispatchEvent({
|
||||
type: 'progress',
|
||||
progress
|
||||
});
|
||||
this.dispatchEvent({ type: 'progress', progress });
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user