mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-23 19:43:48 +01:00
use deconstructs
This commit is contained in:
parent
e573a0662b
commit
aa9de5ec47
@ -3,8 +3,7 @@ import THREE from 'three.js';
|
||||
export default function calculateLayersIntersections(lines, settings) {
|
||||
console.log('calculating layer intersections');
|
||||
|
||||
var layerHeight = settings.config["layerHeight"];
|
||||
var height = settings.config["dimensionsZ"];
|
||||
const { layerHeight, dimensionsZ: height } = settings.config;
|
||||
|
||||
var numLayers = Math.floor(height / layerHeight);
|
||||
|
||||
|
@ -1,18 +1,25 @@
|
||||
import getFillTemplate from './getFillTemplate.js';
|
||||
import Paths from '../paths.js';
|
||||
|
||||
const scale = 100;
|
||||
|
||||
export default function generateInfills(slices, settings) {
|
||||
console.log("generating infills");
|
||||
|
||||
// need to scale up everything because of clipper rounding errors
|
||||
var scale = 100;
|
||||
|
||||
var layerHeight = settings.config["layerHeight"];
|
||||
var fillGridSize = settings.config["fillGridSize"] * scale;
|
||||
var bottomThickness = settings.config["bottomThickness"];
|
||||
var topThickness = settings.config["topThickness"];
|
||||
var nozzleDiameter = settings.config["nozzleDiameter"] * scale;
|
||||
var infillOverlap = settings.config["infillOverlap"] * scale;
|
||||
let {
|
||||
layerHeight,
|
||||
fillGridSize,
|
||||
bottomThickness,
|
||||
topThickness,
|
||||
nozzleDiameter,
|
||||
infillOverlap
|
||||
} = settings.config;
|
||||
|
||||
fillGridSize *= scale;
|
||||
nozzleDiameter *= scale;
|
||||
infillOverlap *= scale;
|
||||
|
||||
var bottomSkinCount = Math.ceil(bottomThickness/layerHeight);
|
||||
var topSkinCount = Math.ceil(topThickness/layerHeight);
|
||||
|
@ -1,12 +1,12 @@
|
||||
const scale = 100;
|
||||
|
||||
export default function generateInnerLines(slices, settings) {
|
||||
console.log("generating outer lines and inner lines");
|
||||
|
||||
// need to scale up everything because of clipper rounding errors
|
||||
var scale = 100;
|
||||
|
||||
var layerHeight = settings.config["layerHeight"];
|
||||
var nozzleDiameter = settings.config["nozzleDiameter"] * scale;
|
||||
var shellThickness = settings.config["shellThickness"] * scale;
|
||||
let {layerHeight, nozzleDiameter, shellThickness} = settings.config;
|
||||
nozzleDiameter *= scale;
|
||||
shellThickness *= scale;
|
||||
var nozzleRadius = nozzleDiameter / 2;
|
||||
var shells = Math.round(shellThickness / nozzleDiameter);
|
||||
|
||||
|
@ -1,20 +1,26 @@
|
||||
import getFillTemplate from './getFillTemplate.js';
|
||||
import Paths from '../paths.js';
|
||||
|
||||
const scale = 100;
|
||||
|
||||
export default function generateSupport(slices, settings) {
|
||||
console.log("generating support");
|
||||
|
||||
// need to scale up everything because of clipper rounding errors
|
||||
var scale = 100;
|
||||
let {
|
||||
layerHeight,
|
||||
supportGridSize,
|
||||
supportAcceptanceMargin,
|
||||
supportPlateSize: plateSize,
|
||||
supportDistanceY,
|
||||
nozzleDiameter
|
||||
} = settings.config;
|
||||
|
||||
var layerHeight = settings.config["layerHeight"];
|
||||
var supportGridSize = settings.config["supportGridSize"] * scale;
|
||||
var supportAcceptanceMargin = settings.config["supportAcceptanceMargin"] * scale;
|
||||
var supportMargin = settings.config["supportMargin"] * scale;
|
||||
var plateSize = settings.config["supportPlateSize"] * scale;
|
||||
var supportDistanceY = settings.config["supportDistanceY"];
|
||||
supportGridSize *= scale;
|
||||
supportMargin *= scale;
|
||||
plateSize *= scale;
|
||||
nozzleDiameter *= scale;
|
||||
var supportDistanceLayers = Math.max(Math.ceil(supportDistanceY / layerHeight), 1);
|
||||
var nozzleDiameter = settings.config["nozzleDiameter"] * scale;
|
||||
|
||||
var supportAreas = new Paths([], true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user