fdm slice/prepare/export for non-threaded mode working
This commit is contained in:
parent
c1ee342dbb
commit
e13c1e7430
2 changed files with 8 additions and 6 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
import { base, util } from '../../geo/base.js';
|
||||
import { getRangeParameters } from './driver.js';
|
||||
import { FDM } from './driver-be.js';
|
||||
import { version } from '../../moto/license.js';
|
||||
|
||||
const { config } = base;
|
||||
const debug = false;
|
||||
|
|
@ -23,6 +25,7 @@ export function fdm_export(print, online, ondone, ondebug) {
|
|||
isBambu = extras.bbl,
|
||||
{ extrudeAbs } = device,
|
||||
{ exportThumb } = controller,
|
||||
{ extrudeMM, extrudePerMM } = FDM,
|
||||
extused = Object.keys(print.extruders).map(v => parseInt(v)),
|
||||
timeFactor = (device.gcodeTime || 1) * 1.5,
|
||||
decimals = config.gcode_decimals || 4,
|
||||
|
|
@ -119,9 +122,7 @@ export function fdm_export(print, online, ondone, ondebug) {
|
|||
arcQ = [],
|
||||
minz = { x: Infinity, y: Infinity, z: Infinity },
|
||||
// lenghts of each filament (by nozzle) consumed
|
||||
segments = [],
|
||||
extrudeMM = FDM.extrudeMM,
|
||||
extrudePerMM = FDM.extrudePerMM;
|
||||
segments = [];
|
||||
|
||||
let tools_used = Object.keys(tools);
|
||||
for (let tool of tools_used) {
|
||||
|
|
@ -285,7 +286,7 @@ export function fdm_export(print, online, ondone, ondebug) {
|
|||
}
|
||||
|
||||
function preamble() {
|
||||
append(`; Generated by Kiri:Moto ${kiri.version}`);
|
||||
append(`; Generated by Kiri:Moto ${version}`);
|
||||
append(`; ${new Date().toString()}`);
|
||||
appendSub("; Bed left:{left} right:{right} top:{top} bottom:{bottom}");
|
||||
append(`; Bed type: ${bedType}`);
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@
|
|||
import { base, util } from '../../geo/base.js';
|
||||
import { poly2polyEmit, tip2tipEmit } from '../../geo/paths.js';
|
||||
import { newPoint } from '../../geo/point.js';
|
||||
import { newPolygon } from '../../geo/polygon.js';
|
||||
import { newPolygon, Polygon } from '../../geo/polygon.js';
|
||||
import { polygons as POLY, fillArea } from '../../geo/polygons.js';
|
||||
import { newPrint } from '../../kiri/print.js';
|
||||
import { newSlice } from '../../kiri/slice.js';
|
||||
import { render } from '../../kiri/render.js';
|
||||
import { getRangeParameters } from './driver.js';
|
||||
|
|
@ -27,7 +28,7 @@ export async function fdm_prepare(widgets, settings, update) {
|
|||
{ bedWidth, bedDepth } = device,
|
||||
{ lineType } = controller,
|
||||
printPoint = newPoint(0,0,0),
|
||||
print = self.worker.print = kiri.newPrint(settings, widgets),
|
||||
print = self.kiri_worker.current.print = newPrint(settings, widgets),
|
||||
nozzle = process.sliceLineWidth || device.extruders[0].extNozzle,
|
||||
isBelt = device.bedBelt,
|
||||
isThin = lineType === "line",
|
||||
|
|
|
|||
Loading…
Reference in a new issue