New browser based CAD application with 2D constraint solver and parametric feature history based modeling

Hi everyone :waving_hand:
I wanted to share a CAD project I’ve been working on called BREP.

Live demo at https://BREP.io/

BREP is a feature-based modeling playground that explores BREP-style workflows on top of triangle meshes, running entirely in the browser. Instead of relying on traditional NURBS kernels, it combines robust manifold CSG on meshes with a lightweight face/edge representation, a full history pipeline, and real-time Three.js visualization.

What makes BREP different?

  • Mesh-first, feature-based workflow
    Import STL/3MF meshes, repair and group triangles into faces, then continue modeling as if it were a traditional parametric solid.

  • Manifold CSG at the core
    All boolean operations are backed by the excellent Manifold library, giving reliable results even with complex mesh inputs.

  • Full history system
    Every operation is captured in a replayable history graph. Edit upstream features and downstream geometry updates automatically.

  • Runs entirely in the browser
    No install required. The project is written in modern JavaScript and uses Three.js for visualization.

Current capabilities (high-level)

  • Parametric primitives (cube, cylinder, sphere, torus, etc.)

  • Sketch-based workflows (extrude, revolve, sweep, loft)

  • Fillets, chamfers, holes, shells, patterns

  • Image-based workflows (heightmaps, 2D image-to-face tracing)

  • Mesh import + repair

  • Assembly modeling with a constraint solver

  • PMI / annotation mode for manufacturing communication

  • Static build output suitable for CDN or simple web hosting

This is very much an experimental and evolving project. APIs are still settling, some areas are rough, and performance tuning is ongoing—but it’s already usable for real modeling tasks and for experimenting with alternative CAD architectures.

Who this might interest

  • People curious about CAD kernels and geometry pipelines

  • Anyone exploring browser-based CAD

  • Developers interested in feature history systems

  • Folks working with mesh-heavy workflows who want something more parametric

Links

I’m very interested in feedback, architecture discussions, and ideas—especially around mesh-based parametric modeling, history systems, and browser performance constraints.

If this direction resonates with you, feel free to poke around the repo or ask questions.

6 Likes

The concept of using the Manifold kernel for real-time parametric modeling in terms of features (rather than code with OpenSCAD) is very interesting.

Being able to start with an existing (manifold) STL and modify it with features will probably be a lot easier than preparing an existing STL for similar modification in FreeCAD, where it takes a few steps that few find intuitive, and is often slow when the original object had curves.

One of the key things about feature-based modeling for me is that I can export as STEP for CAM. Are you thinking of using the parametric feature definition to also be able to export STEP files that express the semantics of the objects?

I have not approached the step issue yet. Don’t really know how I would at this time. I know that there was some work done with an open source plugin for fusion 360 to reconstruct proper curved surfaces using triangle meshes. It might be possible to make a tspline based solution with a surface fitting algorithm of some type. Another option is to increase the resolution of all the feature in the pipeline to get a more precise high resolution result. Multiple different cam solutions can work off triangle vs NURBS data but this is currently an open problem in the context of BREP.io

For me Feature based modeling requires that we have deterministic and stable topological naming and the ability to replay the feature history reliably after making changes in the history. It is not unlike code based cad systems but adds the abstraction of edges and faces powering operations like fillet and chamfer. Would love to discuss your thoughts on this kind of stuff. I think I have cracked the stable topological naming nut so it’s on to more interesting problems.

Yeah, not a lot of value in STEP if it’s just triangles. That won’t perform well when you import it into anything, as you probably know better than I do. I would think for it to be valuable it would have to be higher level, based on the features themselves.

Maybe you could make it hinted by the features, and not try to do anything smart for imported STLs? Basically, if you are editing an STL (particularly one that is meant to represent curves), you have faces, and any STEP export will be a fairly degenerate representation of that already-tessellated object; if you design from scratch you have all the metadata to build the underlying model into objects that can be represented parsimoniously in STEP including curves, perhaps?

CadQuery has what at least feels intuitively to me to be the most generally reliable solution to topological naming I’m aware of, where you can express names semantically. FreeCAD developers have said that their “string hasher” used for resolving topological naming ambiguity could be extended to add similar high-level semantics in the future, if someone builds them.

A meaningful amount of my design for is for my manual machining hobby, so the semantics are critically important to me, including driving technical drawings. I’m pretty used to and sufficiently fluent in FreeCAD for this purpose. That means I’m probably somewhat misaligned with your target audience, except for the once or twice a year that I want to edit someone else’s STL file, when this looks like it would really shine.

It’s super neat to see new ideas in this space, and it’s been delightful to see what new ideas Manifold has unlocked.

Very Cool! I ran the test in Brave on Manjaro Linux, latest of everything as of yesterday, and had a failure on one test, test_fillet_NonClosed. I looked at the log, but for some reason I could not highlight and copy the text. Here’s a screenshot of the log window:

HUGE undertaking, and so far looks great. I use Solidworks daily, and am decent with Blender as well. I’ve played with about everything out there. I wish you all the luck in the world on this massive project!

-Tetra

3 Likes

Looks like I need to fix that test. The actual functionality is still working good.