mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-16 19:17:57 +01:00
slicer didn't fill top anymore; fixed
This commit is contained in:
parent
f9ef14822b
commit
44994f61a8
48
doodle_app/index.html
Normal file
48
doodle_app/index.html
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Doodle 3D App</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
||||||
|
<script src="../three.js-master/build/three.js"></script>
|
||||||
|
|
||||||
|
<script src="../three.js-master/examples/js/controls/EditorControls.js"></script>
|
||||||
|
<script src="../three.js-master/examples/js/controls/TransformControls.js"></script>
|
||||||
|
|
||||||
|
<script src="../three.js-master/examples/js/libs/system.min.js"></script>
|
||||||
|
|
||||||
|
<script src="../three.js-master/editor/js/libs/signals.min.js"></script>
|
||||||
|
<script src="../three.js-master/editor/js/libs/ui.js"></script>
|
||||||
|
<script src="../three.js-master/editor/js/libs/ui.three.js"></script>
|
||||||
|
|
||||||
|
<script src="../three.js-master/editor/js/Storage.js"></script>
|
||||||
|
|
||||||
|
<script src="../three.js-master/editor/js/Editor.js"></script>
|
||||||
|
<script src="../three.js-master/editor/js/Config.js"></script>
|
||||||
|
<script src="../three.js-master/editor/js/Loader.js"></script>
|
||||||
|
<script src="../three.js-master/editor/js/Viewport.js"></script>
|
||||||
|
<script src="../three.js-master/editor/js/Viewport.info.js"></script>
|
||||||
|
<style>
|
||||||
|
* {padding: 0px; margin: 0px;}
|
||||||
|
canvas {border: 1px solid black; margin: 5px;}
|
||||||
|
.menu_bar {border: 1px solid black; height: 40px; margin: 5px;}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="menu_bar"></div>
|
||||||
|
<canvas id="design"></canvas>
|
||||||
|
<canvas id="preview"></canvas>
|
||||||
|
<div class="menu_bar"></div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var editor = new Editor();
|
||||||
|
|
||||||
|
var viewport = new Viewport( editor );
|
||||||
|
|
||||||
|
document.body.appendChild( viewport.dom );
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -358,10 +358,15 @@ D3D.Slicer.prototype.generateInfills = function (slices, printer) {
|
|||||||
for (var layer = 0; layer < slices.length; layer ++) {
|
for (var layer = 0; layer < slices.length; layer ++) {
|
||||||
var slice = slices[layer];
|
var slice = slices[layer];
|
||||||
|
|
||||||
|
console.log(layer + topSkinCount < slices.length);
|
||||||
|
|
||||||
if (layer - bottomSkinCount >= 0 && layer + topSkinCount < slices.length) {
|
if (layer - bottomSkinCount >= 0 && layer + topSkinCount < slices.length) {
|
||||||
var downSkin = slices[layer - bottomSkinCount].getOutline();
|
var downSkin = slices[layer - bottomSkinCount].getOutline();
|
||||||
var upSkin = slices[layer + topSkinCount].getOutline();
|
var upSkin = slices[layer + topSkinCount].getOutline();
|
||||||
var surroundingLayer = upSkin.intersect(downSkin);
|
var surroundingLayer = upSkin.intersect(downSkin);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
var surroundingLayer = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < slice.parts.length; i ++) {
|
for (var i = 0; i < slice.parts.length; i ++) {
|
||||||
@ -372,7 +377,7 @@ D3D.Slicer.prototype.generateInfills = function (slices, printer) {
|
|||||||
var inset = ((part.innerLines.length > 0) ? part.innerLines[part.innerLines.length - 1] : outerLine);
|
var inset = ((part.innerLines.length > 0) ? part.innerLines[part.innerLines.length - 1] : outerLine);
|
||||||
|
|
||||||
var fillArea = inset.offset(-nozzleRadius);
|
var fillArea = inset.offset(-nozzleRadius);
|
||||||
if (surroundingLayer !== undefined) {
|
if (surroundingLayer) {
|
||||||
var highFillArea = fillArea.difference(surroundingLayer).offset(infillOverlap).intersect(fillArea);
|
var highFillArea = fillArea.difference(surroundingLayer).offset(infillOverlap).intersect(fillArea);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -57,6 +57,7 @@ function getAPI (url, callback) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//button doesnt work in firefox!!!
|
||||||
function downloadFile (file, data) {
|
function downloadFile (file, data) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user