3D mesh simplification in Go.
Go
Switch branches/tags
Nothing to show
Clone or download
Latest commit d32f302 Feb 16, 2017
Permalink
Failed to load latest commit information.
cmd/simplify printout fix May 14, 2016
LICENSE.md add LICENSE.md May 13, 2016
README.md Update README.md May 15, 2016
face.go bug fixes Feb 16, 2017
matrix.go bug fix Feb 16, 2017
mesh.go cmd improvements, factor May 13, 2016
pair.go bug fix Feb 16, 2017
queue.go bug fixes May 15, 2016
simplify.go bug fixes Feb 16, 2017
stl.go save normals Sep 9, 2016
triangle.go save normals Sep 9, 2016
util.go initial commit May 11, 2016
vector.go handle case where matrix cannot be inverted May 15, 2016
vertex.go working but some issues May 12, 2016

README.md

3D Mesh Simplification

Implementation of Surface Simplification Using Quadric Error Metrics, SIGGRAPH 97, written in Go.

Bunny

270,000 faces vs. 2,700 faces (1%)


Install

go get -u github.com/fogleman/simplify/cmd/simplify

Command-Line Usage

Usage: simplify [-f FACTOR] input.stl output.stl

$ simplify -f 0.1 bunny.stl out.stl
Loading bunny.stl
Input mesh contains 270021 faces
Simplifying to 10% of original...
Output mesh contains 27001 faces
Writing out.stl

API Usage

// Use LoadSTL (ASCII) or LoadBinarySTL
mesh, err := simplify.LoadBinarySTL(inputPath)
// handle err
mesh = mesh.Simplify(factor)
mesh.SaveBinarySTL(outputPath)

Animated

Iteratively simplifying by 50% until only 16 faces remain