any2orca 0.12.0 → 0.12.1

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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # any2orca
2
2
 
3
+ ## 0.12.1
4
+
5
+ ### Features
6
+
7
+ - **The worker's `matchProfile` takes the nozzle size.** `project.matchProfile({ nozzle: "0.6" })` from `any2orca/worker` picks among the profiles for that size, or for the creator's size with `"match"`, the same way `convert` does with the same option, so a page can show the profile a conversion will use without matching on its own thread.
8
+
9
+ ### Other
10
+
11
+ - **The web app says which nozzle size a file was converted for, and its FAQ explains the nozzle setting.** The result line and What changed read "for 0.4 mm nozzles" (or the size chosen), in single and batch conversion, and a new FAQ answer says which size a file is made for and why a filament tuned for another nozzle size or diameter takes Snapmaker's preset's settings. The profile shown before converting now comes from the converter itself for every nozzle size.
12
+
3
13
  ## 0.12.0
4
14
 
5
15
  ### Output-affecting
package/README.md CHANGED
@@ -17,6 +17,7 @@ Useful options:
17
17
 
18
18
  | Option | What it does |
19
19
  |---|---|
20
+ | `--nozzle <size\|match>` | The nozzle size your U1 has, which the file is made for: 0.2, 0.4 (default), 0.6 or 0.8, or `match` for the creator's size. `any2orca nozzle 0.6` saves it for every conversion |
20
21
  | `--profile <id>` | Use this profile instead of matching one |
21
22
  | `--snapmaker-orca-version <x.y.z>` | Convert for the Snapmaker Orca release you slice with (default: the newest) |
22
23
  | `--high-flow`, `--high-flow-toolheads 1,3` | All toolheads, or only these, have the Liber High Flow Hotend |
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  // Written by scripts/sync-version.mjs from package.json; a test checks they match.
3
3
  // Typed as string, so a release doesn't change the public API's shape.
4
- export const VERSION = "0.12.0";
4
+ export const VERSION = "0.12.1";
@@ -77,7 +77,11 @@ async function handle(request) {
77
77
  return { result: { handle, inspection: project.inspect() }, transfer: [] };
78
78
  }
79
79
  case "matchProfile": {
80
- return { result: await requireProject(request.handle).matchProfile(await catalogFor(request.release)), transfer: [] };
80
+ // `nozzle` is checked where matchProfile reads it; a value that isn't a size fails there with its own message.
81
+ return {
82
+ result: await requireProject(request.handle).matchProfile(await catalogFor(request.release), request.nozzle === undefined ? {} : { nozzle: request.nozzle }),
83
+ transfer: [],
84
+ };
81
85
  }
82
86
  case "convert": {
83
87
  const project = requireProject(request.handle);
package/dist/worker.d.ts CHANGED
@@ -26,8 +26,13 @@ export interface WorkerConvertResult {
26
26
  }
27
27
  export interface WorkerProject {
28
28
  readonly inspection: Inspection;
29
- /** The profile auto-matching would pick, for the newest release or the one given. */
30
- matchProfile(options?: WorkerReleaseOption): Promise<ProfileChoice>;
29
+ /**
30
+ * The profile auto-matching would pick, for the newest release or the one given, and for the user's nozzle size
31
+ * (`nozzle`: "0.2" to "0.8", or "match" for the creator's; default "0.4"). Pass the same `nozzle` to `convert`.
32
+ */
33
+ matchProfile(options?: WorkerReleaseOption & {
34
+ nozzle?: string;
35
+ }): Promise<ProfileChoice>;
31
36
  convert(options?: WorkerConvertOptions & {
32
37
  onProgress?: (stage: ConvertStage) => void;
33
38
  }): Promise<WorkerConvertResult>;
package/dist/worker.js CHANGED
@@ -85,7 +85,7 @@ export function createConverterWorker(worker, options) {
85
85
  function project(handle, inspection) {
86
86
  const opened = {
87
87
  inspection,
88
- matchProfile: (release) => call({ op: "matchProfile", handle, ...releaseField(release) }),
88
+ matchProfile: (options) => call({ op: "matchProfile", handle, ...releaseField(options), ...(options?.nozzle === undefined ? {} : { nozzle: options.nozzle }) }),
89
89
  async convert(convertOptions = {}) {
90
90
  const { onProgress, ...rest } = convertOptions;
91
91
  const result = await call({ op: "convert", handle, options: rest }, [], onProgress);
@@ -55,6 +55,7 @@ export type WorkerRequest = {
55
55
  op: "matchProfile";
56
56
  handle: number;
57
57
  release?: WorkerReleaseOption;
58
+ nozzle?: string;
58
59
  } | {
59
60
  id: number;
60
61
  op: "convert";
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "any2orca",
3
- "version": "0.12.0",
4
- "outputAffecting": "Snapmaker Orca no longer opens a converted file with its first filament marked as modified; files are converted for the nozzle size your U1 has, 0.4 mm unless you say otherwise, instead of the size the creator used; and 4 more",
3
+ "version": "0.12.1",
5
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",