brepjs 18.97.2 → 18.99.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 +7 -7
- package/dist/io/gltfExportFns.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -103,22 +103,22 @@ Layer 0 kernel/, utils/ WASM bindings
|
|
|
103
103
|
|
|
104
104
|
Imports flow downward only. Boundaries are enforced in CI.
|
|
105
105
|
|
|
106
|
-
## Authoring CAD with AI (brepjs-
|
|
106
|
+
## Authoring CAD with AI (brepjs-cad)
|
|
107
107
|
|
|
108
|
-
[`brepjs-
|
|
108
|
+
[`brepjs-cad`](https://www.npmjs.com/package/brepjs-cad) helps an AI agent (or you) author CAD in brepjs and **prove it is correct** before handing it off. An LLM can't see geometry, so it writes a `.brep.ts` part, runs it on a real kernel, and reads a deterministic report instead of guessing from how the code reads. It ships as two cooperating pieces: a **Claude Code skill** (the authoring loop) and a **verification CLI** (validity + measured dimensions + multi-view snapshots + STEP export).
|
|
109
109
|
|
|
110
110
|
Install both; they ride on two rails:
|
|
111
111
|
|
|
112
112
|
```bash
|
|
113
113
|
# 1. The skill - Claude Code plugin (delivered via this repo's marketplace)
|
|
114
114
|
/plugin marketplace add andymai/brepjs
|
|
115
|
-
/plugin install brepjs
|
|
115
|
+
/plugin install brepjs@brepjs
|
|
116
116
|
|
|
117
117
|
# 2. The runtime - the CLI the skill drives
|
|
118
|
-
npm i -D brepjs-
|
|
118
|
+
npm i -D brepjs-cad
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
`brepjs-
|
|
121
|
+
`brepjs-cad` bundles its own `brepjs` + `occt-wasm`, so it runs in an empty directory; inside an existing brepjs project it prefers your installed versions so verified parts match what you ship. A model is a module that default-exports a zero-arg function returning a shape:
|
|
122
122
|
|
|
123
123
|
```typescript
|
|
124
124
|
// bracket.brep.ts
|
|
@@ -128,10 +128,10 @@ export default () => box(40, 20, 10, { centered: true });
|
|
|
128
128
|
```
|
|
129
129
|
|
|
130
130
|
```bash
|
|
131
|
-
npx -y brepjs-
|
|
131
|
+
npx -y -p brepjs-cad brep bracket.brep.ts --check --step bracket.step --json report.json
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
The command exits non-zero unless the report is `ok` (valid **and** every declared dimension within tolerance), so it drops straight into CI or an agent loop. For MCP-capable agents the package also ships a stdio MCP server (`
|
|
134
|
+
The command exits non-zero unless the report is `ok` (valid **and** every declared dimension within tolerance), so it drops straight into CI or an agent loop. For MCP-capable agents the package also ships a stdio MCP server (`brep-mcp`) exposing the same build-and-verify step as a `run_program` tool. See the [**Authoring with AI**](https://brepjs.dev/agent/overview) guide for the full loop, CLI reference, the MCP server, examples, and the measurement eval.
|
|
135
135
|
|
|
136
136
|
## Projects Using brepjs
|
|
137
137
|
|
|
@@ -27,7 +27,7 @@ export interface GltfFace {
|
|
|
27
27
|
/**
|
|
28
28
|
* Per-face material selector. Called once per face group; return a material to
|
|
29
29
|
* paint that face, or `undefined` to leave it at the glTF default. Consumed by
|
|
30
|
-
* tooling (e.g. brepjs-
|
|
30
|
+
* tooling (e.g. brepjs-cad's `export const materials`) that has the mesh and
|
|
31
31
|
* builds the faceId→material map passed to {@link GltfExportOptions.materials}.
|
|
32
32
|
*/
|
|
33
33
|
export type MaterialFn = (face: GltfFace) => GltfMaterial | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brepjs",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.99.0",
|
|
4
4
|
"description": "Web CAD library with pluggable geometry kernel",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cad",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"packages/brepjs-manifold",
|
|
29
29
|
"packages/brepjs-voxel-wasm",
|
|
30
30
|
"packages/brepjs-voxel",
|
|
31
|
-
"packages/brepjs-
|
|
31
|
+
"packages/brepjs-cad",
|
|
32
32
|
"packages/brepjs-viewer",
|
|
33
33
|
"packages/brepjs-vscode",
|
|
34
34
|
"apps/playground",
|