bambu-printer-mcp 1.1.60 → 1.1.62

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/README.md CHANGED
@@ -1131,7 +1131,7 @@ Inspect the slicer settings embedded in a saved 3MF template or in an extracted
1131
1131
  }
1132
1132
  ```
1133
1133
 
1134
- This returns a compact summary of the high-signal settings such as printer preset, default print profile, filament profiles, layer height, infill density, shell counts, support mode, and bed type. It accepts either `source_path` or `template_name`. For 3MF inputs it also writes the extracted settings blob to a temp path so the result can be reused directly.
1134
+ This returns a compact summary of the high-signal settings such as printer preset, default print profile, filament profiles, layer height, infill density, shell counts, support mode, and bed type. It accepts either `source_path` or `template_name`. For 3MF inputs it also writes the extracted settings blob to a temp path so the result can be reused directly, and returns `own_process`: true when the 3MF carries its own process (a designer's project), so `slice_stl` and `print_3mf`'s auto-slice slice it with that process unless the call names `slicer_profile`, `template_name` or `template_3mf_path`.
1135
1135
 
1136
1136
  #### slice_with_template
1137
1137
 
package/dist/index.js CHANGED
@@ -1632,6 +1632,8 @@ class BambuPrinterMCPServer {
1632
1632
  metadata_keys: Object.keys(parsed.metadata),
1633
1633
  summary: summarizeSliceSettings(config),
1634
1634
  raw_key_count: Object.keys(config).length,
1635
+ // ownProcessTemplate itself, for a call that names no profile or template, so this can't drift from slicing.
1636
+ own_process: (await ownProcessTemplate({}, sourcePath, undefined)) !== undefined,
1635
1637
  };
1636
1638
  }
1637
1639
  const content = fs.readFileSync(sourcePath, "utf8");
@@ -2043,7 +2045,7 @@ class BambuPrinterMCPServer {
2043
2045
  },
2044
2046
  {
2045
2047
  name: "get_slice_settings",
2046
- description: "Inspect slicer settings from a saved 3MF template or a JSON/config slicer profile without slicing anything.",
2048
+ description: "Inspect slicer settings from a saved 3MF template or a JSON/config slicer profile without slicing anything. For a 3MF, own_process is true when the file carries its own process (a designer's Bambu Studio or Orca project), so slice_stl and print_3mf's auto-slice slice it with that process unless the call names slicer_profile, template_name or template_3mf_path.",
2047
2049
  inputSchema: {
2048
2050
  type: "object",
2049
2051
  properties: {
@@ -99,13 +99,16 @@ export function extrusionSegments(gcode) {
99
99
  tool = t;
100
100
  continue;
101
101
  }
102
- // Bambu's AMS filament change (cut, retract, flush into the chute) runs from M620 to M621: not the part.
102
+ // Bambu's AMS filament change (cut, retract, flush into the chute) runs from M620 S<slot> to M621 S<slot>: not
103
+ // the part. Other M620 forms (the H2C start template's M620 O1) are setup, as file inspection reads them too.
103
104
  if (word === "M620") {
104
- changingFilament = true;
105
+ if (words.has("S"))
106
+ changingFilament = true;
105
107
  continue;
106
108
  }
107
109
  if (word === "M621") {
108
- changingFilament = false;
110
+ if (words.has("S"))
111
+ changingFilament = false;
109
112
  continue;
110
113
  }
111
114
  if (word === "G90") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bambu-printer-mcp",
3
- "version": "1.1.60",
3
+ "version": "1.1.62",
4
4
  "description": "MCP server for Bambu Lab 3D printers with STL manipulation, slicing, and print management",
5
5
  "main": "dist/index.js",
6
6
  "repository": {
package/src/index.ts CHANGED
@@ -2082,6 +2082,8 @@ class BambuPrinterMCPServer {
2082
2082
  metadata_keys: Object.keys(parsed.metadata),
2083
2083
  summary: summarizeSliceSettings(config),
2084
2084
  raw_key_count: Object.keys(config).length,
2085
+ // ownProcessTemplate itself, for a call that names no profile or template, so this can't drift from slicing.
2086
+ own_process: (await ownProcessTemplate({}, sourcePath, undefined)) !== undefined,
2085
2087
  };
2086
2088
  }
2087
2089
 
@@ -2570,7 +2572,7 @@ class BambuPrinterMCPServer {
2570
2572
  },
2571
2573
  {
2572
2574
  name: "get_slice_settings",
2573
- description: "Inspect slicer settings from a saved 3MF template or a JSON/config slicer profile without slicing anything.",
2575
+ description: "Inspect slicer settings from a saved 3MF template or a JSON/config slicer profile without slicing anything. For a 3MF, own_process is true when the file carries its own process (a designer's Bambu Studio or Orca project), so slice_stl and print_3mf's auto-slice slice it with that process unless the call names slicer_profile, template_name or template_3mf_path.",
2574
2576
  inputSchema: {
2575
2577
  type: "object",
2576
2578
  properties: {
@@ -92,9 +92,10 @@ export function extrusionSegments(gcode: string): { segments: Segment[]; layers:
92
92
  const word = command[1] + String(Number(command[2].split(".")[0])) + (command[2].includes(".") ? "." + command[2].split(".")[1] : "");
93
93
  const words = parameterWords(line.slice(command[0].length));
94
94
  if (command[1] === "T") { const t = Number(command[2]); if (Number.isInteger(t) && t < 255) tool = t; continue; }
95
- // Bambu's AMS filament change (cut, retract, flush into the chute) runs from M620 to M621: not the part.
96
- if (word === "M620") { changingFilament = true; continue; }
97
- if (word === "M621") { changingFilament = false; continue; }
95
+ // Bambu's AMS filament change (cut, retract, flush into the chute) runs from M620 S<slot> to M621 S<slot>: not
96
+ // the part. Other M620 forms (the H2C start template's M620 O1) are setup, as file inspection reads them too.
97
+ if (word === "M620") { if (words.has("S")) changingFilament = true; continue; }
98
+ if (word === "M621") { if (words.has("S")) changingFilament = false; continue; }
98
99
  if (word === "G90") { absoluteXY = true; continue; }
99
100
  if (word === "G91") { absoluteXY = false; continue; }
100
101
  if (word === "M82") { relativeE = false; continue; }