Live data from Hacker News

Parametric CAD in Rust

campedersen.com

161–170 of 184 posts

Re: Parametric CAD in Rust

#161

With the ability to change one number and regenerate everything That's exactly how I use Solidworks (and similar parametric CAD software) all the time. It takes some discipline, but the key is for all your geometry and relations to be driven from sketches and equations. Then you just change a value (sketch dimension or global constant), hit rebuild, and everything regenerates fairly reliably. Don't get me wrong, this…

Well yeah, that’s the whole point of parametric CAD. I use Fusion360 but everything is a user parameter, use constraints for placements, dimensions are relative fractions of base dimensions, extrudes as distance to a face etc.

Re: Parametric CAD in Rust

#162
post #92

I'm about as into formal methods as you can get, with a deep background in Haskell and such. Rust is wonderful and all that, but sometimes I think the optimism is misplaced and doesn't come from a place of full knowledge. Statements like this make me scared: > The geometry engine is manifold, which guarantees watertight meshes from boolean operations. The Rust bindings give us zero-cost abstractions over the C++ core…

Yeah, I'd like to see a CAD program which uses integer math at its core for repeatability and to avoid errors such as 10.000 being displayed as 9.999 after multiple scaling operations.

Re: Parametric CAD in Rust

#163
post #34

Earlier quoted context omitted.

Note: This is probably a dead-end; it is not on the same level as SolidWorks, Fusion etc.

You're probably right, OpenSCAD seems to be limited both in speed and in exactness of the surfaces. However purely programmatic interface allows doing surprising things which might be hard to achieve with a mouse.

If you're using one of the old stable builds, then the newer nightly builds are markedly faster --- hopefully there will be a new stable release presently.

Re: Parametric CAD in Rust

#164
post #94

I really like the idea of openscad, or this, or the many alternatives. But when I say a shape with these and these dimensions, the next shape should attach to it somewhere. And then I want to say: chamfer all outside edges. But in all these programs, it's me redoing the math in my code, computing where the shape goes. As for chamfers, I just give up ...

BOSL2 is a great library to use with Openscad. It provides a bunch of primitives shapes functions with chamfer/rounding parameters. Math doesn't go away tho

Yup, the attachments with BOSL2 are really great. You can do a ton without much math at all, TBH.

https://github.com/BelfrySCAD/BOSL2/wiki/attachments.scad#se...

Re: Parametric CAD in Rust

#165

Earlier quoted context omitted.

Onshape is just a GUI over the Parasolid geometric modeling kernel, the same kernel used by Solidworks [1]. Whatever their scripting primitives are, they're at best a thin wrapper over Parasolid (which is true for the entire industry - it's all Siemens Parasolid and Dassault ACIS). [1] https://en.wikipedia.org/wiki/Parasolid#Applications

Yes, this is all true, but the comment I responded to wanted to be able to basically code rather than GUI sometimes , but still have the GUI up to date. Because of how onshape was built it makes this very very easy. Solidworks very much does not. Fusion360 also has good enough python bindings but it's still nowhere near as easy or integrated to do this (or debug it) as onshape. So I'm kinda not sure what you are goin…

Ah sorry, I misunderstood.

Re: Parametric CAD in Rust

#166
post #42

Is anyone else put off by the AI-sounding text? Two things that give it away for me are the excessive use of punctuation-emphasized sentence fragments ex: > No clicking. No undo. Just recompile. > That's our mascot. Entirely CSG. > No garbage collection pauses. No floating point surprises from a scripting layer. And worst of all, the dreaded "and/but honestly": > But honestly, the main reason is the toolchain. Am I m…

CLAUDE.md in the repo and "Co-Authored by Claude" on all the commits too.

Hard pass.

Re: Parametric CAD in Rust

#167
post #28

Earlier quoted context omitted.

You're correct, I'm completely uneducated! Pull requests welcome :)

The pull request is to delete the project and open SOLIDWORKS or FreeCAD. But don't actually delete it. It looks like a nice alternative to OpenSCAD. But like OpenSCAD it's really a niche thing for designs that are highly parametric like fasteners, gears, 3D printed boxes, etc. Like OpenSCAD using it for normal "irregular" CAD is going to be extremely frustrating. Like editing an SVG in notepad instead of Inkscape. I…

> The pull request is to delete the project

Ouch. Please don't attack someone's work this way. It's too aggressive and against the site guidelines: https://news.ycombinator.com/newsguidelines.html.

I'm sure you didn't intend it as an attack, but it's easy to cross into poisoning the community without meaning to. Many people have been hounded into abandoning HN because of this type of swipe, or at least into never sharing their work here. We all lose when that happens.

It's a pity, because what you wrote was otherwise a fine contribution. if you had begun your comment at the good part ("It looks like a nice alternative [etc.]") it would have been great.

Re: Parametric CAD in Rust

#168

With the ability to change one number and regenerate everything That's exactly how I use Solidworks (and similar parametric CAD software) all the time. It takes some discipline, but the key is for all your geometry and relations to be driven from sketches and equations. Then you just change a value (sketch dimension or global constant), hit rebuild, and everything regenerates fairly reliably. Don't get me wrong, this…

To add to this, constructive solid geometry systems like OpenSCAD seem to be practically incapable of doing anything related to surfacing, even if it's just G2 fillets or G2 continuity (much less more advanced work with splines and patches). I think it's partially a positive feedback loop: the "hacker" tools (OpenSCAD) influence the aesthetic (blocky/square brackets, like in the post), which in turn influences the to…

The thing is, fillets are often recommended as a way to prevent a potential stress-point in a part:

https://wefab.ai/blog/chamfer-vs-fillet-in-3d-printing-a-des...

Re: Parametric CAD in Rust

#169
post #98

Earlier quoted context omitted.

Breaks down for complex parts with lots of repeated operations, suffers from floating point rounding errors. No constraint solver.

Usually when one needs constraints one can code it up as a recursive function.

That’s certainly not the case for most situations where a constraint solver is useful

Re: Parametric CAD in Rust

#170
post #9

I've been doing a similar thing using GhostSCAD[1], which is a relatively thin wrapper around OpenSCAD in Go. Not as typesafe, but my language of choice. [1]: https://github.com/ljanyst/ghostscad

Note that a while back Python support was added to a soft-fork of OpenSCAD:

https://pythonscad.org/

Post reply on HN