mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-16 19:17:57 +01:00
move support enabled check
This commit is contained in:
parent
f3796f80e8
commit
604bce6a1a
@ -5,6 +5,8 @@ import { PRECISION } from '../constants.js';
|
|||||||
export default function generateSupport(slices, settings) {
|
export default function generateSupport(slices, settings) {
|
||||||
console.log("generating support");
|
console.log("generating support");
|
||||||
|
|
||||||
|
if (!settings.config.supportEnabled) return;
|
||||||
|
|
||||||
// need to scale up everything because of clipper rounding errors
|
// need to scale up everything because of clipper rounding errors
|
||||||
let {
|
let {
|
||||||
layerHeight,
|
layerHeight,
|
||||||
@ -15,6 +17,7 @@ export default function generateSupport(slices, settings) {
|
|||||||
nozzleDiameter
|
nozzleDiameter
|
||||||
} = settings.config;
|
} = settings.config;
|
||||||
|
|
||||||
|
|
||||||
supportGridSize /= PRECISION;
|
supportGridSize /= PRECISION;
|
||||||
supportMargin /= PRECISION;
|
supportMargin /= PRECISION;
|
||||||
plateSize /= PRECISION;
|
plateSize /= PRECISION;
|
||||||
|
@ -63,8 +63,6 @@ export default class extends EventDispatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
slice (settings) {
|
slice (settings) {
|
||||||
const supportEnabled = settings.config['supportEnabled'];
|
|
||||||
|
|
||||||
// get unique lines from geometry;
|
// get unique lines from geometry;
|
||||||
const lines = createLines(this.geometry, settings);
|
const lines = createLines(this.geometry, settings);
|
||||||
this.progress.createdLines = true;
|
this.progress.createdLines = true;
|
||||||
@ -95,11 +93,9 @@ export default class extends EventDispatcher {
|
|||||||
this.progress.generatedInfills = true;
|
this.progress.generatedInfills = true;
|
||||||
this._updateProgress(settings);
|
this._updateProgress(settings);
|
||||||
|
|
||||||
if (supportEnabled) {
|
generateSupport(slices, settings);
|
||||||
generateSupport(slices, settings);
|
this.progress.generatedSupport = true;
|
||||||
this.progress.generatedSupport = true;
|
this._updateProgress(settings);
|
||||||
this._updateProgress(settings);
|
|
||||||
}
|
|
||||||
|
|
||||||
addBrim(slices, settings);
|
addBrim(slices, settings);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user