Designing a 3D-printed part in OpenSCAD with ChatGPT and Claude Code
I recently learned that fixing a Dallas sidewalk takes a right-of-way permit, a wait of several weeks, and an inspection of the finished repair. I think crews laying fiber-optic cable left a hole in a sidewalk near me, and they didn’t seem burdened by any of that. It’s 6 in (150 mm) across, wide enough for a foot, and several feet deep, on a stretch where people walk their dogs, and it had probably been there for at least a year. I didn’t have much hope of the city fixing it quickly, so I printed a temporary plug for it (GitHub). I designed the first version with ChatGPT and the second with Claude Code, and having an LLM write OpenSCAD worked better than I expected.

OpenSCAD models are code, so a language model can write one like any other program. This is the cap from the current plug’s model, which Claude Code wrote (a hollow stem under it sits in the hole), a 2D profile spun around the vertical axis with rotate_extrude. Paste it into OpenSCAD and press F5 to see it:
flange_r = 95; // rests on the concrete, held down with double-sided tape
plastic_h = 5.2; // cap thickness, sitting on 1 mm of tape
plastic_rim_h = 1.9; // short vertical edge
top_land = 0.8; // printed cap-face down, this keeps the chamfer off the bed
bevel_run = 1.5; // 1.5 mm in over 2.5 mm up, a 60 degree chamfer
rotate_extrude($fa = 2) // $fa: facet angle in degrees, for a smooth circle
polygon([
[0, 0],
[flange_r, 0],
[flange_r, plastic_rim_h],
[flange_r - bevel_run, plastic_h - top_land],
[flange_r - bevel_run, plastic_h],
[0, plastic_h],
]);
ChatGPT in 2024
My first message to ChatGPT (GPT-4o) was “can you help me make a openscad model for a hole plug with beveled edges?” It got close to the shape I wanted in a few replies, but it couldn’t see what it had made, so I was the renderer. I pasted each version into OpenSCAD, looked at it, and described what was wrong. It turned the taper upside down four times and kept closing the bottom of the stem I’d asked to leave open. It took about 60 messages, including a detour into adding text on top that I dropped, to get a prototype I could print.
That plug was a hollow stem under a solid cone that stood 15 mm above the sidewalk, printed in white PLA, the most common printer filament. I didn’t expect it to last long, since PLA has a reputation for not holding up outdoors, but it fit, and it and its spare each lasted about a year. The cone’s thin edge eventually broke when someone stepped on it, dropping the plug into the hole.

Claude Code in 2026
For the second version Claude Code ran the tools instead of me. It rendered the model with OpenSCAD, sliced it in PrusaSlicer (which turns a model into printer instructions) to get print times, and ran a stress simulation in CalculiX to decide how to support the cap. The result is a flat mushroom with a solid cap over radial ribs, printed in PCTG instead of PLA, that stands about 6 mm above the sidewalk. That keeps it under the 1/4 in vertical edge the ADA allows.
Looking back, this is probably a good example of how much tools like Claude Code, which let the model run commands and read their output, changed things over the last year. The model checked its own work instead of waiting for me to describe each render, which is the same idea as giving a coding agent a check to run, applied to a physical part. Whenever the design changed, it re-ran the simulation, which ruled out some of the ideas for making the plug stronger.
The plug went in at the start of November and is holding up so far. The OpenSCAD model, the simulation and the print settings are in pawl/sidewalk-hole-plug.