@bitbybit-dev/occt

中文文档
1.6.0发布于 2026/10/29MIT AND Apache-2.0 AND LGPL-2.1-only WITH OCCT-exception-1.0TypeScriptES Module构建来源已验证近 30 天下载 2.3万

Bit By Bit Developers CAD algorithms using OpenCascade Technology kernel. Run in Node and in Browser.

原始使用文档
文档目录13 节
  1. Overview
  2. Quick Start
  3. Need Server-Side CAD?
  4. Use It With an AI Agent
  5. Links
  6. API reference
  7. Example Applications
  8. Development
  9. Bitbybit Platform
  10. Support the Project
  11. Community
  12. Major Dependencies
  13. License

@bitbybit-dev/occt

OpenCascade Technology (OCCT) CAD kernel integration for Bitbybit - professional-grade 3D modeling with boolean operations, fillets, chamfers, lofts, sweeps, STEP/IGES import/export, and more.

Picture showing bitbybit.dev platform

Overview

This package wraps the OpenCascade Technology kernel with additional algorithms from Bitbybit. It is independent of rendering frameworks - use it with BabylonJS, Three.js, PlayCanvas, or build your own WebGL/WebGPU pipeline.

Works in both Node.js and browser environments. For browser apps, consider using @bitbybit-dev/occt-worker which wraps this library in a non-blocking WebWorker.

Quick Start

The fastest way to scaffold a project with OCCT pre-configured:

npx @bitbybit-dev/create-app my-project --engine threejs
cd my-project
npm install
npm run dev

This creates a complete Vite + TypeScript project with OCCT, JSCAD, and Manifold kernels ready to use. Learn more about the CLI.

Need Server-Side CAD?

The CLI first asks you to choose between a Frontend app or a CAD Cloud app. Select "cloud" to scaffold a full-stack project with a backend (Hono on Cloudflare Workers, Node.js Express, or ASP.NET Core) and a React + Three.js frontend. Your API key stays on the server and the frontend proxies requests through your backend:

npx @bitbybit-dev/create-app my-cloud-project --type cloud

Choose from 5 backend templates: Hono + SDK, Hono + REST, Node.js + SDK, Node.js + REST, or .NET + REST. Each includes ready-to-run examples with model generation, batch operations, and CAD pipelines. Learn more.

Use It With an AI Agent

An agent that does not know an API invents plausible names for it, and Bitbybit has more functions across its three CAD kernels than any model holds in memory. The free Bitbybit CAD MCP server removes the guesswork: your agent looks up the exact signature, parameter defaults, return type and examples for the version of @bitbybit-dev/occt your project has installed, and writes code that compiles the first time.

claude mcp add --transport http bitbybit https://mcp.bitbybit.dev/mcp

Cursor, VS Code, claude.ai, ChatGPT and the Claude API connect to the same endpoint; npx -y @bitbybit-dev/mcp runs the same server locally, pinned to your installed version. Every configuration is here.

With a CAD Cloud key, the Bitbybit CAD Cloud MCP goes further and lets the agent run the geometry for you - measure a STEP file, run a pipeline, convert to glTF - and hand back the results as files. For assistants that cannot speak MCP, the whole API is also published as context files. The AI section of the documentation explains all of it.

ResourceURL
GitHubhttps://github.com/bitbybit-dev/bitbybit/tree/master/packages/dev/occt
Monorepohttps://github.com/bitbybit-dev/bitbybit
NPMhttps://www.npmjs.com/package/@bitbybit-dev/occt
Documentationhttps://learn.bitbybit.dev/learn/code/common/occt/what-is-occt
API Referencehttps://docs.bitbybit.dev/classes/Bit.OCCT
Unit Test Coveragehttps://github.com/bitbybit-dev/bitbybit/actions/workflows/verify.yml

API reference

Every class, method and input type in this package is documented in the generated TypeScript API reference:

Example Applications

AppSource Code
Hex ShellGitHub
Cup ConfiguratorGitHub
Hex House ConceptGitHub
Terrace Furniture (BabylonJS)Closed source

Development

# Build package
npm run build-p

# Run unit tests with coverage
npm run test:coverage

# Re-run them as you edit
npm run test:watch

Bitbybit Platform

Beyond NPM packages, Bitbybit offers:

  • Visual Programming Editors - Rete & Blockly drag-and-drop 3D modeling, plus a Monaco TypeScript editor
  • CAD Cloud API - Build full pipelines that compose all Bitbybit algorithms, where each step can reference outputs of previous steps. Supports parametric model generation, STEP-to-glTF conversion, and complex CAD workflows via HTTP
  • Bitbybit Studio - A growing visual dashboard where API Key users can generate models, convert files, build pipelines with a GUI, inspect tasks, and preview 3D results
  • 3D Bits for Shopify - Interactive 3D product configurators for e-commerce
  • Script Runners - Execute visual scripts directly on your website
  • Built for AI Coding Agents - The free Bitbybit CAD MCP gives Claude Code, Cursor, VS Code, claude.ai and ChatGPT the exact API of the version you use; with a key, the CAD Cloud MCP runs the geometry too
  • Business & Enterprise - We help businesses and enterprises develop custom applications and spin up optimized CAD tenant workflows on our managed servers

Support the Project

This package is part of the Bitbybit ecosystem: MIT-licensed, with open-source TypeScript and the closed-source Bitbybit OCCT Kernel. Your subscription helps fund continued development.

⭐ Subscribe - Silver or Gold plan | Get API Key for CAD Cloud

Community

Major Dependencies

OpenCascade Technology (OCCT), compiled to WebAssembly together with the Bitbybit kernel layer, Draco for glTF compression and RapidJSON.

License

MIT © Bit By Bit Developers: the TypeScript and JavaScript in this package and the Bitbybit OCCT Kernel it ships (WebAssembly, built on OCCT). The kernel is closed source: each of its builds links OCCT (LGPL-2.1 with the Open CASCADE exception) and other open-source components with the Bitbybit kernel layer, C++ whose source is not published. NOTICE lists the components, licenses/ reproduces their license texts, and NOTICE also says how to get the materials to relink the kernel with a modified OCCT.

版本与发布记录

@bitbybit-dev/occt 共发布 120 个版本,首次发布于 2023/06/19;过去 12 个月发布了 30 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.6.0latest2026/10/2910 天前
1.6.0-rc.0rc2026/10/2811 天前
1.5.02026/10/1227 天前
1.5.0-rc.02026/10/1227 天前
1.4.12026/10/021 个月前
1.4.02026/09/301 个月前

其他发布通道:alpha → 0.19.0-alpha.0,rc → 1.6.0-rc.0。

关于 @bitbybit-dev/occt 的常见问题

@bitbybit-dev/occt 是什么?

Bit By Bit Developers CAD algorithms using OpenCascade Technology kernel. Run in Node and in Browser.

如何安装 @bitbybit-dev/occt?

在项目目录运行 npm install @bitbybit-dev/occt,或使用 pnpm add / yarn add / bun add。

@bitbybit-dev/occt 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bitbybit-dev/occt 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bitbybit-dev/occt 可以商用吗?

@bitbybit-dev/occt 使用 MIT AND Apache-2.0 AND LGPL-2.1-only WITH OCCT-exception-1.0 许可。声明的许可为 MIT AND Apache-2.0 AND LGPL-2.1-only WITH OCCT-exception-1.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@bitbybit-dev/occt 的下载量有多少?

根据 npm 官方下载统计,@bitbybit-dev/occt 在 2026/10/08 – 2026/11/06 这 30 天内被下载 22,699 次,日均约 757 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bitbybit-dev/occt 还在维护吗?

最新版本 1.6.0 发布于 2026/10/29(10 天前);至今共发布 120 个版本,其中过去 12 个月发布了 30 个;首次发布于 2023/06/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。