Open source CAD in the browser (Solvespace) (solvespace.com)

by phkahler 128 comments 374 points
Read article View on HN

128 comments

[−] MrDOS 45d ago
SolveSpace is a wonderfully different take on parametric CAD, but development has really slowed, and it seems fundamentally incapable of some pretty rudimentary features (like chamfers[0]). Dune 3D[1] seems like a pretty effective spiritual successor.

0: https://github.com/solvespace/solvespace/issues/149

1: https://dune3d.org/

[−] phkahler 45d ago
Chamfers and Fillets are my next major undertaking. Don't expect them any time soon, but they've moved to the top of my list. They are extremely difficult to do in the general case - so we will not cover all cases. Several years ago I tried an experiment:

https://github.com/solvespace/solvespace/issues/453#issuecom...

That could only do the top or bottom of a straight extrusion. This time will be a more general than that. Not looking forward to doing corners where 3 fillets meet ;-)

[−] MrDOS 45d ago
Oh, sorry, I didn't recognize that this had been posted by a SolveSpace maintainer! Rad. I am glad to hear the project is still moving.

I also appreciate the difficulty of generalizing chamfers/fillets. There's a reason that basically all FOSS CAD packages have struggled with it.

[−] echelon 45d ago

> difficulty of generalizing chamfers/fillets. There's a reason that basically all FOSS CAD packages have struggled with it.

Could you decompile CAD, run it through an LLM, and call it a day?

[−] yonatan8070 45d ago
Aren't there licesing issues with porting a proprietary implementation into an open-source one that could open up the project to legal issues with the proprietary vendor?
[−] WillAdams 44d ago
The Plasticity guy seems to be threading that needle.
[−] voakbasda 44d ago
That might seem to be the case, right up until he gets taken to court over it.

Never presume that a thing is legal (or will not later be punished) on the basis that someone is already doing it.

[−] echelon 44d ago
You can't stop it. This is just progress.

All software that isn't delivered over client/server to thin clients is now subject to being trivially cloned.

[−] voakbasda 44d ago
That was never in question, even before AI. It just took more monkeys at typewriters.
[−] mordae 45d ago
Hi! Thanks for your hard work! I just want you to know it's definitely worth it!

I am using SolveSpace for my 3D prints because I just don't have time to learn anything else. With SolveSpace I've been productive in like 2 hours after launching it the first time.

So far you've saved me like $500 in things I've printed instead of bought. Just last week I've printed nasal manifold for my DIY sleep monitoring setup. Replacement specs legs a month ago.

If you really make fillets and chamfers a reality, please don't forget to open donations.

[−] huslage 45d ago
DIY sleep monitoring? Tell us more!
[−] schiffern 45d ago

  >corners where 3 fillets meet
I would imagine there are a few different possible options (preferably a settable parameter):

* Intersection. Conceptually the simplest, the chamfers would just be joined by the solid addition of all three fillet surfaces, creating three new sharp corner edges that meet at a single vertex.

* Rolling sphere. Imagine an idealized spherical "thumb" smoothing out caulk. The middle would be joined by a new spherical concave surface, tangent to all three fillets. Also generalizable to convex fillet intersections, smoothing out sharp corners.

* NURBS, with adjustable parameters or even control points, eg when you want a little more "meat" in a corners for strength of a part.

* Flat corners, for chamfers (what do do when N>3 corners meet?)

* What else?

Ideally you might be able set the corner type separately for inside vs outside corners, or on a per-vertex or (in the most granular case) per-incoming-edge basis? Is that crazy?

How do saddle corners[0] behave? Does it just "work out" and (by some miracle) uniquely resolve for all permutations and corner types?

It certainly gets complex quickly!

[0] center, where the cubes all intersect https://entitleblogdotorg3.files.wordpress.com/2015/02/esche...

[−] throwup238 44d ago
That’s not even the complex part. Most of what you describe is a user interface issue, not a geometric kernel issue.

The hard part of 3 corners fillets is the tolerances. Each of those fillet operations has its own compounding float errors and when they meet, the intersection is so messy that they often do not intersect at all. This breaks almost every downstream algorithm because they depend on point classification to determine whether an arbitrary point is inside the manifold, outside, or sitting on an edge or vertex.

And that description of the problem is just scratching the surface. Three corner filets create a singularity in UV space at the common vertex so even when you find a solution to the tolerance problem you still have to deal with the math breaking down and a combinatorial explosion of special cases, almost each of which has to be experimentally derived.

[−] hnben 44d ago
when i did openscad, i just did a minowski hull with a 4sided bipyramid (aka rotated cube) to get chamfers for my cubes.

bonus: minowski hull with a round pyramid adds chamfers in the vertical and fillets in the horizontal, which is what i want for 3d printing most of the time. additionally it closes small overhangs, and it makes fonts smoother (i.e. fonts don't extrude in a 90degree angle, and get 45degree instead, and print better on vertical faces)

disclaimer: I havent used openscad for about a year and my memory may be fuzzy

edit: i am not saying minowsky hull would directly solve your problem, but maybe the algorithm gives you inspiration to solve your numerical issues

[−] throwup238 44d ago
OpenSCAD is mesh based so it's not even in the same universe as a proper brep geometric kernel. Everything is easier when you give up on the math entirely, but that’s not good enough for real world manufacturing and simulation.

All of the major commercial geometric kernels have been working on these problems for thirty years and I’m sorry, but your five minutes experience with a glorified tessellator isn’t going to make progress on long standing computational geometry problems.

[−] schiffern 41d ago

  >that’s not good enough for real world manufacturing and simulation
Dumb question: why not?? It's working for that guy and his 3D printer apparently, which is "real world" (though one could certainly argue it's not proper "manufacturing").

In theory pi has infinite places, sure . In real-world practice (vs math-lympics) you never need more than 100 digits, and indeed you rarely ever actually need more than 5.

Why doesn't it work to "just" throw more bit-width and more polygons at it? Who out there actually needs more than that (vs who just thinks they do)?

[−] throwup238 41d ago
The answer boils down to “floating point math” and “discontinuities”.

> indeed you rarely ever actually need more than 5.

That’s not how math works. With every operation the precision falls, and with floats the errors accumulate. What was five digits quickly becomes 3 digits and now you’ve got three surfaces that are supposed to, but don’t technically intersect because their compounding errors don’t overlap even though the equations that describe them are analytically exact. Modern geometric kernels have 3 to 7 tolerance expansion steps that basically brute force this issue when push comes to shove.

Once you have these discontinuities, a lot of critical math like finite element modeling completely breaks down. The math fundamentally depends on continuous functions. Like I mentioned above, three corner filets create a singularity in parametric space by default, so even the core algorithms that kernels depend on to evaluate surfaces break on a regular basis on basic every-day operations (like a box with smoothed edges - aka almost every enclosure in existence)

> Who out there actually needs more than that (vs who just thinks they do)?

I can’t stress this enough: almost everyone. CAD isn’t one of those fields where you can half ass it. Even the simplest operations are bound to create pathological and degenerate cases that have to be handled, otherwise you have a pile of useless garbage instead of a 3d model.

Slicers deal with meshes, like video game renderers, not boundary representations like CAD kernels. There is effectively zero overlap. Even just tessellation, the step that converts brep to mesh, is significantly harder than anything 3d printing software has to do.

[−] ruevs 44d ago
Join SolveSpace development? ;-)
[−] schiffern 44d ago
This is why geometric kernels are the gateway to madness. ;) Thanks for the clarification.
[−] julbaxter 45d ago
Dune3D uses SolveSpace behind the scene.
[−] IshKebab 45d ago
FreeCAD doesn't have the limitations of SolveSpace, and the UX is actually decent now. I moved to that.
[−] brcmthrowaway 45d ago
How does Dune3D compare to FreeCAD?
[−] faangguyindia 45d ago
All we need is a genius, with unlimited claude and codex credit and he will replace Fusion 360 atleast in 3d printing and machining space

It's so sad most guys aren't comming together to build some great CAD engine which open source really needs!

Gimp is shame, photoshop is increasingly being lockdown and people who have smarts to fix that are doing nothing.

[−] masonhensley 45d ago
I've been using FreeCad more and more, but solvespace has been a great, lightweight tool to design parts for laser cutting by SendCutSend/Oshcut.

Neat that they got it working in the browser.

[−] somat 45d ago
I love solvespace, it is hard to describe but despite it's limitations and problems (and there are many) it feels joyous to use if that makes sense. Something about it's simple and straightforward interface just makes it fun. To the point that my biggest gripe is the modal dialogs that pop when a constraint is deleted or it's conditions cannot be met. It is quite awkward compared to the rest of the workflow.

Anyhow, salutes to the author of this web port, very slick.

[−] ecto 45d ago
Here's my take on CAD in the browser! https://vcad.io

I implemented a full kernel in rust and compile it to wasm https://github.com/ecto/vcad

[−] JoshTriplett 45d ago
Impressive work!

Minor nit: why does the rendered in-window text use a really awful pixelated font? It looks like what happens when a font gets rendered onto a pixel grid without any hinting or snapping.

[−] gouggoug 45d ago
I recently got into 3D printing and, of course, after seeing countless ads on YouTube for OnShape, that was my first choice.

Anyone having used both can share their thoughts about how solvespace and OnShape compare?

On my end I’ve been loving OnShape and find it pretty intuitive. I also tried fusion360 but closed it after 5 minutes, it felt too sluggish.

[−] __natty__ 45d ago
Looking at stream events, the event type is so long and often repeated for each event with little extra payload it could be potentially easy win for Anthropic to optimize system bandwidth by using shorthands.

> {"type":"content_block_delta","delta":{"text":" search"}}

[−] contingencies 45d ago
Ahh, but can it do a clean self-reversing diamond thread including the reversing portion?

See https://news.ycombinator.com/item?id=47580583

[−] GorbachevyChase 45d ago
I’ve wondered how feasible it would be to start building browser-based CAD/design products to replace our expensive and poorly supported paid plugins and niche products. Seems promising!
[−] ponyous 45d ago
Does this use its own backend/engine? I've been working on LLM to CAD tool[0] and have realised there are so many backends and options to choose from. Since the realisation I'm trying to find the best representation for an LLM. I think OpenSCAD is currently the best and most feature complete choice, but I definitely need to dig a bit deeper. If anyone has any pointers I welcome them!

[0]: https://GrandpaCAD.com

[−] steveharing1 45d ago
Currently I'm comfortable using FreeCAD but i'll try this one for sure.
[−] TheJoeMan 45d ago
I scrolled with the mouse wheel and the origin drifts off screen.

Is there an open-source "cleanroom" re-implementation of the Parasolid kernel? I just like the way Solidworks does things vs. Autodesk.

[−] ruevs 44d ago
One more fun fact:

SolveSpace officially is supported on Windows (Vista-11), Linux and macOS, and compiles with Emscripten and runs in a browser.

However with a little effort it also compiles for and runs on Windows 2000.

https://github.com/solvespace/solvespace/issues/1036#issueco...

So it runs on all the majour platforms from the last 26 years (excluding MacOS 9).

[−] ruevs 44d ago
One more fun fact:

SolveSpace officially is supported on Windows (Vista-11), Linux and macOS, and compiles with Emscripten and runs in a browser.

However with a little effort it also compiles for and runs on Windows 2000.

https://github.com/solvespace/solvespace/issues/1036#issueco...

So it runs on all the majour platforms from the last 26 years (excluding MacOS 9).

[−] henrebotha 45d ago
So stoked to see the movement on this project. Once lofts are possible, it'll be so over for FreeCAD
[−] landsman 45d ago
Impressive
[−] Jaco07 45d ago
[flagged]
[−] mclau153 45d ago
onShape does this already
[−] mandarwagh 45d ago
Crazy