Live data from Hacker News

Parametric CAD in Rust

campedersen.com

121–130 of 184 posts

Re: Parametric CAD in Rust

#121
post #106
post #64

Earlier quoted context omitted.

> Like editing an SVG in notepad instead of Inkscape. Speaking of which, I would love to have parametric capabilities in Inkscape.

FWIW, the FLOSS CAD program SolveSpace can generate parametric sketches and export them as SVG files (file > export 2d view)

Is there a facility when doing this for controlling colour/fill?

Re: Parametric CAD in Rust

#122
post #110

Earlier quoted context omitted.

My whole CAD experience is with OpenSCAD, which apparently uses the same kernel; Honest question -- what is the alternative? I would assume the vast majority of 3D model processing relies on triangle meshes...

SolveSpace is available in library form. It uses NURBS to represent surfaces, with triangles as a fallback. https://solvespace.com/library.pl

Notably the library was used (at least for a while) in the development of Dune 3D:

https://dune3d.org/

but then the author used the source directly as noted in the Github footnote:

>I ended up directly using solvespace's solver instead of the suggested wrapper code since it didn't expose all of the features I needed. I also had to patch the solver to make it sufficiently fast for the kinds of equations I was generating by symbolically solving equations where applicable.

Re: Parametric CAD in Rust

#123
post #111
post #6

Interesting, because I am trying to learn OpenSCAD for some simple modeling.

for simple learning, I invite you to consider SolveSpace

Has there been any work on it to make it usable w/ touch or a stylus or a trackpad?

I'm on the verge of breaking down and buying a license for Moment of Inspiration 3D since it was designed for use on tablet computers (which is my preferred sort of hardware).

Re: Parametric CAD in Rust

#124
post #19

I am constantly designing parts myself. I just wish that instead of having many unfinished, unpolished products we had something with the level of Solidworks / Onshape / whatever. FreeCad is getting somewhere but it is still way behind. The last thing I care about is what language was it implemented with.

OpenSCAD is quite polished (for a programmatic mesh modeler).

There is a soft-fork which adds Python:

https://pythonscad.org/

which I've found quite useful: https://github.com/WillAdams/gcodepreview in particular, working up a facility to write out DXFs w/ arcs

Re: Parametric CAD in Rust

#125
post #6

Interesting, because I am trying to learn OpenSCAD for some simple modeling.

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

Or Blender, pen and paper, bag of LEGO, etc. Text in context of geometric object is more or less an abstract classification tool, barely a descriptive one.

Everyone knows what a `dice` is. But that's a taxonomical label, not a definition of one. Anyone reading this can probably draw a representative `dice` using only standard stationery supplies in under a minute. Now describe one in English with such rigor and precision that it readily translates to a .gcode file to be printed. That requires a good amount of useful neurodivergence to pull off at all.

Re: Parametric CAD in Rust

#126

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…

You can do parametric for games too. Building an entire scene using code/data can be very productive when you are trying to tune complex concerns like travel time between arbitrary points on the map (balance). Parametric also makes things like [LLM] automation way more feasible because it's using editor APIs rather than exercising piecemeal scene tools. 1000 lines of c# can do a hell of a lot more damage than a bucket of calls like GetObject, SetComponentProperty, etc. This also allows for much deeper integration and iteration over non-geometric concerns like lighting systems, materials and physics.

Re: Parametric CAD in Rust

#128

Earlier quoted context omitted.

This is actually what onshape is, under the covers. The GUI is really just using their scripting primitives, etc. You can access it the same as they can, actually.

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

And both of them were written by Ian Braid, Alan Grayer, and Charles Lang (and others) in Cambridge.

Parasolid was v1 and old school C, then they got the C++ bug like many of us at the time and did ACIS as v2.

Re: Parametric CAD in Rust

#129

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 tools. When creating a simple fillet or a chamfer is an annoying exercise in constructive geometry rather than five mouse clicks, there'll be fewer fillets, chamfers, and flowing surfaces, even when they make mechanical or manufacturing sense; but then that becomes "the look", and people don't even think about fillets.

Re: Parametric CAD in Rust

#130

Earlier quoted context omitted.

This is actually what onshape is, under the covers. The GUI is really just using their scripting primitives, etc. You can access it the same as they can, actually.

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 going for here. The fact that they are all the same kernels under the cover is sort of irrelevant. It's not that thin a layer and the layer matters a lot since it is what you get to use. It's like saying all of userspace is just syscalls. That's not what users see or interact with, the layer they interact with matters a lot to them.

Post reply on HN