News for hackers. Stuff that matters.
Re:3D-Printed Mathematical Lampshades by mlmonkey on Wednesday January 28, 2026 @01:55PM (#46799933)
In theory, one should be able to use OpenSCAD to come up with fancy surfaces to 3-D print, right?

I'm just dipping my toes in 3D printing, with a recent acquisition of a Bambu P2S

Re:3D-Printed Mathematical Lampshades by givc on Wednesday January 28, 2026 @04:12PM (#46801586)
I used OpenSCAD to create a map of Manhattan. It shows the live location of subway trains. It was surprisingly easy, I struggled a lot with OnShape and Fusion360 trying to do this because there were too many polygons.

I found that starting with an SVG and extruding from there is perfect in OpenSCAD, but I’m sure I’m underutilizing it a lot.

I wrote a bit about it here if you’re curious https://hackaday.io/project/202488-manhattan-subway-map/deta...

Re:3D-Printed Mathematical Lampshades by dekhn on Wednesday January 28, 2026 @09:12PM (#46804861)
Cool project, but just how many polygons are you talking about? Also, my guess is you did meshes, instead of breps- they are far more efficient in my experience.

The largest mesh I worked with in Fusion 360 is a digital elevation map of California, it has 2.8M vertices and 5.6M faces and it's still possible to get things done (like making a CAM to carve a 2 foot x 2 foot map with reasonable details).

Re:3D-Printed Mathematical Lampshades by aforwardslash on Wednesday January 28, 2026 @03:51PM (#46801313)
> In theory, one should be able to use OpenSCAD to come up with fancy surfaces to 3-D print, right?

Yes, but it is painfully slow. Even perforated patterns are quite slow to generate.

Re:3D-Printed Mathematical Lampshades by MengerSponge on Wednesday January 28, 2026 @04:07PM (#46801525)
Aside from Fusion360, is there a Free (or FOSS) cad package that uses breps and is scriptable?

Fusion360 is just stupid fast at perforations and sophisticated modeling constructions via its python API. I use it because it works well, but I'd be happier if I didn't have to maintain that Autodesk dependency...

Re:3D-Printed Mathematical Lampshades by dekhn on Wednesday January 28, 2026 @05:26PM (#46802496)
freeCAD is brep based and scriptable.
Re:3D-Printed Mathematical Lampshades by embedding-shape on Wednesday January 28, 2026 @07:53PM (#46804171)
FreeCAD via AstoCAD (https://www.astocad.com/ - 4€/month) is quite more user friendly too, compared to the vanilla experience, for those who want to do CAD sometimes and forget things between uses. It's made by FreeCAD contributors who push things upstream too.
Re:3D-Printed Mathematical Lampshades by nickserv on Thursday January 29, 2026 @05:26PM (#46817680)
Eh. Since the 1.0 release of freeCAD, the UI has been greatly improved. Also subscription services are inherently a turn off.
Re:3D-Printed Mathematical Lampshades by embedding-shape on Thursday January 29, 2026 @05:33PM (#46817749)
I see it as a donation to developer who work on FreeCAD, not a "subscription service", just a different way of funding FOSS.

I'd agree that FreeCAD's UI isn't horrible, but it is a lot to take in at a first glance, and for people who don't use it frequently. If I was using it daily, I'd probably prefer FreeCAD as-is too, better feature density and everything at a glance.

Re:3D-Printed Mathematical Lampshades by dheera on Wednesday January 28, 2026 @06:27PM (#46803262)
OpenSCAD nightly using the Manifold engine is a lot faster than the CGAL crap the stable version ships with
Re:3D-Printed Mathematical Lampshades by nszceta on Wednesday January 28, 2026 @08:29PM (#46804499)
I am learning build123 and skipping OpenSCAD altogether
Re:3D-Printed Mathematical Lampshades by aforwardslash on Saturday January 31, 2026 @12:14PM (#46838522)
just build it from source, its like night and day! thanks for the tip
Re:3D-Printed Mathematical Lampshades by Zarathruster on Wednesday January 28, 2026 @02:48PM (#46800618)
I was in your shoes about a year ago with an A1 mini, getting into OpenSCAD to make my own keycaps.

If you're getting into OpenSCAD I'd highly recommend getting Belfry ASAP.

https://github.com/BelfrySCAD/BOSL2/wiki

I wouldn't really consider using OpenSCAD without it

Re:3D-Printed Mathematical Lampshades by hessammehr on Wednesday January 28, 2026 @02:10PM (#46800125)
I haven't used OpenSCAD much beyond combining primitives. Truthfully these organic shapes are more of a use-case for 3D modelling software like Blender rather than CAD, but I'd be keen to hear if you end up giving OpenSCAD a go.

My Bambu A1 mini has been reliable despite the challenging geometry; pretty sure your P2S will work just as well if not better. Good luck!

Re:3D-Printed Mathematical Lampshades by dole on Wednesday January 28, 2026 @04:21PM (#46801704)
I was able to take the image of the star-shaped graph from OP, fed it to claude and used this for the prompt: "figure out a good formula or equation for this graph and use it to create the lampshade in openscad. use the graph as the bottom for a lampshade, and taper it all up to center point. leave a hole at the top big enough for a lightbulb fixture to pass through." It did a surprisingly good job of generating the OpenSCAD, STL, and preview renders in-browsers.
Re:3D-Printed Mathematical Lampshades by nomel on Wednesday January 28, 2026 @05:29PM (#46802536)
For this case, I'm not exaggerating when I say you would probably have an easier time generating the meshes yourself in python and something like the trimesh library to load the vertices into.
Re:3D-Printed Mathematical Lampshades by horacemorace on Wednesday January 28, 2026 @05:39PM (#46802671)
Yes. Claude is surprisingly capable in this area, maybe because the shapes are so simple. Using a slicer in vase mode should make it print quickly too.
Re:3D-Printed Mathematical Lampshades by dheera on Wednesday January 28, 2026 @06:26PM (#46803245)
Yeah OpenSCAD would have made this a lot easier than the exported-SVG-DXF pipeline
Re:3D-Printed Mathematical Lampshades by hessammehr on Wednesday January 28, 2026 @02:04PM (#46800063)
Just noticed that this has made it to the front page, so just had a quick look through to see if there are any broken links, etc. (as I have a habit of forgetting them) and added the missing OnShape link to the LED strip diffuser.

Also recommend checking out the live Marimo notebook linked down at the bottom. Incredible what you can do with Pyodide + Marimo these days. I only wish there was a webassembly version of jax to make it easier to share random numpyro experiments.

Re:3D-Printed Mathematical Lampshades by Aurornis on Wednesday January 28, 2026 @02:23PM (#46800283)
Cool project. The author used PLA, but for anything near a heat source PETG or ASA would be a better choice. PLA will soften and deform at only mildly elevated temperatures. An LED light strip will generate enough heat to cause normal PLA to warp and droop over time.
Re:3D-Printed Mathematical Lampshades by hessammehr on Wednesday January 28, 2026 @03:28PM (#46801060)
Good to know about the risk of deformation due to heat from the LED strip. Ours hasn’t visibly warped over the past few months of use, fingers crossed it will last a little while
Re:3D-Printed Mathematical Lampshades by JKCalhoun on Wednesday January 28, 2026 @03:05PM (#46800825)
Was going to comment similar. Definitely don't want to use these lamp shades with incandescent bulbs (too hot).

As per drooping over time, perhaps for some of these models the "Persistence of Memory" might apply a nice transform to the shapes.

Re:3D-Printed Mathematical Lampshades by givc on Wednesday January 28, 2026 @02:57PM (#46800717)
This is awesome. I’ve also been playing with OnShape to make lamps and it’s been quite challenging. I also tried Blender but the learning curve is just too steep for me. I like this idea of using Python. I might try OpenSCAD too like someone else suggested.

Here’s my lamp if you’re curious, printed with a .8 mm nozzle, otherwise it would fail https://imgur.com/a/mRqw1pI

Re:3D-Printed Mathematical Lampshades by alhirzel on Wednesday January 28, 2026 @03:50PM (#46801297)
Re:3D-Printed Mathematical Lampshades by geokon on Wednesday January 28, 2026 @04:38PM (#46801930)
heres an example of OpenSCAD in Clojure

https://www.juxt.pro/blog/designing-3d-printable-objects-wit...

Looks quite fun

Re:3D-Printed Mathematical Lampshades by godelski on Wednesday January 28, 2026 @11:59PM (#46805980)
FYI FreeCAD also has Python support

And you're saying it would fail with a nozzle smaller than 0.8mm?!

Re:3D-Printed Mathematical Lampshades by lambdaone on Wednesday January 28, 2026 @06:30PM (#46803298)
Great, but PLA is somewhat flammable.
Re:3D-Printed Mathematical Lampshades by nszceta on Wednesday January 28, 2026 @08:19PM (#46804412)
Author should consider going straight to G-CODE (skip the STL)
Re:3D-Printed Mathematical Lampshades by bschwindHN on Wednesday January 28, 2026 @11:55PM (#46805952)
I came here to comment this too - if your surface is entirely mathematically defined, converting that to what your 3D printer speaks is probably easier and gives better results than approximating it with triangles and then converting those triangles to G-code.
Re:3D-Printed Mathematical Lampshades by endymion-light on Thursday January 29, 2026 @09:21AM (#46810554)
Very cool - what would you recomend in terms of just getting started learning parametric design? It feels like one of my complete blank spots
Re:3D-Printed Mathematical Lampshades by hessammehr on Thursday January 29, 2026 @06:00PM (#46818087)
I would recommend Onshape to start. The user interface and documentation are stellar and you don't need to install anything to get started.