any2orca 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/dist/archive/zip.js +1 -1
- package/dist/cli/main.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/inspect.d.ts +2 -2
- package/dist/inspect.js +9 -5
- package/dist/sources/bambuFamily.js +1 -1
- package/dist/telemetry.d.ts +1 -0
- package/dist/telemetry.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# any2orca
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Breaking
|
|
6
|
+
|
|
7
|
+
- **`SourceVendor` has a new value, `"qidi"`.** Code that maps every value, such as a `Record<SourceVendor, string>` or an exhaustive `switch`, needs an entry for it.
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **QIDI Studio projects are a supported source.** QIDI Studio saves in Bambu Studio's format, so its projects already converted; now they're tested (a QIDI Studio 2.7.2.73 save of the shared scene is a fixture) and named in the help, the README and the package description. The inspection's `sourceVendor` is `"qidi"` for them, read from the printer a filament preset names, since QIDI Studio writes its printer as "Q1 Pro". Converted files don't change.
|
|
12
|
+
|
|
3
13
|
## 0.7.3
|
|
4
14
|
|
|
5
15
|
### Output-affecting
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# any2orca
|
|
2
2
|
|
|
3
|
-
Convert Bambu Studio, Creality Print, Anycubic Slicer Next, ElegooSlicer, Flash Studio and PrusaSlicer `.3mf` projects to Snapmaker U1 / Orca format, entirely on your own machine. One package: a command-line tool, a library for Node and browsers, and a ready-made Web Worker.
|
|
3
|
+
Convert Bambu Studio, Creality Print, Anycubic Slicer Next, ElegooSlicer, Flash Studio, QIDI Studio and PrusaSlicer `.3mf` projects to Snapmaker U1 / Orca format, entirely on your own machine. One package: a command-line tool, a library for Node and browsers, and a ready-made Web Worker.
|
|
4
4
|
|
|
5
5
|
Formerly bambu2orca and the `@kuzuri.ao/b2o` CLI. Same conversion, now local: no account, no API key, no quota, and nothing you convert is sent anywhere.
|
|
6
6
|
|
|
@@ -187,4 +187,4 @@ MIT.
|
|
|
187
187
|
|
|
188
188
|
The profile data (`any2orca-profiles`) is AGPL-3.0-or-later, since it is derived from Snapmaker's AGPL presets. It is a separate package, loaded at runtime. [`NOTICE`](https://github.com/KuzuriAo/any2orca/blob/main/packages/core/NOTICE) credits the data this package includes.
|
|
189
189
|
|
|
190
|
-
any2orca is an independent project, not affiliated with, endorsed by, or sponsored by Snapmaker, Bambu Lab, OrcaSlicer or any
|
|
190
|
+
any2orca is an independent project, not affiliated with, endorsed by, or sponsored by Snapmaker, Bambu Lab, Creality, Anycubic, ELEGOO, Flashforge, Prusa Research, OrcaSlicer or any other brand or vendor of printers, slicers or filament.
|
package/dist/archive/zip.js
CHANGED
|
@@ -49,7 +49,7 @@ export function prepareConvertRequest(fileBytes, maxUnpackedBytes) {
|
|
|
49
49
|
const otherFormatSettings = zipEntries[OTHER_FORMAT_SETTINGS_PATH];
|
|
50
50
|
if (otherFormatSettings) {
|
|
51
51
|
const slicer = otherFormatSlicer(otherFormatSettings);
|
|
52
|
-
throw new Any2orcaError("unsupported_slicer", `This project was saved by ${slicer}, and only projects from Bambu Studio, Creality Print, Anycubic Slicer Next, ElegooSlicer, Flash Studio and PrusaSlicer can be converted.`, { slicer });
|
|
52
|
+
throw new Any2orcaError("unsupported_slicer", `This project was saved by ${slicer}, and only projects from Bambu Studio, Creality Print, Anycubic Slicer Next, ElegooSlicer, Flash Studio, QIDI Studio and PrusaSlicer can be converted.`, { slicer });
|
|
53
53
|
}
|
|
54
54
|
// A zip that isn't a 3MF at all (no model part, no print settings): a bundle of STL files, say.
|
|
55
55
|
if (!zipEntries[TOP_MODEL_PATH]) {
|
package/dist/cli/main.js
CHANGED
|
@@ -45,7 +45,7 @@ function wrapText(text, width) {
|
|
|
45
45
|
lines.push(line);
|
|
46
46
|
return lines;
|
|
47
47
|
}
|
|
48
|
-
const TOP_LEVEL_HELP = `any2orca ${VERSION}: convert Bambu Studio, Creality Print, Anycubic Slicer Next, ElegooSlicer, Flash Studio and PrusaSlicer .3mf projects to Snapmaker U1 / Orca format, entirely on this machine.
|
|
48
|
+
const TOP_LEVEL_HELP = `any2orca ${VERSION}: convert Bambu Studio, Creality Print, Anycubic Slicer Next, ElegooSlicer, Flash Studio, QIDI Studio and PrusaSlicer .3mf projects to Snapmaker U1 / Orca format, entirely on this machine.
|
|
49
49
|
|
|
50
50
|
Usage: any2orca <command> [options]
|
|
51
51
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* any2orca: convert Bambu Studio, Creality Print, Anycubic Slicer Next,
|
|
3
|
-
* ElegooSlicer, Flash Studio and PrusaSlicer 3MF projects for the Snapmaker U1
|
|
3
|
+
* ElegooSlicer, Flash Studio, QIDI Studio and PrusaSlicer 3MF projects for the Snapmaker U1
|
|
4
4
|
* (Snapmaker Orca), entirely in the caller's own process. The library makes no network
|
|
5
5
|
* requests of its own; profile data comes from a {@link ProfileSource} the
|
|
6
6
|
* caller provides.
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
/**
|
|
3
3
|
* any2orca: convert Bambu Studio, Creality Print, Anycubic Slicer Next,
|
|
4
|
-
* ElegooSlicer, Flash Studio and PrusaSlicer 3MF projects for the Snapmaker U1
|
|
4
|
+
* ElegooSlicer, Flash Studio, QIDI Studio and PrusaSlicer 3MF projects for the Snapmaker U1
|
|
5
5
|
* (Snapmaker Orca), entirely in the caller's own process. The library makes no network
|
|
6
6
|
* requests of its own; profile data comes from a {@link ProfileSource} the
|
|
7
7
|
* caller provides.
|
package/dist/inspect.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { type FilamentColorMatch } from "./archive/lookupFilamentColorName.js";
|
|
|
9
9
|
import { type SupportedNozzleDiameter } from "./engine/detectNozzleDiameter.js";
|
|
10
10
|
import type { ConvertObject } from "./schema.js";
|
|
11
11
|
/** The printer maker a source file was set up for, from its `printer_model`. */
|
|
12
|
-
export type SourceVendor = "bambu" | "creality" | "anycubic" | "snapmaker" | "elegoo" | "prusa" | "flashforge" | "other";
|
|
12
|
+
export type SourceVendor = "bambu" | "creality" | "anycubic" | "snapmaker" | "elegoo" | "prusa" | "flashforge" | "qidi" | "other";
|
|
13
13
|
export interface FilamentSlotInfo {
|
|
14
14
|
/** 1-based slot number, as slicers show it. */
|
|
15
15
|
slot: number;
|
|
@@ -64,6 +64,6 @@ export interface Inspection {
|
|
|
64
64
|
*/
|
|
65
65
|
unpackedBytes: number;
|
|
66
66
|
}
|
|
67
|
-
export declare function detectSourceVendor(printerModel: string | null, sourcePresetName?: string | null, printerNotes?: string | null, printerPresetName?: string | null): SourceVendor;
|
|
67
|
+
export declare function detectSourceVendor(printerModel: string | null, sourcePresetName?: string | null, printerNotes?: string | null, printerPresetName?: string | null, filamentPresetName?: string | null): SourceVendor;
|
|
68
68
|
/** Builds an {@link Inspection} from a parsed project's settings and objects. */
|
|
69
69
|
export declare function inspectProject(projectSettings: Record<string, unknown>, objects: ConvertObject[], warnings: readonly string[], unpackedBytes: number, sourcePlateOrigins?: Readonly<Record<number, readonly [number, number]>>, plateCount?: number): Inspection;
|
package/dist/inspect.js
CHANGED
|
@@ -18,6 +18,7 @@ const VENDOR_PATTERNS = [
|
|
|
18
18
|
{ vendor: "elegoo", pattern: /^elegoo\b/i },
|
|
19
19
|
{ vendor: "prusa", pattern: /^(original\s+)?prusa\b/i },
|
|
20
20
|
{ vendor: "flashforge", pattern: /^flashforge\b/i },
|
|
21
|
+
{ vendor: "qidi", pattern: /^qidi\b/i },
|
|
21
22
|
];
|
|
22
23
|
const MAX_DISPLAY_STRING = 500;
|
|
23
24
|
function asDisplayString(value) {
|
|
@@ -42,18 +43,21 @@ function guessMaterial(presetName) {
|
|
|
42
43
|
/**
|
|
43
44
|
* The source printer's maker, from `printer_model` (e.g. "Creality K2 Plus"),
|
|
44
45
|
* falling back to the printer named after "@" in the process preset (e.g.
|
|
45
|
-
* "0.20mm Standard @BBL X1C")
|
|
46
|
-
*
|
|
46
|
+
* "0.20mm Standard @BBL X1C"), then in the first filament preset (QIDI
|
|
47
|
+
* Studio's printer model and process preset say only "Q1 Pro"; its filament
|
|
48
|
+
* presets say "@Qidi Q1 Pro 0.4 nozzle"). Not the 3MF's Application tag:
|
|
49
|
+
* Anycubic Slicer Next writes "BambuStudio" there.
|
|
47
50
|
*/
|
|
48
51
|
/** PrusaSlicer's printer profiles name their maker in `printer_notes` ("PRINTER_VENDOR_PRUSA3D"), where the model name doesn't. */
|
|
49
52
|
const NOTES_VENDORS = { PRUSA3D: "prusa", CREALITY: "creality", ANYCUBIC: "anycubic", ELEGOO: "elegoo", FLASHFORGE: "flashforge", SNAPMAKER: "snapmaker", BBL: "bambu" };
|
|
50
|
-
export function detectSourceVendor(printerModel, sourcePresetName = null, printerNotes = null, printerPresetName = null) {
|
|
53
|
+
export function detectSourceVendor(printerModel, sourcePresetName = null, printerNotes = null, printerPresetName = null, filamentPresetName = null) {
|
|
51
54
|
const presetPrinter = sourcePresetName?.split("@")[1]?.trim() ?? null;
|
|
55
|
+
const filamentPrinter = filamentPresetName?.split("@")[1]?.trim() ?? null;
|
|
52
56
|
const notesVendor = /\bPRINTER_VENDOR_([A-Z0-9]{1,20})\b/.exec(printerNotes ?? "")?.[1];
|
|
53
57
|
if (notesVendor && Object.hasOwn(NOTES_VENDORS, notesVendor))
|
|
54
58
|
return NOTES_VENDORS[notesVendor];
|
|
55
59
|
// The printer preset's name last: PrusaSlicer's `printer_model` is a code ("COREONE"), its preset name says "Prusa CORE One".
|
|
56
|
-
for (const candidate of [printerModel, presetPrinter, printerPresetName]) {
|
|
60
|
+
for (const candidate of [printerModel, presetPrinter, printerPresetName, filamentPrinter]) {
|
|
57
61
|
if (!candidate)
|
|
58
62
|
continue;
|
|
59
63
|
const match = VENDOR_PATTERNS.find(({ pattern }) => pattern.test(candidate));
|
|
@@ -99,7 +103,7 @@ export function inspectProject(projectSettings, objects, warnings, unpackedBytes
|
|
|
99
103
|
sourcePresetName,
|
|
100
104
|
tierName: typeof projectSettings.print_settings_id === "string" ? parseTierName(projectSettings.print_settings_id) : null,
|
|
101
105
|
printerModel,
|
|
102
|
-
sourceVendor: detectSourceVendor(printerModel, sourcePresetName, typeof projectSettings.printer_notes === "string" ? projectSettings.printer_notes.slice(0, 4000) : null, asDisplayString(projectSettings.printer_settings_id)),
|
|
106
|
+
sourceVendor: detectSourceVendor(printerModel, sourcePresetName, typeof projectSettings.printer_notes === "string" ? projectSettings.printer_notes.slice(0, 4000) : null, asDisplayString(projectSettings.printer_settings_id), names[0]?.slice(0, 200) ?? null),
|
|
103
107
|
slicerVersion: asDisplayString(projectSettings.version),
|
|
104
108
|
sourcePrintableArea: Array.isArray(printableArea) && printableArea.length <= 64 && printableArea.every((p) => typeof p === "string")
|
|
105
109
|
? printableArea.slice()
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SPDX-License-Identifier: MIT
|
|
2
2
|
/**
|
|
3
3
|
* The reader for Bambu Studio and the slicers built on it (Creality Print,
|
|
4
|
-
* Anycubic Slicer Next, ElegooSlicer, Flash Studio): a project's settings are
|
|
4
|
+
* Anycubic Slicer Next, ElegooSlicer, Flash Studio, QIDI Studio): a project's settings are
|
|
5
5
|
* JSON in `Metadata/project_settings.config`, per-object settings and plates
|
|
6
6
|
* in `Metadata/model_settings.config`, the build in `3D/3dmodel.model`.
|
|
7
7
|
*/
|
package/dist/telemetry.d.ts
CHANGED
package/dist/telemetry.js
CHANGED
|
@@ -35,7 +35,7 @@ export const StatsEventSchema = z
|
|
|
35
35
|
objects: z.number().int().min(0).max(10_000).describe("number of objects"),
|
|
36
36
|
filamentSlots: z.number().int().min(0).max(1_000).describe("number of filament slots"),
|
|
37
37
|
sourceVendor: z
|
|
38
|
-
.enum(["bambu", "creality", "anycubic", "snapmaker", "elegoo", "prusa", "flashforge", "other"])
|
|
38
|
+
.enum(["bambu", "creality", "anycubic", "snapmaker", "elegoo", "prusa", "flashforge", "qidi", "other"])
|
|
39
39
|
.describe("the printer maker the source file was set up for"),
|
|
40
40
|
ref: z.string().regex(REF_PATTERN).optional().describe("which site sent you here, if it said so (a short slug, never free text)"),
|
|
41
41
|
day: z
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.8.0";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "any2orca",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "Convert Bambu Studio, Creality Print, Anycubic Slicer Next, ElegooSlicer, Flash Studio and PrusaSlicer 3MF projects for the Snapmaker U1 (Snapmaker Orca), entirely on your own machine. Library, CLI and Web Worker in one package.",
|
|
3
|
+
"version": "0.8.0",
|
|
4
|
+
"description": "Convert Bambu Studio, Creality Print, Anycubic Slicer Next, ElegooSlicer, Flash Studio, QIDI Studio and PrusaSlicer 3MF projects for the Snapmaker U1 (Snapmaker Orca), entirely on your own machine. Library, CLI and Web Worker in one package.",
|
|
6
5
|
"keywords": [
|
|
7
6
|
"3mf",
|
|
8
7
|
"snapmaker",
|