# Simplification and remeshing of STL parts

## Tools

Simplification (mesh reduction) of 3d models can be used to approximate or repair the geometry. It allows to make easy STL unwrappings (flattenings) for example by:

- [fogleman/simplify](https://github.com/fogleman/simplify)
    
    <div class="code panel pdl conf-macro output-block" data-hasbody="true" data-macro-name="code" style="border-width: 1px;"><div class="codeContent panelContent pdl"><div><div class="syntaxhighlighter sh-django  bash" id="bkmrk-"></div></div></div></div>
- [AutoDesk MeshMixer](https://www.meshmixer.com/)
- [meshlab](https://www.meshlab.net/)
- [GeometryCollective/fieldgen](https://github.com/GeometryCollective/fieldgen)
- [Blender](https://www.blender.org/)
- [songrun/SeamAwareDecimate](https://github.com/songrun/SeamAwareDecimater)
- [Fast-Quadric-Mesh-Simplification](https://myminifactory.github.io/Fast-Quadric-Mesh-Simplification/)
- [3dless.com](https://3dless.com) ([github.com/ipepe/3dless-com](https://github.com/ipepe/3dless-com))

### fogleman/simplify

```bash
go get -u github.com/fogleman/simplify/cmd/simplify
mv ~/go/bin/simplify /bin/
 
#run simplify
simplify ... #only works for binary
```

## Python libraries

- [numpy-stl](https://pypi.org/project/numpy-stl/)
- [trimesh](https://pypi.org/project/trimesh/)
- [pymesh](https://pymesh.readthedocs.io/en/latest/)
- [open3d](http://www.open3d.org/docs/release/tutorial/Basic/mesh.html)
- [zmesh](https://pypi.org/project/zmesh/)
- [OpenMesh](https://www.graphics.rwth-aachen.de/media/openmesh_static/Documentations/OpenMesh-6.2-Documentation/a00036.html)

### trimesh library

Linux

```bash
sudo apt-get install -y python3-rtree
pip3 install trimesh[easy]
```

Windows

```bash
https://www.lfd.uci.edu/~gohlke/pythonlibs/#rtree
pip install Rtree-0.9.4-cp38-cp38-win_amd64.whl
pip install trimesh[easy]
```