尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Turn a photo of a cookie cutter or a drawn outline into 3D-printable STL files for a royal icing practice blank and a matching cookie cutter. Runs entirely in the browser, no files leave your computer..
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Turns a photo of a cookie cutter (or a drawn outline) into 3D-printable STLs, entirely in the browser (nothing is uploaded):
index.html: a royal-icing practice blankcutter.html: a matching cookie cutter, whose blade's inside edge is exactly the
blank's outlineBoth pages share the photo pipeline and settings; the photo and settings carry over between them in the same browser tab (sessionStorage).
ES modules need to be served over HTTP (opening index.html from disk won't work):
npm run serve # http://localhost:5173 (no-cache static server)
Libraries load from jsDelivr at pinned versions: OpenCV.js 4.10.0, three.js 0.170.0,
earcut 3.0.1, clipper-lib 6.4.2, opentype.js 1.3.4. The side-text font, Nunito ExtraBold,
is in fonts/ under the SIL Open Font License (fonts/OFL.txt).
There's no build step and no server code: host the files as they are. .nojekyll tells
GitHub Pages to serve them untouched.
main and / (root). The site appears at
https://<you>.github.io/<repo>/ within a minute or two.Only index.html, cutter.html, src/, fonts/ and samples/ are needed at runtime. Hosts serve
over HTTPS, which phones prefer for camera capture.
npm install
npm test
src/geometry.js: pure pipeline: outline → smoothed/rounded outline (mm) → mesh → validation → STLsrc/contours.js: pure: picks the cookie edge from an OpenCV-style contour tree, centerline, auto-mode guesssrc/vision.js: OpenCV.js: threshold (brightness, or chroma for colored cutters), morphology, contourssrc/cutter.js: pure: outline → cookie-cutter mesh (tapered blade + rim), validated like the blanksrc/text.js: pure: font outlines → raised text solids wrapped onto the cutter's outside wallsrc/colorpick.js: pure: select by colour (sampling, CIE Lab ΔE distance, colour mask)src/lettering.js: pure: ink outlines → a "bubble" cookie outline round hand letteringsrc/trace.js: pure: hand-traced points → smooth closed outline (centripetal Catmull-Rom, corner points), and a detected outline → editable pointssrc/trace-editor.js: the point editor on the photo (add, drag, insert, delete, corners, undo, zoom and pan)src/app-core.js: shared page logic (photo, overlay, settings, three.js preview, download)src/app.js, src/cutter-app.js: the two pages' configs (what to build, filename, extra settings)src/shared-markup.js: help panel, photo card and outline settings, used by both pagestest/*.test.js: unit tests (node:test) for the geometry, cutter, tracing, lettering and colour modulestools/make-test-images.mjs: regenerates samples/*.pngSelect by color (next to "Trace by hand" under the photo) works like a magic wand:
Choose Lettering under "Shape is a" and upload hand-drawn words (dark ink on light paper, or light on dark). The cookie becomes a soft "bubble" that follows the lettering, so you can pipe the words on top.
The result goes through the same pipeline as any other outline, so Smoothness, Fill gaps, size, Mirror, Rotate and Trace by hand all still apply, on both the blank and the cutter.
When the automatic outline isn't right, "Trace by hand" lets you place points round the shape instead. It starts from the detected outline, turned into about 28 editable points with corners where it bends sharply, or from nothing if detection found nothing.
The curve passes through every point without overshooting. The traced outline replaces detection for both the blank and the cutter, and it's remembered when you switch pages.
Defaults: 3.5 in longest side, 12.7 mm thick, flat top and bottom, a 2.0 mm top round-over (16 segments), and a 0.4 mm bottom chamfer.
The outline follows the photo: nothing is removed for being thin. For each outline point the mesh builder measures the local clearance (largest inscribed disc touching that point, the "shrinking ball" method). Where a part is too thin or too tightly curved for the full profile, as with a drawn figure's hands, the round-over and chamfer narrow there, blended over about 1 mm. The walls are stacked rings offset along per-point normals, and each ring is checked to be a simple polygon, with a more conservative scale tried if one isn't. The caps are earcut triangulations; any collinear vertices earcut drops are re-inserted as fans so there are no T-junctions.
"Fill gaps narrower than" (default 1 mm) closes small notches with a Clipper offset-out /
offset-in. Setting convexRadiusMM: 3, notchWidthMM: 6 in makeBlank gives the original
strict mode, which rounds every corner to at least 3 mm but drops parts thinner than 6 mm.
Modelled as printed: lip on the bed, blade up, and mirrored so that, flipped over, it cuts the shape the right way round. Defaults: 18 mm tall overall, a 1.6 mm blade that bevels (about 26°) over its top 2.5 mm to a 0.4 mm cutting edge, on a 3 mm thick lip that extends 6 mm beyond the blade. The lip has a 1.5 mm round-over on its outer top edge (the edge you press on) and a 0.6 mm chamfer at the bed. The inside face is vertical and is exactly the cookie outline.
Optional raised side text (default "Dispose of after use") sits on the outside face just above the lip. The letters are 0.6 mm proud, wrap round gentle curves, and go on the straightest stretch of wall with no bend tighter than 8 mm radius. They start at 4 mm cap height and shrink to 2.5 mm if needed; if nothing fits, the text is left off with a note. Each letter is its own closed solid sunk 0.4 mm into the wall, and slicers merge them.
Every outside ring is an exact Clipper offset of the outline, so the edge is 0.4 mm everywhere, including tight inside corners, and walls that meet across a narrow gap merge. The bevel is built from offset rings 0.2 mm apart. Each band between neighbouring rings is a strip whose every triangle touches both rings. If the shorter-diagonal walk would fold, the code tries nearest-point pairing; failing that, it uses an earcut triangulation with diagonals flipped so it doesn't leave flat terraces. Tests check the edge width on heart, star and figure, and that no bevel triangle folds.