Show HN: I turned a sketch into a 3D-print pegboard for my kid with an AI agent
TL;DR Highlight
A real maker's account of pasting a marker sketch drawn with their child into Codex, providing just two dimensions, and getting a 3D-printable pegboard toy file in under a minute. A case study showing a workflow where AI generates 3D models via Python code—no CAD required.
Who Should Read
Maker-minded developers who want to quickly produce physical objects for 3D printing without CAD tools, or developers looking to apply AI Agents to real hardware and manufacturing projects.
Core Mechanics
- A marker sketch drawn with a child was photographed and pasted into Codex. With just two dimensions—40mm hole spacing and 8mm peg width—the first set of 3D models was generated in about one minute. This was work that would have taken one to two hours wrestling with Fusion 360.
- The output is not a hand-edited 3D mesh file but a Python generator script. This made the 'print → test → adjust dimensions → reprint' iteration cycle much faster—changing a single line of code updates all dimensions across the entire model.
- The final output on the 40mm system consists of 7 flat play pieces, 1 tuned peg, 4 gears, and 2 printable board variants. Fit-and-feel iteration was done manually until pegs snapped in precisely and gears turned smoothly.
- An AGENTS.md file was created separately in the repository to document current dimensions, folder structure, and extension rules. Thanks to this file, the AI Agent can handle requests like 'scale up to a 6x6 board,' 'increase peg length,' or 'add a new piece' without needing additional context.
- The core value the author emphasizes is having offloaded tedious CAD work to AI, freeing up time for actual printing, testing, and playing with the child. The significance lies in time reallocation rather than the technology itself.
- Comments noted potential application to laser cutting, and ideas emerged about extending the workflow to generate Lego-style blocks. This suggests the workflow is a pattern applicable to various manufacturing methods beyond just 3D printing.
Evidence
- "A comment that 'the Agent x Parent combination has become my favorite niche in the LLM space' resonated widely. The fact that AI unleashes creativity during the busiest period of life (raising children) led it to be received not as a mere tech demo but as a real-world impact story. The pipeline for turning sketches into physical toys drew reactions calling it 'a dream workflow—skipping tedious CAD modeling to focus on fit-and-feel iteration with the child.' The process itself was praised as ideal, beyond just the quality of the output. A commenter mentioned laser cutting applicability and expressed a desire to build a large children's room pegboard compatible with BRIO assembly sets, showing the project inspires other fabrication methods beyond 3D printing. There was also a suggestion to extend it to Lego block generation—received as a feasible idea given that the Python generator approach allows creating various assembly part families by simply changing parameters. A sub-discussion on 3D printer recommendations emerged, mentioning the Bambu P2S (a sealed printer around 500 euros), with shared experiences using carbon fiber filament. It was noted to be about 6x more expensive than regular filament but with surprisingly better output quality."
How to Apply
- "If you want to design your own 3D-printed toys or props but find CAD tools like Fusion 360 intimidating, draw a rough sketch by hand, note just one or two key dimensions (spacing, thickness, etc.), and feed the photo along with those notes into a coding agent like Codex or Claude. You can generate STL files directly from the resulting Python script. For 3D model projects that require frequent revisions, instead of editing finished mesh files (.stl) directly, build a parameterized Python generator like this project does. Changing one dimension regenerates the entire set, making fit-testing cycles much faster. To help an AI Agent understand your project context and handle modification requests, document current dimensions, folder structure, and extension rules in a separate file like this project's AGENTS.md. This keeps work stable because the agent doesn't need to re-analyze the entire codebase for every request. If you're a maker using a laser cutter or CNC, you can apply the same workflow (sketch → AI code generation → iterative parameter tuning) to produce SVG or DXF output. Using libraries like svgwrite or ezdxf in Python, you can build a similar parameter-based generator."
Code Example
snippet
# Example structure for providing context to an agent in AGENTS.md style
# (Based on the actual AGENTS.md from this project)
## Current System Dimensions
- Peg spacing: 40mm
- Peg width: 8mm
- Peg height: [adjustable]
## Folder Structure
models/pieces/ # Play piece STL files
models/gears/ # Gear STL files
scripts/ # Python generator scripts
## Example Agent Requests
# "Scale up to a 6x6 board"
# "Make the peg 2mm longer"
# "Generate a 0.1mm looser variant for fit testing"
# Basic Python generator pattern (conceptual)
import solid # Using OpenSCAD Python bindings, etc.
PEG_SPACING = 40 # mm
PEG_WIDTH = 8 # mm
def generate_board(cols=4, rows=4):
# Changing parameters regenerates the entire board
holes = []
for r in range(rows):
for c in range(cols):
holes.append((c * PEG_SPACING, r * PEG_SPACING))
return holesTerminology
페그보드(pegboard)A board with regularly spaced holes for inserting pins or hooks to hang items. In this project, it refers to a small assembly board designed as a children's toy.
Python 제너레이터(generator)Here, refers to a Python script that calculates 3D model geometry numerically and outputs it as a file. Instead of drawing directly in a CAD tool, it 'generates' shapes through code.
STLA 3D model file format readable by 3D printers. It represents an object's surface as a collection of triangular faces.
핏앤필(fit-and-feel)An iterative testing process where parts are physically printed and checked by hand to verify how well they fit together (fit) and how they feel in terms of touch and weight (feel).
AGENTS.mdA document created in this project to inform the AI Agent about the project's rules and structure. If README.md is a document for humans, AGENTS.md is a context document for AI.
CodexOpenAI's code generation-specialized AI model. It is the underlying technology for tools like GitHub Copilot and is used to convert natural language descriptions into code.