upvote
This is cool, and something I've thought about a lot, as I'm pretty unhappy with the state of CAD on Linux. The world definitely needs another open source CAD kernel, and I was toying with making my own before I decided to pursue something else.

I think the problem of finding edges can be solved by stepping back and redefining primitives. One idea I had was defining them as a 2D sketch and a transformation function along a path. A sphere would be a 2D hemisphere that rotates as it moves along a circular trajectory, with the flat side staying in place, for example. A cube would be a square That moves along a vertical or horizontal path the distance of the sides. You get the idea.

The advantage of this type of representation is that edges can only ever be edges in the 2D shape, or the path traveled by vertices. The hard part is that when you do boolean operations using primitives, you probably want to go back and turn it into a primitive representation (2D shape, transformation along a path).

reply
This is super neat, cool that you have an online demo as well.

I wonder if there are any ideas on how to make this a OpenSCAD-style editor instead of interactive? I like the text-based style for simple regular shapes, but they tend to end up too simple and regular. Maybe tools like filleting edges SDF-style is a game changer?

reply
I actually don't really like the OpenSCAD-style interface. For me FreeCAD is the current state-of-the-art in CAD.

But if you are into code-style SDF interfaces, I have some links on https://incoherency.co.uk/notes/sdf.html

reply