-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathcontext7.json
More file actions
18 lines (18 loc) · 1.42 KB
/
context7.json
File metadata and controls
18 lines (18 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
"$schema": "https://context7.com/schema/context7.json",
"url": "https://context7.com/andymai/brepjs",
"public_key": "pk_WmPUK3NlUHZYB3un8SqbQ",
"projectTitle": "brepjs",
"description": "Web CAD library built on OpenCascade — create, combine, and export 3D shapes with a functional TypeScript API and WASM-powered B-Rep kernel.",
"folders": [".", "docs", "examples"],
"excludeFolders": ["src", "tests", "scripts", "node_modules", "dist", ".github"],
"excludeFiles": ["CHANGELOG.md", "CONTRIBUTING.md", "LICENSE"],
"rules": [
"Initialize the WASM kernel before using any brepjs function: use `import { box } from 'brepjs/quick'` for auto-init, or `const kernel = await OcctKernel.init(); registerKernel('occt-wasm', OcctWasmAdapter.fromKernel(kernel));` for manual control",
"All shape operations are immutable — they return new shapes and never modify the original. `translate(myBox, [10, 0, 0])` returns a new shape; `myBox` is unchanged",
"Boolean operations (fuse, cut, intersect) return Result<Shape3D> — use unwrap() for scripts or isOk()/match() for production error handling",
"WASM objects require explicit cleanup — use `using` keyword (TS 5.9+), DisposalScope, or withScope() for memory management",
"initFromOC(oc) accepts any OpenCascade WASM instance, enabling custom or alternative WASM builds",
"The default kernel occt-wasm must be installed separately: `npm install brepjs occt-wasm`"
]
}