geometryview 0.3.0 → 0.4.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/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # GeometryView
2
2
 
3
- **See inside your CAD models, fast.** Open STEP and STL files in your browser, and let your AI apps
4
- open, inspect and picture them.
3
+ **See inside your CAD models, and a whole folder of them at once.** STEP and STL, in your browser,
4
+ on a Mac, on your phone, and from your AI apps.
5
5
 
6
- <img src="https://raw.githubusercontent.com/atharvaaalok/geometryview/main/Docs/media/styles.jpg" alt="A drive cut open, in six drawing styles" width="600">
6
+ <img src="https://raw.githubusercontent.com/atharvaaalok/geometryview/v0.4.0/Docs/media/fig1-light.webp" width="680" alt="A turbofan cut along its axis, six stages numbered, in a drafting frame">
7
7
 
8
8
  ## View a model
9
9
 
@@ -13,28 +13,35 @@ npx geometryview # the viewer, with your folders and recent files
13
13
  ```
14
14
 
15
15
  The viewer is served from your computer only (127.0.0.1), and your files never leave it. It needs a
16
- browser with WebGPU: Chrome or Edge, or Safari 26 or later. Or use the hosted copy, with sample
17
- models: [atharvaaalok.github.io/geometryview](https://atharvaaalok.github.io/geometryview/).
16
+ browser with WebGPU: Chrome or Edge, or Safari 26 or later; on Linux it opens a Chrome window of its
17
+ own, with Vulkan on. Or use the hosted copy:
18
+ [atharvaaalok.github.io/geometryview](https://atharvaaalok.github.io/geometryview/).
18
19
 
19
- ## Use it from your AI app
20
+ Connect a folder and every part in it is drawn to scale, five ways: Plates, Sheet, Ladders, Atlas and
21
+ Catalogue.
20
22
 
21
- `geometryview --mcp` is a tool server (MCP) with five tools:
23
+ <img src="https://raw.githubusercontent.com/atharvaaalok/geometryview/v0.4.0/Docs/media/plates-light.webp" width="680" alt="A folder of 124 parts as a poster, fifteen families each at its own scale">
22
24
 
23
- - `open_model` opens a file and sums it up.
24
- - `get_structure` lists its assemblies and parts.
25
- - `render_view` returns a picture: any view, any of six styles, sections, parts alone.
26
- - `view_folder` pictures a whole folder on one contact sheet, with a numbered index of sizes and
27
- parts. It needs the native engine (a Mac with Apple silicon and macOS 26).
28
- - `open_in_viewer` shows it to you, live.
25
+ ## Use it from your AI app
29
26
 
30
27
  ```sh
31
28
  claude mcp add geometryview -- npx -y geometryview --mcp # Claude Code
32
29
  codex mcp add geometryview -- npx -y geometryview --mcp # Codex
33
30
  ```
34
31
 
35
- Other apps take the same command, `npx -y geometryview --mcp`, in their MCP settings. Claude
36
- Desktop can also install it in one click from the `.mcpb` in the
32
+ Other apps take the same command, `npx -y geometryview --mcp`, in their MCP settings. Claude Desktop
33
+ installs it in one click from the `.mcpb` in the
37
34
  [latest release](https://github.com/atharvaaalok/geometryview/releases/latest).
38
35
 
39
- More, including the Mac app and the iPhone: [github.com/atharvaaalok/geometryview](https://github.com/atharvaaalok/geometryview).
40
- MIT licensed.
36
+ - `open_model` opens a file and sums it up.
37
+ - `get_structure` lists its assemblies and parts.
38
+ - `render_view` returns a picture: any view, any of six styles, sections, parts alone.
39
+ - `open_in_viewer` shows it to you, live.
40
+ - `view_folder` pictures a whole folder on one contact sheet. It needs the native engine: the Claude
41
+ Desktop extension for Mac, or a build from source.
42
+
43
+ Your files stay on your computer. The pictures, part names and structure the tools return go to
44
+ your AI app, and from it to its provider.
45
+
46
+ More, including the Mac app and the iPhone:
47
+ [github.com/atharvaaalok/geometryview](https://github.com/atharvaaalok/geometryview). MIT licensed.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "geometryview",
3
- "version": "0.3.0",
4
- "description": "View STEP and STL models in your browser, and let AI apps open, inspect and picture them (MCP).",
3
+ "version": "0.4.0",
4
+ "description": "See inside STEP and STL models, and whole folders of them, in your browser; and let AI apps open, inspect and picture them (MCP).",
5
5
  "keywords": [
6
6
  "step",
7
7
  "stl",
@@ -14,7 +14,7 @@
14
14
  "mcp",
15
15
  "model-context-protocol"
16
16
  ],
17
- "homepage": "https://github.com/atharvaaalok/geometryview#readme",
17
+ "homepage": "https://atharvaaalok.github.io/geometryview/",
18
18
  "bugs": {
19
19
  "url": "https://github.com/atharvaaalok/geometryview/issues"
20
20
  },
@@ -39,6 +39,7 @@
39
39
  },
40
40
  "scripts": {
41
41
  "test": "node --test test/*.test.mjs",
42
- "prepack": "node scripts/web.mjs"
42
+ "prepack": "node scripts/web.mjs",
43
+ "prepublishOnly": "node scripts/readme.mjs --check"
43
44
  }
44
45
  }
package/src/mcp.mjs CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { createInterface } from "node:readline";
6
6
 
7
- const SERVER = { name: "geometryview", version: "0.3.0" };
7
+ const SERVER = { name: "geometryview", version: "0.4.0" };
8
8
  const LATEST_PROTOCOL = "2025-06-18";
9
9
 
10
10
  /// Serves `tools` until standard input closes. Each tool is { name, description, inputSchema,
package/web/NOTICES.md CHANGED
@@ -3,6 +3,9 @@
3
3
  GeometryView is MIT licensed (see [LICENSE](LICENSE)). It builds on the work below, each under its
4
4
  own license. Versions are pinned in [ThirdParty/manifest.toml](ThirdParty/manifest.toml).
5
5
 
6
+ The showcase models ([`Tools/showcase`](Tools/showcase), and the folder and sample files made from
7
+ them) and the README's pictures are GeometryView's own, under the same MIT license.
8
+
6
9
  ## Shipped in the app, the browser viewer and the launcher
7
10
 
8
11
  | Project | License | How it is used |
@@ -47,3 +50,4 @@ SOFTWARE.
47
50
  |---|---|
48
51
  | [doctest](https://github.com/doctest/doctest) 2.4.12 | MIT; vendored with its [license](ThirdParty/doctest/LICENSE.txt) |
49
52
  | [Dawn](https://dawn.googlesource.com/dawn) (native) | BSD-3-Clause; the WebGPU test harness on the Mac |
53
+ | [build123d](https://github.com/gumyr/build123d) 0.13 and [OCP](https://github.com/CadQuery/OCP) 8.0.1 | Apache-2.0; they write the showcase models' STEP files |
Binary file
package/web/viewer.js CHANGED
@@ -1698,9 +1698,14 @@ async function galleryMotionChecks(g, root, subfolders, measure, settle) {
1698
1698
  out.sticky = { ...stuck, aligned: measure() };
1699
1699
  clip.scrollTop = 0;
1700
1700
  // A search: what it did not find painted at 22%.
1701
- const probe = g.core.path(g.core.wanted()[0]?.file ?? 0).split("/").pop().slice(0, 3);
1701
+ const probe = params.get("search") ?? g.core.path(g.core.wanted()[0]?.file ?? 0).split("/").pop().slice(0, 3);
1702
1702
  g.setSearch(probe);
1703
1703
  await new Promise(requestAnimationFrame);
1704
+ if (params.has("shots")) {
1705
+ await settle();
1706
+ await fetch(`/shot?name=${encodeURIComponent(`${params.get("label") ?? "web"}-gallery-search`)}`);
1707
+ await sleep(1500);
1708
+ }
1704
1709
  const faded = [...g.view.element.querySelectorAll(".gallery-content > :not([hidden])")].filter((n) => n.style.opacity === "0.22").length;
1705
1710
  out.search = { query: probe, found: g.core.matches, fadedNodes: faded, aligned: measure() };
1706
1711
  g.setSearch("");