Skip to content

What brepjs is NOT ​

Knowing the non-goals matters as much as knowing the goals. brepjs is opinionated, and a few things are deliberately out of scope. If you need any of these, brepjs is the wrong tool; pick something else.

Not a renderer ​

brepjs has no graphics, no canvas, no WebGL, no scene graph. The output of every modelling operation is a B-Rep shape; you mesh it (shape(s).mesh()) and hand the triangle data to your renderer of choice: Three.js, Babylon.js, raw WebGL, react-three-fiber.

The Three.js Integration chapter covers the meshing → rendering pipeline.

Not a mesh library ​

If you have triangle data and want to do operations on triangle data, use Three.js, Babylon.js, or Manifold. brepjs only ingests meshes via importSTL, importOBJ, and importThreeMF, which convert triangles into a B-Rep approximation: useful for measurement and STEP conversion, not for further triangle work.

Not an organic modeller ​

brepjs has no SubD modelling, no T-splines, no sculpting tools, no Blender-style modifier stack. The geometry it can express is whatever OpenCascade's NURBS-based kernel can express: planes, cylinders, cones, spheres, tori, B-spline surfaces, swept and revolved surfaces. Excellent for parts; not the right tool for character modelling, terrain, or hand-sculpted forms.

Not a real-time CSG library ​

fuse, cut, and intersect are exact boolean operations on B-Rep shapes; they take milliseconds to seconds depending on shape complexity, not microseconds. If you need real-time CSG (e.g. for live editing of dozens of operations per frame), the kernel will be too slow and a mesh-CSG library is a better fit.

Not a constraint solver for 2D drafting ​

brepjs ships a Sketcher for building 2D profiles fluently (movePointerTo, lineTo, tangentArcTo, close, extrude). It does not ship a 2D constraint solver: you cannot say "make these two lines parallel" or "constrain this distance to 10mm". For constraint-based parametric drafting, use Solvespace or PythonOCC.

Not an assembly solver ​

brepjs ships an assembly module for grouping parts and applying mate constraints (fixed, coincident, concentric, distance, angle), plus joints with forward and inverse kinematics, but the mate solver is intentionally limited:

  • It solves mates analytically, one at a time down a chain anchored by a fixed part, each reading the solved pose of the part it references. It is not a simultaneous solver, and unsupported entity pairs (such as axis-to-plane) report ASSEMBLY_NOT_CONVERGED
  • checkInterference reports overlapping parts, but nothing resolves a collision for you

For closed-loop mechanisms or simultaneous constraint systems, use a dedicated mechanical CAD tool. brepjs assemblies are appropriate for parametric placement (e.g. "snap this insert into that bin") and for driving open joint chains.

Not server-side renderable ​

brepjs requires WASM to run. Server-side rendering frameworks (Next.js SSR, Nuxt SSR, Remix) cannot execute the kernel during render. You must use brepjs in client-side components: dynamic(import, { ssr: false }) in Next.js, <ClientOnly> in Nuxt, etc. The Frameworks chapter covers patterns for each framework.

Not a multi-user collaboration tool ​

brepjs is a library, not a service. It has no networking, no shared state, no operational transform, no presence. If you need real-time collaborative CAD editing, you build that on top; brepjs handles the geometry kernel, you handle the syncing.

Not a manufacturing toolpath generator ​

brepjs models parts. It does not generate G-code, slicer output, or CAM toolpaths. Export your part to STEP and feed it to Fusion 360 Manufacturing, PrusaSlicer, or any CAM/slicer tool.

Not a magic black box ​

The kernel is OpenCascade. The pitfalls of OpenCascade (boolean failures on near-coincident geometry, fillet failures on tight curvature, healing requirements after STEP imports) are inherited by brepjs. The library wraps them in nicer types and clearer errors, but the underlying geometry concerns are the same. Read Healing & Sewing before you ship anything that imports STEP from third parties.

Next steps ​

Released under the Apache 2.0 License.