Overview
LiDAR scans and AI-sculpted STLs are gorgeous and absurdly heavy -; hundreds of thousands of triangles for a shape you just want to tweak. Tinkercad refuses anything over 25 MB, and slicers groan. This is a single HTML file you open in a browser that thins a dense mesh down to something usable, patches small holes, and exports a clean STL -; no install, no server, all client-side.
How It Works
The whole thing is one stl_simplifier.html using Three.js (r128, via an ES
import map from cdnjs) for the viewport and a React component for the UI. Drag in an STL
and it renders in a WebGL viewport with a grid, a couple of directional lights, and a
flat-shaded double-sided material so you can see exactly what you're cutting.
Simplification is hand-written vertex clustering rather than an off-the-shelf quadric collapse. It takes the mesh bounding box, derives a grid resolution from a quality slider, snaps every vertex into a grid cell, and replaces all the vertices in a cell with that cell's centroid. Triangles whose three corners collapse into the same cell are degenerate and get dropped. A nice side effect: nearby vertices get welded and small gaps close as the mesh thins.
A separate repair pass welds vertices on an epsilon grid, counts edges, finds boundary edges (the ones used by exactly one triangle), and traces the open boundary loops so holes can be flagged. Output is a binary STL with recomputed face normals, and a stats panel shows triangle count and file size before/after, the reduction percentage, and a Tinkercad compatibility indicator that lights up if you're still over the 25 MB limit.
Current Status
It works. It's paused not because anything's broken but because it's a tool, not a product -; it sits on the shelf until the next dense scan comes along that needs flattening. Tested against real LiDAR captures and sculpted STLs.