mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-19 04:27:55 +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) {
|
||||
console.log("generating support");
|
||||
|
||||
if (!settings.config.supportEnabled) return;
|
||||
|
||||
// need to scale up everything because of clipper rounding errors
|
||||
let {
|
||||
layerHeight,
|
||||
@ -15,6 +17,7 @@ export default function generateSupport(slices, settings) {
|
||||
nozzleDiameter
|
||||
} = settings.config;
|
||||
|
||||
|
||||
supportGridSize /= PRECISION;
|
||||
supportMargin /= PRECISION;
|
||||
plateSize /= PRECISION;
|
||||
|
@ -63,8 +63,6 @@ export default class extends EventDispatcher {
|
||||
}
|
||||
|
||||
slice (settings) {
|
||||
const supportEnabled = settings.config['supportEnabled'];
|
||||
|
||||
// get unique lines from geometry;
|
||||
const lines = createLines(this.geometry, settings);
|
||||
this.progress.createdLines = true;
|
||||
@ -95,11 +93,9 @@ export default class extends EventDispatcher {
|
||||
this.progress.generatedInfills = true;
|
||||
this._updateProgress(settings);
|
||||
|
||||
if (supportEnabled) {
|
||||
generateSupport(slices, settings);
|
||||
this.progress.generatedSupport = true;
|
||||
this._updateProgress(settings);
|
||||
}
|
||||
generateSupport(slices, settings);
|
||||
this.progress.generatedSupport = true;
|
||||
this._updateProgress(settings);
|
||||
|
||||
addBrim(slices, settings);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user