[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115628":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":32,"updatedAt":33,"readmeContent":34,"aiSummary":35,"trendingCount":15,"starSnapshotCount":15,"syncStatus":17,"lastSyncTime":36,"discoverSource":37},115628,"smoothstone","baney75\u002Fsmoothstone","baney75","A skill and CLI that lets small local models like LFM3-1.7B make 3D printable parts, from words or a picture, even through context compaction.",null,"Python",82,6,61,14,0,21,2,55.14,"MIT License",false,"main",true,[24,25,26,27,28,29,30,31],"3d-printing","agent-skills","cad","lfm3","llama-cpp","local-llm","openscad","small-language-models","2026-11-23 20:51:18","2026-11-23 16:43:55","# smoothstone\n\n![Twelve parts built by stone from its recipes, rendered in Blender](docs\u002Fgallery.jpg)\n\nI wanted a small model running on my own computer to make 3D printable parts that actually look good, so I tested LFM3-1.7B writing OpenSCAD on its own and it failed every single time. Even with the best skill I could write it made a working fan guard only 2 times out of 5. smoothstone takes the hard part away from the small model, as the model never writes geometry at all. It picks a tested recipe and fills in the sizes from the request or a picture, and the stone tool builds the part, checks that it will print and keeps every step on disk, so the model can lose its whole context and still finish the part.\n\n## Results\n\n![Six parts LFM3-1.7B made with smoothstone on my CPU, rendered in Blender](docs\u002Fmade_by_lfm3.jpg)\n\nLFM3-1.7B made every part above on my own CPU through smoothstone, and each one passed every print check. I did not want to fool myself with requests I had tuned for, so a fresh agent that never saw the code wrote new requests from the parameter list alone and I sealed them before the run. Each request ran five times. On the last blind set the model finished the right part with the right sizes 39 out of 40 times, and 38 out of 40 when I wiped its memory in the middle of the job. Writing the 3D code itself it went 0 out of 15. Every set, every failed run and every fix is in [LOG.md](LOG.md), and the sets are in [evals](evals).\n\n## How it works\n\nEvery stone message ends with one line that says what to run next, and `stone status` prints that line again along with the request, the recipe, the sizes so far and the last build. A model that forgets everything runs `stone status` and keeps going.\n\n```\n$ stone new \"A guard for a 120 mm PC fan, 3 mm thick.\"\nNEXT: stone recipes\n$ stone recipes\nfan_guard  Fan guard  (default size 120 x 120 x 3 mm)\nNEXT: stone show fan_guard\n$ stone show fan_guard\nFrom the request: size=120 thickness=3\nNEXT: stone set fan_guard size=120 thickness=3\n$ stone set fan_guard size=120 thickness=3\nExpected size 120 x 120 x 3 mm.\nNEXT: stone build\n$ stone build\nSize: 120.0 x 120.0 x 3.0 mm\nPASS watertight: closed surface\nPASS slicer: no non-manifold edges or zero-area faces\nPASS bodies: 1 bodies (max 1)\nPASS first_layer: 6344.7 mm2 on the bed (need 200.0 mm2)\nPASS min_wall: thinnest wall 1.98 mm (need 0.8 mm)\nPASS overhang: 0.0% of the surface hangs past 45 deg (max 5%)\nPASS dims: size matches the recipe\nPart ready: stone-job\u002Ffan_guard.stl\nNEXT: none, the part is ready\n```\n\nThat is shortened: each command prints a few more lines, and the build prints every check.\n\nThe build runs OpenSCAD with the Manifold backend and then checks the STL it ships, read the way a slicer reads it: watertight, no non-manifold edges or zero-area faces (the mesh is rebuilt through manifold3d at float32 first), one piece, flat on the bed, a real first layer, walls thick enough to print, no overhang past 45 degrees and the size the recipe promised. When a check fails, stone names the one setting to change and prints the command that changes it.\n\nEvery passing build also writes `build\u002Fviews.png`: the part from eight sides, from straight above and from straight below. Look at every panel, because a phone holder or a bracket that is right from the front and wrong on one side still fails.\n\n## Tiers\n\nThe skill gives each model a card that fits it.\n\n| Tier | Models | What the model does |\n| --- | --- | --- |\n| S | about 3B and under | picks a recipe and sets its numbers, nothing else |\n| M | about 4B to 30B | also picks the look: style, pattern, rounding, text |\n| L | frontier models | writes new recipes in OpenSCAD with BOSL2 and the stone library |\n\nSet it with `STONE_TIER=S` or `tier = \"S\"` in `stone.toml`. `stone status` prints the card's rules every time, so they come back after a compaction too.\n\n## Pictures\n\n```\nstone new \"A keychain of my dog\" --image dog.png\n```\n\nstone traces the outline for keychains, cookie cutters and signs, and makes a height map for lithophanes and reliefs. The model never has to look at the picture to use it.\n\nIf the photo has a ruler, a bank card or a US quarter next to the thing, `stone measure photo.jpg` works out its real size in millimeters and the recipe takes that size, and the traced outline leaves the ruler out.\n\n## Figures\n\n```\nstone new 'A mini figure of Jensen Huang, 90 mm tall, with \"JENSEN\" on the base'\n```\n\nI wanted the small model to make something cooler than a bin, so smoothstone can now make a mini figure of a person, a pet or a thing. When there is no photo, stone build tells the model to run `stone find \"Jensen Huang\"`, which downloads free licensed photos from Wikimedia Commons and writes who took each one and its license to credits.txt. You can give it your own photo with `stone image` instead. Then three small models run one at a time on the Mac: LFM3-VL-2B writes one sentence about how the person looks, FLUX.2 klein 4B turns the photo and that sentence into a clean render of a figure, and Hunyuan3D-2mini lifts the render into a mesh. stone closes the mesh, stands it on a plinth with the name on the front and runs the same print checks as every other part.\n\n| Step | Model | Peak memory | Time on my Mac |\n| --- | --- | --- | --- |\n| drive stone | LFM3-1.7B, 4 bit, on the CPU | 1.2 GB | |\n| describe | LFM3-VL-2B, 4 bit | 3.0 GB | under a minute |\n| style | FLUX.2 klein 4B, 4 bit | 7.8 GB | about 2 minutes |\n| lift | Hunyuan3D-2mini | 9.0 GB | about 4 minutes |\n\nThe sentence from the vision model matters more than I expected, as without it the render got the hair color and the glasses wrong on every try. Run `tools\u002Ffigure\u002Fsetup.sh` once on an Apple silicon Mac with 16 GB of memory. Hunyuan3D-2mini is under the Tencent Hunyuan Community License, which does not cover the EU, the UK or South Korea, so read it before you use the meshes there. Photos keep their own licenses, so credit them from credits.txt when you post a print.\n\n## Colors\n\nA figure printed in one color looks unfinished, so after a passing build of a figure `stone colors` splits it into regions by the colors of its style picture, lists them with a part name each (base, shoes, pants, jacket or top, hands, face, hair, glasses, other, in the words of the request) and draws them numbered in `build\u002Fregions.png`. Then one line gives each part a filament, by name or number (`jacket=black rest=white`), and stone writes a 3MF next to the STL with every triangle painted. Orca, Bambu Studio and Creality Print open it with the paint, and PrusaSlicer reads Bambu paint too. stone cuts each color edge as a smooth curve through the triangles, then reads the file back before it says so: watertight, clean for a slicer, the same volume as the STL. The color_edges check compares each edge's length with the same edge smoothed over 2 mm and fails one that is over 8% longer, because that edge zigzags; then no file is written. A color edge within 3 mm of the hem, the neck or a wrist moves onto that line of the shape, and where the sculpt has a groove there (a collar, a cuff) the edge follows the groove instead of a flat cut, on the side a viewer sees least (measured by ray casting from 48 directions). The ledges check then fails any edge with up-facing faces of the wrong color seen beside it, like a white strip along the top of a collar. Edges in a groove are exempt from the wobble limit, since a sculpted collar is not straight. `build\u002Fboundaries.png` shows every color edge close up from eight sides, and the collar from level and from 30 degrees up. Put your printer's filament slots in `stone.toml` as `[filaments]` with `1 = \"white\"`, `2 = \"black\"` and so on, in the job folder or once in `~\u002F.config\u002Fsmoothstone\u002Fstone.toml`. When a figure's request names colors, the build's NEXT line is `stone colors` and its suggestion follows those colors; any other part prints in one color, and the build names the filament to load.\n\n```\n$ stone colors\nColor regions of figure.stl, largest first:\n1  white   48% of surface  base\n2  skin    17% of surface  face\n3  white   14% of surface  hair\n4  black   13% of surface  jacket\n5  black   5% of surface  pants\n6  black   2% of surface  glasses\n7  skin    1% of surface  hands\n8  skin    1% of surface  hands\nFilaments: 1 red, 2 white, 3 blue, 4 black (stone.toml [filaments])\nGive each part or region a color, by name or filament number (like jacket=black); rest= colors the others.\nNEXT: stone colors jacket=black pants=black glasses=black rest=white\n$ stone colors jacket=black rest=white\nfilament 2 white: 87% of surface; filament 4 black: 13%\nChecked: the 3MF reads back watertight and clean for a slicer, 122138 faces, volume as the STL.\nPASS color_edges: every color boundary is a smooth curve (worst 1.027, max 1.08; wobble 0.01 mm, max 0.15; 3 edges run in a sculpted groove, which the wobble limit does not apply to)\nPASS ledges: no up-facing face of the wrong color is seen next to a part's edge; edges in the groove: neck up, wrist left down, wrist right down\nWarning: the colors alternate on 50 layers: about 52 filament changes and 34 g purge.\n3MF: stone-job\u002Ffigure.3mf (Orca, Bambu Studio, Creality Print and PrusaSlicer open it with the paint)\nViews: stone-job\u002Fbuild\u002Fviews.png (look at every panel before you call it done)\nIn the slicer: filament 2 must be white, filament 4 must be black.\nNEXT: none, the part is ready\n```\n\n## Recipes\n\nfan_guard, panel, cable_comb, vase, planter, gridfinity_bin, phone_stand, hook, spur_gear, box, keychain, cookie_cutter, sign, lithophane, relief and figure. Every recipe prints without supports and every default and example is built and checked in CI.\n\n## Install\n\nYou need uv, OpenSCAD 2026 or newer (a nightly build has the Manifold backend) and potrace for pictures.\n\n```\ngit clone https:\u002F\u002Fgithub.com\u002Fbaney75\u002Fsmoothstone\ncd smoothstone\nuv tool install -e .\nstone status\n```\n\nstone finds OpenSCAD through `STONE_OPENSCAD`, then `openscad` on your PATH, then `vendor\u002Fopenscad\u002FAppRun`.\n\n## Use it with your agent\n\nThe skill is the `skill` folder. Link it where your agent looks for skills:\n\n```\nln -s \"$PWD\u002Fskill\" ~\u002F.claude\u002Fskills\u002Fsmoothstone      # Claude Code\nln -s \"$PWD\u002Fskill\" ~\u002F.codex\u002Fskills\u002Fsmoothstone       # Codex\nln -s \"$PWD\u002Fskill\" ~\u002F.pi\u002Fagent\u002Fskills\u002Fsmoothstone    # pi\n```\n\nFor a local model on llama.cpp, give it one tool named `stone` that runs a stone command line, and put `skill\u002Ftiers\u002FS.md` in the system prompt. `evals\u002Frun.py` does exactly this against `llama-server` and is the harness behind the numbers above.\n\n## Make a new recipe\n\nA recipe is a folder in `recipes` with `recipe.scad` and `recipe.json`. The json lists every setting with its range and unit, the size the part should come out at and examples. `uv run python tools\u002Fsheet.py \u003Cname>` builds the defaults and every example through stone and shows the previews. The L card has the full format.\n\n## License\n\nMIT. BOSL2 in `vendor\u002FBOSL2` is BSD 2-Clause. The cat, rabbit and tree pictures in `examples\u002Fimages` are Material Design Icons under Apache 2.0.\n","smoothstone 是一个面向本地小型语言模型（如 LFM3-1.7B）的 CLI 工具与技能框架，用于生成可直接 3D 打印的 CAD 零件。其核心机制是将几何建模任务解耦：模型不直接编写 OpenSCAD 代码，而是从预验证的参数化模板（recipes）中选择适配项，并仅填充尺寸等参数；后续由工具链自动调用 OpenSCAD（Manifold 后端）生成 STL，并执行全套可打印性检查（水密性、流形性、壁厚、悬垂角、底面接触等）。适用于资源受限的本地部署场景，尤其适合在 CPU 上运行小模型完成可靠、可复现的定制化零件生成任务。","2026-11-24 04:51:35","CREATED_QUERY"]