Live data from Hacker News

Parametric CAD in Rust

campedersen.com

71–80 of 184 posts

Re: Parametric CAD in Rust

#71
I had Google Gemini 3 write me a part using human language about 3 weeks ago for a 3D printing project.

I specifcally had it spit out a FreeCAD macro, which is basically Python that looks like what you've made.

Re: Parametric CAD in Rust

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

I recently stumbled across cuttle.xyz, and it’s a code-based parametric vector editor. I recently did a real world art project in it and LOVED it.

Re: Parametric CAD in Rust

#73
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-tightness/correctness.

Re: Parametric CAD in Rust

#74
post #25

What's nice about this is that it allows for programmatic CAD, enabling things like web applications that can download an .stl file based on user input. I hope I can find a weekend or two to play with it. BTW: I spent a few weekends playing with Microcad ( https://microcad.xyz/ ). It was cool, and had a similar rust feel. I just, for the life of me, couldn't figure out how to do 3d ellipses.

Here's an ellipsoid in build123d using geometric transformation of a sphere:

    from build123d import *
    mat = Matrix([[2,0,0,0],[0,1.5,0,0],[0,0,0.5,0]])
    ellipsoid = Sphere(100).transform_geometry(mat)
Also, FYI build123d now runs in the browser thanks to OCP.wasm. Example playground here https://jojain.github.io/build123d-sandbox/

Re: Parametric CAD in Rust

#76
post #25

What's nice about this is that it allows for programmatic CAD, enabling things like web applications that can download an .stl file based on user input. I hope I can find a weekend or two to play with it. BTW: I spent a few weekends playing with Microcad ( https://microcad.xyz/ ). It was cool, and had a similar rust feel. I just, for the life of me, couldn't figure out how to do 3d ellipses.

Here's an ellipsoid in build123d using geometric transformation of a sphere: from build123d import * mat = Matrix([[2,0,0,0],[0,1.5,0,0],[0,0,0.5,0]]) ellipsoid = Sphere(100).transform_geometry(mat) Also, FYI build123d now runs in the browser thanks to OCP.wasm. Example playground here https://jojain.github.io/build123d-sandbox/

If you are using build123d, probably the easiest way is to sketch an ellipse and revolve it.

Re: Parametric CAD in Rust

#77
post #76

Earlier quoted context omitted.

Here's an ellipsoid in build123d using geometric transformation of a sphere: from build123d import * mat = Matrix([[2,0,0,0],[0,1.5,0,0],[0,0,0.5,0]]) ellipsoid = Sphere(100).transform_geometry(mat) Also, FYI build123d now runs in the browser thanks to OCP.wasm. Example playground here https://jojain.github.io/build123d-sandbox/

If you are using build123d, probably the easiest way is to sketch an ellipse and revolve it.

The definition of an ellipsoid is that it can have three independent radii. A revolved ellipse only has two independent radii. If only two independent radii are needed then yes I agree with you, but I wanted to provide a fully qualified answer.

Re: Parametric CAD in Rust

#78
post #53
post #16

Earlier quoted context omitted.

In my mind, cad that you’re not going to manufacture is “modeling”. Not sure if that’s a common verbal distinction.

An example of common terms that disagrees with that somewhat, is "CAD/CAM" where the design component is clearly distinct from the manufacturing component. I do agree that historically, software aimed at building 3d models for games/animations and other digital use was usually called modeling and not cad. I'm thinking of software like 3D Studio Max back in the 90s here. https://en.wikipedia.org/wiki/CAD/CAM I notice…

my personal distinction I use is about measurements. while you may model to a specific scale for use in 3d gfx (game by engine/animation/vfx) you cross over from "modeling" to "cad" as soon as you are creating geometry with specific real world measurements. (probably for manufacturing or engineering reasons bc thats when it matters most)

like I can model a table that is the right size and looks like it will not tip over for my game, but I am going to cad that table to run a stress sim and make the plans for building it for real.

though id still call the action of doing the building in the cad software "modeling"... so idk.. language is weird.

so software that lets you work accurately with measurements and real units == cad. (fusion360) software that just makes geometry == modeling. (blender)

but if you wanna go get real confused look at "plasticity" an app targeted at "modeling" but uses a cad engine and sells itself as "cad for artists" it has real scale measurements and everything too.

Re: Parametric CAD in Rust

#79

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.

> 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 operations while somewhat handling the topographical naming problem without driving the user insane (which existing kernels are still all shit at).

Re: Parametric CAD in Rust

#80

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…

[dead]
Post reply on HN