Better HN
topnewbestaskshowjobs
Log inSign up

sam1902

1 karma · joined Apr 4, 2018 (8y ago) · 6 submissions

I love this website's aesthetic
Submissions

comment 7mo ago · link · parent

I do CAD work and constantly need dimensions for real objects — furniture, mechanical parts, custom brackets. Calipers handle simple shapes, but anything curved or weirdly profiled is painful to measure point-by-point.

What I wanted: drop the object on the floor next to a sheet of A4, take an iPhone photo from above, and get a scaled top-down image I can trace in Fusion 360. The existing tools each do half of it. Deskew tools (PerspectiveFix, PicFix) pull four corners to a rectangle but the output has no real-world scale. Measurement tools (Toolschimp) calibrate against one reference line but don't correct perspective. MYOG's perspective corrector is the only one that does both, but it only accepts a single reference and can't fuse multiple datums.

Skwik lets you place as many reference objects as you want — rectangles (A4, A3, custom) and lines — each with known dimensions and a confidence score (1–5). The algorithm picks the highest-confidence rectangle as the primary homography reference, then uses every other datum as a weighted correction on the X/Y axes independently. Single warpPerspective call, output at exact px/mm scale.

No AI, no ML, no model downloads — just JavaScript and OpenCV's WASM build for the linear algebra. Images never leave the browser. Stack is Vue 3 + OpenCV.js + Konva.js. HEIC is converted in-browser via libheif WASM.

Full disclosure: I vibe-coded this with Claude and QA'd every screen myself. The algorithm is adapted from a design I iterated on; the glue code and UI are AI-assisted but manually verified end-to-end.

Extras I ended up needing: point-to-point measurement tool on the corrected image, toggleable mm grid overlay, and a scale bar that can be burned into the export when sharing the reference with someone else.

Source on Gitea (mirrored to GitHub). Happy to dig into the multi-datum weighting math if anyone's curious — the short version is that line datums contribute to each axis proportionally to their pixel alignment on that axis, while secondary rectangles contribute equally to both.

2.

Skwik – Turn iPhone photos into scaled measurements for CAD work(usr-ein.github.io ↗)

3 points · by sam1902 · 7mo ago · 1 comment

comment 1y ago · link · parent

I made a simple tool where you drag n drop an XLSX file, and get back another XLSX file where hardcoded numbers' font is in blue, formulas with external spreadsheet references are in green, and normal formulas are in black. It also finds hidden hardcoded numbers in formulas (purple)

4.

Automatic color-coding of cells in Excel financial model(getmodulate.com ↗)

1 points · by sam1902 · 1y ago · 1 comment

comment 8y ago · link · parent

I made two python script to encode and decode string into and from zero width characters: Encoder: https://pastebin.com/DGansW69 Decoder: https://pastebin.com/ZVdvjnZc

I know it's pretty basic stuff but it does the job. The encoder outputs both in stdout and into a file so you can copy/past it more easily (from Sublime Text for example)