Hacker News new | ask | show | jobs
by throw46365 744 days ago
> and I think it really does need the ability to explore the space via GUI and be able to snap to points/planes and have selection filters, etc.

I don't think the kernel OpenSCAD uses is capable of this; it's triangle mesh CSG so there's no representation of an edge or a face at all.

More to the point, it's all one way -- declaration to object -- and there is no reflection of the object back into the code.

CadQuery/Build123D can do this (Python), and I think the browser-based RepliCAD exposes faces and edges in its JS API. All of these use OpenCascade, one way or another, which is a proper (if flawed) bRep kernel.

Re: storing your design history as code -- it seems like FreeCAD could be moving back this way, in some small ways.

In 0.22-dev, if you copy a Sketcher sketch to the clipboard, what gets copied actually is the Python code to produce that sketch.

If you watch the Python console while you work in FreeCAD you will see it show you all the commands necessary to repeat what it is doing. Now, granted it's code more like a macro recorder would produce, but it's all you need. Even to the point of controlling the GUI (the commands for which get added to the console, commented out). In this aspect it's always been that way, which is its weirdo superpower.

1 comments

Yeah, I was gonna add that FreeCAD probably has the best chance of becoming that sort of programming environment, and they've actually added a lot of great new features in the last year or so, including a reasonable solution to the topological naming problem [1]. Still a little clunky and has quite a few UI oddities, but overall it is taking shape a lot better than I ever expected. Really looking forward to their 1.0 release this year.

[1] https://wiki.freecad.org/Topological_naming_problem

Yes -- the weekly releases have been really promising. The TNP mitigation is not yet bug-free but I think next week's weekly will have fixes for a few bits.

The most striking thing is that there's experimental support for multiple separate solids in Part Design. RealThunder's experimental version has had this for a good while but I wasn't expecting it to be user-facing in 1.0, because so much of his work has needed refactoring to fit.