BREP kernel from scratch using triangle meshes with BREP type topology
250
stars
7
commits
TypeScript
primary language
Sep 12, 2026
updated
brep-io-kernel https://www.npmjs.com/package/brep-io-kernelBREP.io is a browser-based CAD application and JavaScript kernel for feature-based solid modeling.
At its core is a BREP-style modeler with explicit geometry/topology objects such as Solid, Face, Edge, and Vertex, paired with an editable feature-history pipeline.
It also includes sketch workflows powered by a standalone 2D constraint solver, plus robust manifold booleans (manifold-3d), mesh repair/import tooling, assembly constraints, PMI annotations, and embeddable CAD/sketcher APIs.
This project is in active development and APIs may continue to evolve.
General:
Workbench and mode guides:
Feature index:
Primitives and setup:
Solid operations:
Pattern, import, and generation:
Assembly and sheet metal:
Additional implemented features in the codebase include collapse edge, edge smooth, offset face, overlap cleanup, sheet metal hem, and sheet metal cutout.
Prerequisites:
pnpmgit submodule update --init --recursiveInstall and run locally:
git submodule update --init --recursive
pnpm install
pnpm dev
Then open the Vite URL shown in your terminal.
/index.html/cad.html| Command | Purpose |
|---|---|
pnpm dev | Prepares fonts, builds the kernel bundle, then runs the Vite dev server. |
pnpm build | Production build of the app into dist/ (includes kernel build step). |
pnpm build:manifoldPlus | Builds the local manifold wasm/js bundle from the vendor/manifold3d submodule plus local custom bindings, using project-local EMSDK from vendor/emsdk. |
pnpm build:kernel | Builds the ESM kernel bundle into dist-kernel/ and syncs assets. |
pnpm use:manifold:npm | Switches runtime/builds to the published manifold-3d npm package. |
pnpm use:manifold:local | Switches runtime/builds to the locally compiled manifold bundle. |
pnpm which:manifold | Prints the currently selected manifold source. |
pnpm test | Runs the Node test suite (src/tests/tests.ts), writing artifacts to tests/results/. |
pnpm test -- test_primitiveCube | Runs one registered test by exact test function name. |
pnpm liveTesting | Watches src/ and tests/ and reruns tests on change. |
pnpm capture | Captures docs/dialog screenshots. |
pnpm generateLicenses | Regenerates dependency and bundled-font license summaries. |
Build outputs:
dist/: static web app (ready for CDN/web hosting)dist-kernel/: published kernel bundle artifactsThe kernel build compiles a custom wasm bundle from the vendor/manifold3d git submodule. CI environments must:
vendor/emsdkpnpm build to download the pinned project-local Emscripten SDK payload through vendor/emsdkThis repo includes GitHub Actions workflows for:
For Cloudflare Pages, use the GitHub Actions deploy workflow instead of relying on Cloudflare's Git build container to compile the wasm bundle. Configure these repository settings before enabling the workflow:
CLOUDFLARE_ACCOUNT_IDCLOUDFLARE_API_TOKENCLOUDFLARE_PAGES_PROJECT_NAMEPackage name: brep-io-kernel (ESM-only).
Install:
pnpm add brep-io-kernel
Main imports:
import {
BREP,
PartHistory,
AssemblyConstraintHistory,
AssemblyConstraintRegistry
} from "brep-io-kernel";
Subpath imports:
import { BREP } from "brep-io-kernel/BREP";
import { PartHistory } from "brep-io-kernel/PartHistory";
import { CadEmbed } from "brep-io-kernel/CAD";
import { Sketcher2DEmbed } from "brep-io-kernel/Sketcher2D";
import { ConstraintSolver, ConstraintEngine, constraints } from "brep-io-kernel/SketchSolver2D";
Node examples:
CLI helper:
npx brep-io-kernel
npx brep-io-kernel --host 127.0.0.1 --port 4173
npx brep-io-kernel --help
License helper APIs:
import { getPackageLicenseInfoString, getAllLicensesInfoString } from "brep-io-kernel";
console.log(getPackageLicenseInfoString()); // package license info
console.log(getAllLicensesInfoString()); // package + production dependencies
CommonJS note:
const { BREP } = await import("brep-io-kernel");
src/BREP: core solid/kernel implementationsrc/features: feature implementations and dialogssrc/assemblyConstraints: assembly solver and constraintssrc/UI: CAD/sketcher UI and embedding bridgesdocs/: markdown docs and screenshotsapiExamples/: standalone browser API demostests/ and src/tests/: test assets and test runnerSee CONTRIBUTING.md.
See LICENSE.md. This project uses a dual-licensing strategy managed by Autodrop3d LLC.
7 commits
TypeScript
92.2%
C++
5.9%
BREP kernel from scratch using triangle meshes with BREP type topology
250
stars
7
commits
TypeScript
primary language
Sep 12, 2026
updated
brep-io-kernel https://www.npmjs.com/package/brep-io-kernelBREP.io is a browser-based CAD application and JavaScript kernel for feature-based solid modeling.
At its core is a BREP-style modeler with explicit geometry/topology objects such as Solid, Face, Edge, and Vertex, paired with an editable feature-history pipeline.
It also includes sketch workflows powered by a standalone 2D constraint solver, plus robust manifold booleans (manifold-3d), mesh repair/import tooling, assembly constraints, PMI annotations, and embeddable CAD/sketcher APIs.
This project is in active development and APIs may continue to evolve.
General:
Workbench and mode guides:
Feature index:
Primitives and setup:
Solid operations:
Pattern, import, and generation:
Assembly and sheet metal:
Additional implemented features in the codebase include collapse edge, edge smooth, offset face, overlap cleanup, sheet metal hem, and sheet metal cutout.
Prerequisites:
pnpmgit submodule update --init --recursiveInstall and run locally:
git submodule update --init --recursive
pnpm install
pnpm dev
Then open the Vite URL shown in your terminal.
/index.html/cad.html| Command | Purpose |
|---|---|
pnpm dev | Prepares fonts, builds the kernel bundle, then runs the Vite dev server. |
pnpm build | Production build of the app into dist/ (includes kernel build step). |
pnpm build:manifoldPlus | Builds the local manifold wasm/js bundle from the vendor/manifold3d submodule plus local custom bindings, using project-local EMSDK from vendor/emsdk. |
pnpm build:kernel | Builds the ESM kernel bundle into dist-kernel/ and syncs assets. |
pnpm use:manifold:npm | Switches runtime/builds to the published manifold-3d npm package. |
pnpm use:manifold:local | Switches runtime/builds to the locally compiled manifold bundle. |
pnpm which:manifold | Prints the currently selected manifold source. |
pnpm test | Runs the Node test suite (src/tests/tests.ts), writing artifacts to tests/results/. |
pnpm test -- test_primitiveCube | Runs one registered test by exact test function name. |
pnpm liveTesting | Watches src/ and tests/ and reruns tests on change. |
pnpm capture | Captures docs/dialog screenshots. |
pnpm generateLicenses | Regenerates dependency and bundled-font license summaries. |
Build outputs:
dist/: static web app (ready for CDN/web hosting)dist-kernel/: published kernel bundle artifactsThe kernel build compiles a custom wasm bundle from the vendor/manifold3d git submodule. CI environments must:
vendor/emsdkpnpm build to download the pinned project-local Emscripten SDK payload through vendor/emsdkThis repo includes GitHub Actions workflows for:
For Cloudflare Pages, use the GitHub Actions deploy workflow instead of relying on Cloudflare's Git build container to compile the wasm bundle. Configure these repository settings before enabling the workflow:
CLOUDFLARE_ACCOUNT_IDCLOUDFLARE_API_TOKENCLOUDFLARE_PAGES_PROJECT_NAMEPackage name: brep-io-kernel (ESM-only).
Install:
pnpm add brep-io-kernel
Main imports:
import {
BREP,
PartHistory,
AssemblyConstraintHistory,
AssemblyConstraintRegistry
} from "brep-io-kernel";
Subpath imports:
import { BREP } from "brep-io-kernel/BREP";
import { PartHistory } from "brep-io-kernel/PartHistory";
import { CadEmbed } from "brep-io-kernel/CAD";
import { Sketcher2DEmbed } from "brep-io-kernel/Sketcher2D";
import { ConstraintSolver, ConstraintEngine, constraints } from "brep-io-kernel/SketchSolver2D";
Node examples:
CLI helper:
npx brep-io-kernel
npx brep-io-kernel --host 127.0.0.1 --port 4173
npx brep-io-kernel --help
License helper APIs:
import { getPackageLicenseInfoString, getAllLicensesInfoString } from "brep-io-kernel";
console.log(getPackageLicenseInfoString()); // package license info
console.log(getAllLicensesInfoString()); // package + production dependencies
CommonJS note:
const { BREP } = await import("brep-io-kernel");
src/BREP: core solid/kernel implementationsrc/features: feature implementations and dialogssrc/assemblyConstraints: assembly solver and constraintssrc/UI: CAD/sketcher UI and embedding bridgesdocs/: markdown docs and screenshotsapiExamples/: standalone browser API demostests/ and src/tests/: test assets and test runnerSee CONTRIBUTING.md.
See LICENSE.md. This project uses a dual-licensing strategy managed by Autodrop3d LLC.
7 commits
TypeScript
92.2%
C++
5.9%