Merge branch 'develop'

This commit is contained in:
Simon Voordouw 2017-08-01 14:36:44 +02:00
commit 7e55b95822
2 changed files with 15 additions and 12 deletions

View File

@ -27,7 +27,8 @@
"url": "git+https://github.com/Doodle3D/Doodle3D-Slicer.git" "url": "git+https://github.com/Doodle3D/Doodle3D-Slicer.git"
}, },
"author": "", "author": "",
"license": "ISC", "license": "UNLICENSED",
"private": true,
"bugs": { "bugs": {
"url": "https://github.com/Doodle3D/Doodle3D-Slicer/issues" "url": "https://github.com/Doodle3D/Doodle3D-Slicer/issues"
}, },

View File

@ -31,22 +31,24 @@ export default function generateInnerLines(slices, settings) {
const outerLine = part.shape.offset(-nozzleRadius, offsetOptions); const outerLine = part.shape.offset(-nozzleRadius, offsetOptions);
if (outerLine.paths.length > 0) { if (outerLine.paths.length === 0) continue;
part.shell.push(outerLine);
// start with 1 because outerLine is the 1st (0) shell part.shell.push(outerLine);
for (let inset = 1; inset < numShells; inset += 1) {
const offset = inset * nozzleDiameter;
const shell = outerLine.offset(-offset, offsetOptions); // start with 1 because outerLine is the 1st (0) shell
for (let inset = 1; inset < numShells; inset += 1) {
const offset = inset * nozzleDiameter;
if (shell.paths.length > 0) { const shell = outerLine.offset(-offset, offsetOptions);
part.shell.push(shell);
} else { if (shell.paths.length === 0) {
break; break;
} } else {
part.shell.push(shell);
} }
} }
} }
slice.parts = slice.parts.filter(part => !part.closed || part.shell.length !== 0);
} }
} }