Live data from Hacker News

Parametric CAD in Rust

campedersen.com

101–110 of 184 posts

Re: Parametric CAD in Rust

#101

Earlier quoted context omitted.

> "highly paramteric like fastners, gears, 3D printed boxes" 1. These parts should probably be on McMaster. If you are not using them straight from there, you better have a _great_ reason as to why not when it comes up in the design review. 2. Solidworks has Smart Fasteners, Inventor has Spur Gear Component Generator, Sketch->Extrude->Shell takes 30 seconds, so not sure why 3D printed boxes would be faster or better…

> you better have a _great_ reason as to why not Because I don't live in America?

I download and use parts dimensioned in metric to ISO standards all the time...

Re: Parametric CAD in Rust

#102
post #59

Why not use OpenSCAD?

Because it is not written in Rust, I suppose. Anyway, I think using only code for designing 3D objects is a poor design choice. You really need something that is between pure code and pure GUI.

That is actually not so bad a reason. I use build123d, but want it in haskell, enough to look at how hard it would be to create something similar.

(I also totally agree about the gui being worth having sometimes, and would have loved the ability to fully mix. Code as the main driver, but gui to help choose it. For example to figure out faces and other attachment stuff)

Re: Parametric CAD in Rust

#103

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…

I'm with you. What I've learned from all those "programmatic CAD" threads is that some people just really prefer code over anything else. They also build only simple parts, so it's not an issue for them.

As the author says:

"I wanted to write my parts the way I write firmware. In Rust. With types. With version control."

Re: Parametric CAD in Rust

#104
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…

Ha! Since you mention SVG, there is a trick!

Draw your free-hand shape in Inkscape, export to SVG, import it in FreeCAD and go from there.

I used that trick to trace a part from an image and it worked surprisingly well. Not very efficient compared to commercial tooling, but despite the clumsiness its fairly intuitive and free.

Re: Parametric CAD in Rust

#105
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 ...

> chamfer all outside edges

FreeCAD can do this. So can all of the proprietary parametric CAD programs I've ever used, some of which (PTC OnShape, Siemens Solid Edge, Autodesk Fusion) have usable free tiers available.

Re: Parametric CAD in Rust

#106
post #64

Earlier quoted context omitted.

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…

> 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)

Re: Parametric CAD in Rust

#107
post #64

Earlier quoted context omitted.

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…

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

https://graphite.art/

https://paragraphic.design/

Re: Parametric CAD in Rust

#108
post #26

SketchUp was my go to for a while but I'm done with parametric personally, trying to fix meshes for 3D printing... time I grow up and use something like Fusion360 seems like or onshape. Still it was good/simple enough for non-round shapes in SketchUp except they have some kind of memory leak/bug at least for the 2017 version. But I guess quit being cheap and buy a modern copy on my part. Edit: oh I guess sketchup is…

Just because you type dimensions in doesn't mean it's parametric. If you're manually patching meshes, you're almost certainly not doing parametric CAD! (This does match with my memories of SketchUp, beck when it was owned by Google. I had to fix holes and overlapping geometry by editing the .STL files in Blender before any of the primitive slicer programs could process them.)

OnShape and Fusion360 are fully parametric CAD programs. Another free-tier closed-source one is Siemens Solid Edge (the "Hobbyist" edition). FLOSS parametric CAD programs that are reasonably usable are FreeCAD (complicated but powerful) and SolveSpace (an 80/20 sort of tool -- nowhere near as powerful, but vastly easier to use).

Re: Parametric CAD in Rust

#109

The opening paragraph is very telling; the author doesn't seem to understand typical pro-level parametric CAD programs available on the market: > I keep designing physical parts for our robots. Motor mounts, sensor brackets, wheel hubs. Every time, the workflow is the same: open a GUI CAD program, click around for an hour, export an STL, realize the bolt pattern is 2mm off, repeat. This doesn't make sense. When you r…

> That's the beauty of constraint-based parametric modeling as opposed to, say, modeling in Blender. I was thinking the same thing. This looks more like an API that makes 3d modeling look closer to CAD, but without realizing that CAD is about constraints, parametrizing, and far more.

This is something I don't get about the code-based CAD tools. They don't let you specify declarative geometric constraints.

Constraints are useful beyond just designing parts. If you have a parallel mechanism there are only two ways to solve the kinematics/dynamics for it: Constraint solving for rigid contacts or iterative solving by approximating the model with non-rigid contacts via internal springs.

Re: Parametric CAD in Rust

#110
post #2

Unfortunately, using a geometry kernel [1] that operates on triangle meshes means this is a no-go for serious CAD usage. [1]: https://github.com/elalish/manifold

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

Post reply on HN