Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
mith committed Aug 1, 2017
2 parents 48f2cef + 9363fe5 commit 7e55b95
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"url": "git+https://github.com/Doodle3D/Doodle3D-Slicer.git"
},
"author": "",
"license": "ISC",
"license": "UNLICENSED",
"private": true,
"bugs": {
"url": "https://github.com/Doodle3D/Doodle3D-Slicer/issues"
},
Expand Down
24 changes: 13 additions & 11 deletions src/sliceActions/generateInnerLines.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,24 @@ export default function generateInnerLines(slices, settings) {

const outerLine = part.shape.offset(-nozzleRadius, offsetOptions);

if (outerLine.paths.length > 0) {
part.shell.push(outerLine);
if (outerLine.paths.length === 0) continue;

// start with 1 because outerLine is the 1st (0) shell
for (let inset = 1; inset < numShells; inset += 1) {
const offset = inset * nozzleDiameter;
part.shell.push(outerLine);

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) {
part.shell.push(shell);
} else {
break;
}
const shell = outerLine.offset(-offset, offsetOptions);

if (shell.paths.length === 0) {
break;
} else {
part.shell.push(shell);
}
}
}

slice.parts = slice.parts.filter(part => !part.closed || part.shell.length !== 0);
}
}

0 comments on commit 7e55b95

Please sign in to comment.