Live data from Hacker News

Parametric CAD in Rust

campedersen.com

81–90 of 184 posts

Re: Parametric CAD in Rust

#81
post #7

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

Breps. Nearly all commercial cad packages operate on boundary representations of objects.

Mesh is also a boundary representation. I think you meam NURBS.

Re: Parametric CAD in Rust

#82
> Types prevent you from passing a radius where a diameter was expected. CAD files should be code. Code has tests, reviews, diffs, and CI. An STL file has... bytes.

Fucking A Right!

Re: Parametric CAD in Rust

#83

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…

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

Re: Parametric CAD in Rust

#84
post #8

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

OpenCASCADE? https://dev.opencascade.org/

pythonocc is a joy

https://github.com/tpaviot/pythonocc-core

Re: Parametric CAD in Rust

#85

Earlier quoted context omitted.

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

> but without realizing that CAD is about constraints, parametrizing, and far more Constraints and parametrizing are the trivial parts of CAD, something you can now implement in a weekend with Claude Code, the MINPACK/SolveSpace test suite, and OpenCascade as an oracle. The hard part is a geometric kernel that can express boundary representations for complex shapes (sketches, chamfers, fillets, etc) and boolean opera…

> Constraints and parametrizing are the trivial parts of CAD, something you can now implement in a weekend with Claude Code

You go ahead and try that.

Re: Parametric CAD in Rust

#86

Earlier quoted context omitted.

> but without realizing that CAD is about constraints, parametrizing, and far more Constraints and parametrizing are the trivial parts of CAD, something you can now implement in a weekend with Claude Code, the MINPACK/SolveSpace test suite, and OpenCascade as an oracle. The hard part is a geometric kernel that can express boundary representations for complex shapes (sketches, chamfers, fillets, etc) and boolean opera…

> Constraints and parametrizing are the trivial parts of CAD, something you can now implement in a weekend with Claude Code You go ahead and try that.

;)

Keywords: Jacobian, Newton-Raphson, Levenberg-Marquardt, Powell dog leg, Schur complements, sparse QR/Cholesky, and so on. The LLM can figure the rest out. Try it yourself!

I recommend Rust because the methods are old and most of the algorithms are already implemented by crates, you just have to wire them together. Like I said the hard part is the b-rep: you’re not going to find anything equivalent to Parasolid or ACIS in the literature or open source.

Re: Parametric CAD in Rust

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

[deleted]

Re: Parametric CAD in Rust

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

> "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 with this for most stuff. Also, this stuff is easily solved by things like the component library and configurations.

Re: Parametric CAD in Rust

#89

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…

> "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?

Re: Parametric CAD in Rust

#90

If anyone is interested, you can try EngineeringSketchPad ( https://acdl.mit.edu/ESP/ ) which is very similar but much more mature. It also supports simple geometric primitives and boolean operations via a scripting language, but also more general rational curves and surfaces (i.e. BREPs). It has other nice features like differentiation, application-specific views (think structural vs CFD), and an attention to water-…

The certificate just expired, so mobile Safari is not willing to let me see it. :(
Post reply on HN