bambu-printer-mcp 1.1.60 → 1.1.61

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.
@@ -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.61",
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": {
@@ -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; }