Hacker News

Favorites Setup
Comment by robbles | original | OpenSCAD the Programmers Solid 3D CAD Modeller
[−]robbles · 2026-10-10 Sat 21:12 UTC · link
> things like variables and such do not quite work in the way you would expect from a programmers point of view.

I'm a novice at OpenSCAD still despite doing a bunch of small projects with it recently. Can you give an example of this happening? Most of the confusing stuff so far has been geometry breaking my brain and not some kind of scope issue.

[−]jacquesm · 2026-10-10 Sat 21:42 UTC · link
Well, you could be forgiven to think that if you wrote i=5; some code and then i=12; that 'some code' is executing with i set to 5. Instead all code is run with i=12 because there is only one value for a variable per scope.

This can lead to extremely annoying bugs because your brain is wired to read and understand this stuff sequentially rather than all at once. I've stared at some page of OpenSCAD code for a long time before realizing that it was yet another one of those footguns.

[−]CamperBob2 · 2026-10-10 Sat 22:29 UTC · link
So it's not the C of CAD, it's the Verilog of CAD. Got it.
[−]jacquesm · 2026-10-11 Sun 00:53 UTC · link
That's a good analogy. The annoying part is that it looks like C, but it really isn't.