@vcad/mcp 0.9.4-main.39 → 0.9.4-main.40

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
@@ -6,4 +6,4 @@ vcad's MCP server as a self-contained bundle (server + BRep kernel WASM).
6
6
  { "mcpServers": { "vcad": { "command": "npx", "args": ["-y", "@vcad/mcp"] } } }
7
7
  ```
8
8
 
9
- Built from 08cd95d4487b522463d0a1a3b58b84935a1f7d08 at 2026-07-26T13:56:33.334Z. Source: https://github.com/ecto/vcad
9
+ Built from 6cac4f4f2c7c80a9122ee16857ec2b49f2dcd1f4 at 2026-07-26T14:38:17.346Z. Source: https://github.com/ecto/vcad
package/index.mjs CHANGED
@@ -165,6 +165,7 @@ __export(vcad_kernel_wasm_exports, {
165
165
  estimate_cost_for_process: () => estimate_cost_for_process,
166
166
  eulerXyzDegToQuat: () => eulerXyzDegToQuat,
167
167
  evalVcadSource: () => evalVcadSource,
168
+ evalVcadSourceParametric: () => evalVcadSourceParametric,
168
169
  evalVcadSourceWithModules: () => evalVcadSourceWithModules,
169
170
  evaluateDocument: () => evaluateDocument,
170
171
  evaluateSheetMetalChain: () => evaluateSheetMetalChain,
@@ -1777,6 +1778,17 @@ function evalVcadSource(source) {
1777
1778
  }
1778
1779
  return takeFromExternrefTable0(ret[0]);
1779
1780
  }
1781
+ function evalVcadSourceParametric(source, modules_json) {
1782
+ const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1783
+ const len0 = WASM_VECTOR_LEN;
1784
+ var ptr1 = isLikeNone(modules_json) ? 0 : passStringToWasm0(modules_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1785
+ var len1 = WASM_VECTOR_LEN;
1786
+ const ret = wasm.evalVcadSourceParametric(ptr0, len0, ptr1, len1);
1787
+ if (ret[2]) {
1788
+ throw takeFromExternrefTable0(ret[1]);
1789
+ }
1790
+ return takeFromExternrefTable0(ret[0]);
1791
+ }
1780
1792
  function evalVcadSourceWithModules(source, modules_json) {
1781
1793
  const ptr0 = passStringToWasm0(source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1782
1794
  const len0 = WASM_VECTOR_LEN;
@@ -11526,6 +11538,7 @@ var init_dist = __esm({
11526
11538
  WasmAnnotationLayer: wasmModule7.WasmAnnotationLayer,
11527
11539
  projectMesh: wasmModule7.projectMesh,
11528
11540
  importStepBuffer: wasmModule7.importStepBuffer,
11541
+ documentToStepBuffer: wasmModule7.documentToStepBuffer,
11529
11542
  importUrdfBuffer: wasmModule7.importUrdfBuffer,
11530
11543
  exportProjectedViewToDxf: wasmModule7.exportProjectedViewToDxf,
11531
11544
  offsetSectionMesh: wasmModule7.offsetSectionMesh,
@@ -12202,6 +12215,19 @@ var init_dist = __esm({
12202
12215
  return null;
12203
12216
  return foldedSheetMetalStep(chain, this.kernel);
12204
12217
  }
12218
+ /**
12219
+ * Export the document's scene roots to a STEP AP214 buffer, preserving
12220
+ * BRep through booleans, transforms, fillets, and sweeps — one STEP body
12221
+ * per visible root. Throws when a root evaluated to mesh-only geometry
12222
+ * (the kernel error names the offending roots) or when the loaded WASM
12223
+ * kernel predates the binding.
12224
+ */
12225
+ documentStep(doc) {
12226
+ if (!this.kernel.documentToStepBuffer) {
12227
+ throw new Error("documentToStepBuffer is not available in this kernel build \u2014 rebuild the WASM kernel");
12228
+ }
12229
+ return this.kernel.documentToStepBuffer(JSON.stringify(doc));
12230
+ }
12205
12231
  /** Create a detail view (magnified region) from a projected view.
12206
12232
  *
12207
12233
  * @param view - The parent projected view
@@ -40977,6 +41003,23 @@ var init_CHANGELOG = __esm({
40977
41003
  "verify_receipt"
40978
41004
  ]
40979
41005
  },
41006
+ {
41007
+ id: "2026-07-26-step-export-booleans",
41008
+ version: "0.9.4",
41009
+ date: "2026-07-26",
41010
+ category: "feat",
41011
+ title: "STEP export works on real parts, booleans included",
41012
+ summary: "STEP AP214 export now serializes the evaluated BRep \u2014 booleans, transforms, fillets, and sweeps keep analytic faces \u2014 with one named body per part; mesh-only parts are refused by name.",
41013
+ features: [
41014
+ "step",
41015
+ "export",
41016
+ "booleans",
41017
+ "cnc"
41018
+ ],
41019
+ mcpTools: [
41020
+ "export_cad"
41021
+ ]
41022
+ },
40980
41023
  {
40981
41024
  id: "2026-07-26-render-loon-directly",
40982
41025
  version: "0.9.4",
@@ -40990,6 +41033,20 @@ var init_CHANGELOG = __esm({
40990
41033
  "rendering"
40991
41034
  ]
40992
41035
  },
41036
+ {
41037
+ id: "2026-07-26-photoreal-path-tracer",
41038
+ version: "0.9.4",
41039
+ date: "2026-07-26",
41040
+ category: "feat",
41041
+ title: "Photorealistic rendering with --photoreal",
41042
+ summary: "vcad-render gains a physically-based path tracer: GGX materials with clearcoat, studio softbox lighting, global illumination, and a real camera lens with depth of field.",
41043
+ features: [
41044
+ "rendering",
41045
+ "raytracing",
41046
+ "cli",
41047
+ "materials"
41048
+ ]
41049
+ },
40993
41050
  {
40994
41051
  id: "2026-07-26-parametric-loon-datums",
40995
41052
  version: "0.9.4",
@@ -57979,17 +58036,19 @@ function exportCad(input, engine) {
57979
58036
  const filename = String(args.filename ?? "");
57980
58037
  const stepExt = filename.toLowerCase().split(".").pop();
57981
58038
  if (stepExt === "step" || stepExt === "stp") {
57982
- const step = engine.foldedSheetMetalStep(ir);
57983
- if (step === null) {
57984
- throw new Error(
57985
- "STEP export is only available for sheet-metal documents (the folded body needs B-rep bend geometry). Use .stl or .glb for mesh exports."
57986
- );
58039
+ const foldedStep = engine.foldedSheetMetalStep(ir);
58040
+ if (foldedStep !== null) {
58041
+ const bytes3 = new TextEncoder().encode(foldedStep);
58042
+ return deliver(filename, bytes3, {
58043
+ format: stepExt,
58044
+ parts: 1,
58045
+ note: "Folded sheet-metal body (AP214) with cylindrical bend faces \u2014 bends/angles/directions auto-detect in 3D fab pipelines."
58046
+ });
57987
58047
  }
57988
- const bytes2 = new TextEncoder().encode(step);
58048
+ const bytes2 = engine.documentStep(ir);
57989
58049
  return deliver(filename, bytes2, {
57990
58050
  format: stepExt,
57991
- parts: 1,
57992
- note: "Folded sheet-metal body (AP214) with cylindrical bend faces \u2014 bends/angles/directions auto-detect in 3D fab pipelines."
58051
+ note: "BRep AP214 export \u2014 analytic faces (planes/cylinders/spheres/cones/tori/NURBS) preserved through booleans; ready for CNC quoting."
57993
58052
  });
57994
58053
  }
57995
58054
  const scene = engine.evaluate(ir);
@@ -58021,7 +58080,7 @@ function exportCad(input, engine) {
58021
58080
  bytes = toGlbBytes(scene, filename);
58022
58081
  break;
58023
58082
  default:
58024
- throw new Error(`Unsupported format: .${ext}. Use .stl, .glb, or .step (sheet-metal only)`);
58083
+ throw new Error(`Unsupported format: .${ext}. Use .stl, .glb, or .step`);
58025
58084
  }
58026
58085
  return deliver(filename, bytes, {
58027
58086
  format: ext,
@@ -58060,7 +58119,7 @@ var init_export = __esm({
58060
58119
  },
58061
58120
  filename: {
58062
58121
  type: "string",
58063
- description: "Output filename with extension (.stl, .glb, or \u2014 for sheet-metal documents \u2014 .step/.stp), relative to the server working directory (or VCAD_MCP_EXPORT_DIR if set). STEP exports the FOLDED sheet-metal body (AP214) with true cylindrical bend faces sized by the document's shop profile, so fab services with a 3D pipeline (e.g. SendCutSend) auto-detect bends, angles, and directions with zero data entry."
58122
+ description: "Output filename with extension (.stl, .glb, or .step/.stp), relative to the server working directory (or VCAD_MCP_EXPORT_DIR if set). STEP is a BRep AP214 export: booleans, transforms, fillets, and sweeps keep true analytic faces (the format CNC vendors quote from). Sheet-metal documents export the FOLDED body with cylindrical bend faces auto-detected by 3D fab pipelines (e.g. SendCutSend). Parts built from imported meshes have no BRep and are refused by name \u2014 export those as STL."
58064
58123
  },
58065
58124
  joint_state: jointStateSchemaProp
58066
58125
  },
@@ -58070,7 +58129,7 @@ var init_export = __esm({
58070
58129
  {
58071
58130
  name: "export_cad",
58072
58131
  pack: null,
58073
- description: "Export a CAD document to a file. Supports STL (3D printing), GLB (visualization), and \u2014 for sheet-metal documents \u2014 STEP AP214 of the FOLDED body with true cylindrical bend faces (fab 3D pipelines like SendCutSend auto-detect bends/angles/directions; zero data entry). Format is determined by file extension. Pass `joint_state` to export a jointed assembly at a real pose (joint id or name \u2192 degrees, or mm for sliders) instead of its zero pose.",
58132
+ description: "Export a CAD document to a file. Supports STL (3D printing), GLB (visualization), and STEP AP214 (CNC quoting: BRep with true analytic faces, preserved through booleans/transforms/fillets/sweeps; sheet-metal documents export the FOLDED body with cylindrical bend faces that 3D fab pipelines like SendCutSend auto-detect). Mesh-only parts (imported meshes) can't go to STEP and are refused by name \u2014 use STL for those. Format is determined by file extension. Pass `joint_state` to export a jointed assembly at a real pose (joint id or name \u2192 degrees, or mm for sliders) instead of its zero pose.",
58074
58133
  inputSchema: exportCadSchema,
58075
58134
  handler: (a, c) => exportCad(a, c.engine),
58076
58135
  behavior: behavior({})
@@ -80323,8 +80382,8 @@ var init_server3 = __esm({
80323
80382
  init_order_feed();
80324
80383
  init_animate();
80325
80384
  PKG_VERSION = (() => {
80326
- if ("0.9.4-main.39") {
80327
- return "0.9.4-main.39";
80385
+ if ("0.9.4-main.40") {
80386
+ return "0.9.4-main.40";
80328
80387
  }
80329
80388
  try {
80330
80389
  const req = createRequire2(import.meta.url);
@@ -80333,8 +80392,8 @@ var init_server3 = __esm({
80333
80392
  return "0.0.0";
80334
80393
  }
80335
80394
  })();
80336
- BUILD_SHA = "08cd95d4487b522463d0a1a3b58b84935a1f7d08";
80337
- BUILD_TIME = "2026-07-26T13:56:33.334Z";
80395
+ BUILD_SHA = "6cac4f4f2c7c80a9122ee16857ec2b49f2dcd1f4";
80396
+ BUILD_TIME = "2026-07-26T14:38:17.346Z";
80338
80397
  SHORT_SHA = BUILD_SHA === "unknown" ? "unknown" : BUILD_SHA.slice(0, 7);
80339
80398
  VERSION_WITH_BUILD = SHORT_SHA === "unknown" ? PKG_VERSION : `${PKG_VERSION}+${SHORT_SHA}`;
80340
80399
  INSTANCE_ID = randomUUID6().slice(0, 8);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcad/mcp",
3
- "version": "0.9.4-main.39",
3
+ "version": "0.9.4-main.40",
4
4
  "description": "vcad MCP server — parametric CAD + PCB design tools for AI agents (self-contained: bundled server + kernel WASM)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  "homepage": "https://vcad.io",
21
21
  "vcadBuild": {
22
- "sha": "08cd95d4487b522463d0a1a3b58b84935a1f7d08",
23
- "builtAt": "2026-07-26T13:56:33.334Z"
22
+ "sha": "6cac4f4f2c7c80a9122ee16857ec2b49f2dcd1f4",
23
+ "builtAt": "2026-07-26T14:38:17.346Z"
24
24
  }
25
25
  }
Binary file