Show HN: FluidCAD – Parametric CAD with JavaScript
46 points by maouida 2 hours ago | 10 comments
Hello HN users,

This is a CAD by code project I have been working on on my free time for more than year now.

I built it with 3 goals in mind:

- It should be familiar to CAD designers who have used other programs. Same workflow, same terminology.

- Reduce the mental effort required to create models as much as possible. This is achieved by:

    - Provide live rendering and visual guidance as you type.
    - Allow the user to reference existing edges/faces on the scene instead of having to calculate everything.
    - Provide interactive mouse helpers for features that are hard to write by code: Only 3 interactive modes for now: Edge trimming, Sketch region extrude, Bezier curve drawing.
    - Implicit coding whenever possible: e.g: There are sensible defaults for most parameters. The program will automatically fuse intersecting objects together so you do not have to worry about what object needs to be fused with what.
- It should be reasonably fast: The scene objects are cached and only the updated objects are re-computed.

I think I have achieved these goals to a good extent. The program is still in early stages and there are many features I want to add, rewrite but I think it is already usable for simple models.

Update to add more details: This is based on Opencascade.js WASM binding. So you get all the good things that come with any brep kernel. Fillets, chamfers, step import and export...

The scene is webview but the editing is in your local file. You use your own editor and the environment you are familiar with.

One important feature that I think make this stand out among other code based cad software is the ability to transform features not just shapes. More here: https://fluidcad.io/docs/guides/patterns You can see it in action in the lantern example: https://fluidcad.io/docs/tutorials/lantern


bsimpson 3 minutes ago
The thing that made Flash magical was that it had the approachability of a design tool (and it really did have some of the best design tools ever), with the extensibility of a scripting language. You could start by drawing on a canvas and grow into programmatically generating designs.

This looks like it could do the same thing for constraint modeling. That's awesome!

reply
unforbiddenYet 3 minutes ago
Nice work and kudos for programming it by hand! Starred the project and plan to try it out soonish.
reply
WillAdams 2 hours ago
reply
astroalex 53 minutes ago
One obvious difference I can see at a glance is that Maker.js doesn't support 3D models, while FluidCAD does. I assume Maker.js is a lower level library aimed at interfacing directly with CNC machines, while FluidCAD is focused on 3D design.
reply
WillAdams 43 minutes ago
Maker.js is supposed to also support openjscad (or whatever they're call it these days, the JavaScript enabled version of OpenSCAD).
reply
CWIZO 2 hours ago
This looks great. I just started trying to generate some models using golang and the ecosystem doesn't seem great. Will check this out, might work out better.
reply
shocks 59 minutes ago
This looks awesome.
reply
alterom 2 hours ago
What geometry kernel is it using?

Which operations are supported? (Booleans? ...)

Where's the API link?

...finally, was this vibe-coded?

Inquiring minds want to know!

reply
kaesve 2 hours ago
I was also curious, looks like open cascade, and a pretty good range of operations supported (see https://github.com/Fluid-CAD/FluidCAD/tree/main/lib/oc). Super cool!
reply
maouida 2 hours ago
Based on opencascade wasm. Features in the docs. Api coming soon. No it was not, I started this before I even started using coding agents. It took many iterations and rewrites before settling on the current shape. After building the core features I started using claude to add more features, improve test coverage and generte docs.
reply