BREP.io

Source https://github.com/mmiscool/BREP

BREP.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.

Screenshots

Home Modeling Mode Sketch Mode PMI Mode Image to Face 2D Image to Face 3D

Documentation Index

General:

Core APIs:

System docs:

Mode guides:

Modeling Feature Docs

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.

Assembly Constraints

PMI Annotation Docs

Quick Start

Prerequisites:

  • Node.js 18+
  • pnpm

Install and run locally:

bash
pnpm install
pnpm dev

Then open the Vite URL shown in your terminal.

  • Main app shell: /index.html
  • Direct CAD workspace: /cad.html

Build, Test, and Utility Commands

CommandPurpose
pnpm devPrepares fonts, builds the kernel bundle, then runs the Vite dev server.
pnpm buildProduction build of the app into dist/ (includes kernel build step).
pnpm build:kernelBuilds the ESM kernel bundle into dist-kernel/ and syncs assets.
pnpm testRuns the Node test suite (src/tests/tests.js), writing artifacts to tests/results/.
pnpm liveTestingWatches src/ and tests/ and reruns tests on change.
pnpm captureCaptures docs/dialog screenshots.
pnpm generateLicensesRegenerates dependency and bundled-font license summaries.

Build outputs:

  • dist/: static web app (ready for CDN/web hosting)
  • dist-kernel/: published kernel bundle artifacts

Use as an NPM Package

Package name: brep-io-kernel (ESM-only).

Install:

bash
pnpm add brep-io-kernel

Main imports:

javascript
import {
  BREP,
  PartHistory,
  AssemblyConstraintHistory,
  AssemblyConstraintRegistry,
  CadEmbed,
  Sketcher2DEmbed
} from "brep-io-kernel";

Subpath imports:

javascript
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:

bash
npx brep-io-kernel
npx brep-io-kernel --host 127.0.0.1 --port 4173
npx brep-io-kernel --help

License helper APIs:

javascript
import { getPackageLicenseInfoString, getAllLicensesInfoString } from "brep-io-kernel";

console.log(getPackageLicenseInfoString()); // package license info
console.log(getAllLicensesInfoString());    // package + production dependencies

CommonJS note:

javascript
const { BREP } = await import("brep-io-kernel");

Repository Layout

  • src/BREP: core solid/kernel implementation
  • src/features: feature implementations and dialogs
  • src/assemblyConstraints: assembly solver and constraints
  • src/UI: CAD/sketcher UI and embedding bridges
  • docs/: markdown docs and screenshots
  • apiExamples/: standalone browser API demos
  • tests/ and src/tests/: test assets and test runner

Contributing

See CONTRIBUTING.md.

License

See LICENSE.md. This project uses a dual-licensing strategy managed by Autodrop3d LLC.

Documentation

This project's license

Copyright 2025 Autodrop3d LLC https://autodrop3d.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 1. Any modifications made to the Software must be submitted to Autodrop3d LLC with an irrevocable assignment of the copyright via git pull request. This is intended to allow Autodrop3d LLC to sell commercial licenses of the Software for use in proprietary products under a dual-licensing strategy. Failure to contribute back modifications without a commercial license purchased from Autodrop3d LLC voids all permissions granted by this license. 2. If Autodrop3d LLC is sold, merged, transferred, or otherwise succeeded by any entity or individual, all rights and obligations described in this license shall transfer automatically to that successor entity or individual. 3. If Autodrop3d LLC ceases operations or dissolves, and no successor entity or individual continues to publicly host the Software in a manner that allows the public to obtain the source code and submit contributions for a period of at least eighteen (18) consecutive months, then Clauses 1 and 2 of this license shall be automatically and irrevocably canceled. The above copyright notice and these permission notices shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Licenses Report of libraries used in this package

28 packages • 6 license types

(MIT AND Zlib) 1 package

pako 1 version
zlib port to javascript - fast, modularized, with browser support

(MIT OR GPL-3.0-or-later) 1 package

jszip 1 version
Create, read and edit .zip files with JavaScript http://stuartk.com/jszip
Author: Stuart Knightley <[email protected]>

Apache-2.0 1 package

manifold-3d 1 version
Geometry library for topological robustness

ISC 1 package

inherits 1 version
Browser-friendly inheritance fully compatible with standard node.js inherits()

MIT 23 packages

@jridgewell/resolve-uri 1 version
Resolve a URI relative to an optional base URI
Author: Justin Ridgewell <[email protected]>
@jridgewell/sourcemap-codec 1 version
Encode/decode sourcemap mappings
Author: Justin Ridgewell <[email protected]>
@jridgewell/trace-mapping 1 version
Trace the original position through a source map
Author: Justin Ridgewell <[email protected]>
@jscadui/3mf-export 1 version
3mf export
@malgorithms/m3 1 version
a wrapper around manifold-3d with some helpers
Author: Chris Coyne <[email protected]>
@tarikjabiri/dxf 1 version
A JavaScript interface to Dxf written in TypeScript.
Author: Tarik EL JABIRI
convert-source-map 1 version
Converts a source-map from/to different formats and allows adding/changing properties.
Author: Thorsten Lorenz <[email protected]>
core-util-is 1 version
The `util.is*` functions introduced in Node v0.12.
Author: Isaac Z. Schlueter <[email protected]> (http://blog.izs.me/)
esbuild-wasm 1 version
The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.
immediate 1 version
A cross browser microtask library
isarray 1 version
Array#isArray for older browsers
Author: Julian Gruber <[email protected]>
lie 1 version
A basic but performant promise implementation
marked 1 version
A markdown parser built for speed
Author: Christopher Jeffrey
monaco-editor 1 version
A browser based code editor
Author: Microsoft Corporation
pngjs 1 version
PNG encoder/decoder in pure JS, supporting any bit size & interlace, async & sync with full test suite.
process-nextick-args 1 version
process.nextTick but always with args
readable-stream 1 version
Streams3, a user-land copy of the stream library from Node.js
safe-buffer 1 version
Safer Node.js Buffer API
Author: Feross Aboukhadijeh <[email protected]>
setimmediate 1 version
A shim for the setImmediate efficient script yielding API
Author: YuzuJS
string_decoder 1 version
The string_decoder module from Node core
three 1 version
JavaScript 3D library
Author: mrdoob
three-mesh-bvh 1 version
A BVH implementation to speed up raycasting against three.js meshes.
Author: Garrett Johnson <[email protected]>
util-deprecate 1 version
The Node.js `util.deprecate()` function with browser support
Author: Nathan Rajlich <[email protected]> (http://n8.io/)

SGI-B-2.0 1 package

tess2 1 version
GLU tesselator ported to Javascript, performs polygon boolean operations and triangulation
Author: Matt DesLauriers <[email protected]>

Font Licenses

Bundled fonts are licensed separately from npm packages.