brepjs

brepjs is an open source programmatic CAD library thats runs on web

Last verified:

Visit brepjs

What is brepjs?

Brepjs is an open-source programmatic CAD library that runs entirely in the browser, enabling JavaScript and TypeScript developers to create exact B-Rep (Boundary Representation) geometry without needing traditional CAD software. The library provides exact B-Rep geometry with branded types that prove validity at compile time, ensuring mathematical accuracy for measurements and fully supporting STEP exports for industrial use cases.

Key features include a live TypeScript playground where users can edit CAD code in the browser and see results rendered instantly, export capabilities for both STL and STEP file formats, and browser-native execution via WebAssembly (WASM) for performance. The API is built for parametric and programmatic workflows, supporting boolean operations, extrude, fillet, chamfer, hole, helix, and other common CAD operations. It also serves as an API layer with an adapter system to use different CAD kernels under the hood.

Brepjs is designed for JavaScript/TypeScript developers, web developers building CAD applications, engineers needing parametric modeling in the browser, and teams creating web-based CAD tools or educational platforms. It is particularly useful for those who want exact mathematical boundaries rather than mesh-based geometry, making it suitable for applications requiring precision manufacturing exports.

brepjs pricing

Pricing model: Freemium

Brepjs is open source and free to use. There are no paid plans or subscription tiers mentioned. The playground is freely accessible, and the library can be used without cost. As an open-source project, it includes full access to all features including exact B-Rep geometry, STEP exports, and the TypeScript API.

brepjs pros

  • Open source and free to use
  • Runs entirely in browser via WASM
  • Exact B-Rep geometry with mathematical precision
  • Branded types prove validity at compile time
  • Live TypeScript playground with instant rendering
  • Export to both STL and STEP formats
  • STEP export supports industrial manufacturing
  • No traditional CAD software required
  • Programmatic/API-driven CAD workflow
  • Supports boolean operations (union, intersect, subtract)
  • Built-in fillet and chamfer operations
  • Hole and helix creation capabilities
  • Extrude operations for parametric modeling
  • Adapter layer supports multiple CAD kernels
  • TypeScript-first with strong type safety
  • Lightweight compared to desktop CAD tools
  • Easy integration with web applications
  • Can pass mesh output to Three.js for rendering

brepjs cons

  • Browser-based performance limited by WASM
  • No organic or sculpting workflow support
  • Requires TypeScript/JavaScript knowledge
  • Limited to parametric modeling approaches
  • No GUI-based direct modeling interface
  • Smaller community than established CAD tools
  • Fewer pre-built components than commercial CAD
  • Learning curve for programmatic CAD approach

Frequently asked questions about brepjs

What is brepjs?

Brepjs is an open-source programmatic CAD library that runs in the browser, providing exact B-Rep geometry for JavaScript and TypeScript developers. It enables parametric CAD modeling without traditional CAD software.

How do I use the brepjs playground?

Visit the playground at brepjs.dev/playground, edit TypeScript CAD code directly in your browser, see results rendered live, and export your designs as STL or STEP files.

What file formats can brepjs export?

Brepjs supports exporting to both STL and STEP formats. STEP exports are particularly valuable as they maintain exact B-Rep geometry for industrial manufacturing applications.

Is brepjs open source?

Yes, brepjs is completely open source. The GitHub repository is available at github.com/andymai/brepjs, and there are no licensing costs or paid tiers.

What makes brepjs different from mesh-based CAD libraries?

Brepjs uses exact B-Rep (Boundary Representation) topology, ensuring shapes have exact mathematical boundaries and measurements are accurate. This differs from mesh-based approaches that approximate geometry.

Does brepjs require any CAD software installed?

No, brepjs runs entirely in the browser via WebAssembly (WASM). You don't need to install any traditional CAD software to use it.

What CAD operations does brepjs support?

Brepjs supports boolean operations (union, intersect, subtract), extrude, fillet, chamfer, hole, helix, collapse edge, and datum operations. The API is built for parametric modeling workflows.

Can I use brepjs with Three.js for rendering?

Yes, brepjs produces shape data that can be passed as mesh output to Three.js for rendering or display in web applications.

What programming languages does brepjs support?

Brepjs is TypeScript-first with strong type safety. It works with JavaScript and TypeScript, making it accessible for web developers familiar with these languages.

Who is brepjs designed for?

Brepjs is designed for JavaScript/TypeScript developers, web developers building CAD applications, engineers needing parametric modeling in the browser, and teams creating web-based CAD tools or educational platforms requiring exact geometry.

Categories

Use cases

Browse all AI tools on NeedAnAI