Skip to content

Repository files navigation

Meshwright

Meshwright

Know why your model won't print. Fix it. Prove it.

Mesh analysis, repair and STL preparation for 3D printing by Geekatplay Studio · Vladimir Chopine

License Python Platform Tests MCP

☕ Support development · Quick start · Features · Docs · MCP server


Most "mesh repair" tools give you a spinner and a green tick. Meshwright tells you what is wrong, exactly where it is on the model, what it did about it, and what the result actually measures — and it never silently throws your work away.

Meshwright analysing a 2-million-triangle miniature
A real 1,994,490-triangle miniature analysed in ~23 s: readiness score, every issue with its location, and all 23 separate pieces listed.

Why Meshwright

Typical repair tool Meshwright
Diagnosis "Mesh has errors" 12 named checks, each with counts and a clickable location on the model
Repair One black box 6 measured stages — each kept only if it provably helped
Result "Done ✓" Before → after table, verified by a fresh re-analysis of the repaired mesh
Mistakes Overwrites your model Numbered states, Ctrl+Z / Ctrl+Y, explicit revert
Crash Work lost Background snapshots, recovery offered on next start
Reduction One decimation slider QuadriFlow smart retopology, uniform remesh, or quadric collapse — with measured surface deviation
Automation GUI only MCP server + Python API on the identical engine

Quick start

git clone https://github.com/GeekatplayStudio/Meshwright.git
cd Meshwright
install.bat          # or:  .\install.ps1
start.bat            # or:  .\start.ps1

Requires Python 3.10+. Node.js is optional (linting and refreshing the vendored Three.js).

The installer creates an isolated .venv inside the project folder. Meshwright pulls in numpy, scipy and several mesh libraries; installing those into a shared Python can silently upgrade numpy and break unrelated projects that pin it (numba, pyarrow, torch, …). start.bat and start.ps1 use that .venv automatically. Pass -Global to install.ps1 if you really want it in your system Python.

Installing by hand into an environment of your own:

python -m venv .venv
.venv\Scripts\python -m pip install -r requirements.txt
.venv\Scripts\python app.py

Drop a model onto the window, or press Ctrl+O.


What it does

1 · Diagnose — 12 checks, every one locatable

Open holes · boundary edges · non-manifold edges · face winding · inside-out normals · degenerate triangles · duplicate faces · duplicate vertices · unused vertices · sliver triangles · separate shells · unusual scale — plus volume, surface area, genus and bounding size.

Click any issue and Meshwright flies the camera to it and marks the exact spots in cyan, with a translucent sphere so even a single bad triangle on a huge model is findable.

Clicking an issue highlights it on the model
186 sliver triangles located on the model — not just counted.

Every issue carries a severity, and the 0–100 readiness score tells you at a glance whether the model is ready to slice.

2 · Repair — six stages, each one measured

Cleanup → Orientation → Hole filling → MeshFix → MeshLab → Manifold3D → Voxel remesh

A stage is only recorded as a fix if the diagnostics actually changed. The pipeline repeats until the mesh stops changing, then re-analyses the result from scratch — the report you see is measured on the repaired mesh, never predicted.

Repair report showing what changed
"What was fixed" plus a before → after table. If anything remains, it says so.

3 · Reduce — smart retopology down to low-poly

Three engines, one absolute face target, presets from 500 to 50k:

  • Smart retopoQuadriFlow, the quad remesher used inside Blender. Rebuilds the surface as clean, evenly sized, curvature-aligned quads. Best for sculpts, scans and true low-poly.
  • Decimate — MeshLab topology-preserving quadric collapse. Sharpest; keeps hard edges.
  • Uniform — isotropic remesh to equal-size triangles, then collapse. Best for noisy scans.

Before — 1,994,490 triangles

After — 41,198 triangles, clean quad flow

That is a 97.9 % reduction in about 90 seconds, and the readiness score stayed at 94 — still watertight, all 23 pieces intact, with a measured maximum surface deviation of 0.043 mm (4.3 % of the model size).

Every reduction reports how far the result strays from the original, in millimetres and as a percentage of model size. No guessing.

Remeshers can open holes on topologically complex shapes (this miniature is genus 114). Meshwright checks the result of every piece and repairs it with MeshFix — or falls back to a different engine — so a reduction never hands back a worse mesh than it was given.

4 · Separate pieces

Multi-part models are split, colour-coded and listed with triangle counts and sizes. Tick the ones you don't want — they turn red in the viewport — then remove them. Select all with Ctrl+A.

Separate pieces colour-coded and selectable

5 · Nothing is ever lost

Every change creates a numbered state.

  • Ctrl+Z / Ctrl+Y move between states — nothing else moves backwards.
  • A change that would add critical problems or discard most of the geometry is rejected, your previous state is kept, and you are offered "apply anyway".
  • Every accepted state is snapshotted to disk in a background thread. If the app dies, the next start offers to recover it.
  • Revert to original is explicit, confirmed, and itself undoable.

6 · Always know what it is doing

Long operations announce themselves before they start — how many faces they are about to process and roughly how long it will take — then show a live timer and progress bar in the bottom-right corner. Results stay on screen long enough to read and can be dismissed with a click.

Progress notification during a long operation
"1,994,490 faces · about 1–2 minutes" — no more wondering whether it froze.

Everything also goes to the activity console with timestamps, and to stdout, so a long run can be followed from the terminal.

7 · Export

Binary STL with source-unit scaling (mm / cm / in) and build-plate alignment, plus a JSON report of the diagnostics and every operation applied — good for client sign-off or a print-farm audit trail.


The viewport

Activity console showing every backend step with timings
The slide-out console reports every backend step with timings — you always know what is happening.
  • Shading: Shaded · Clay · Normals · X-ray
  • Overlays: wireframe, red open-edge highlight, build plate
  • XYZ compass and one-click Top / Front / Right / Iso / Bottom / Back / Left
  • Rotation gizmo — drag rings or step 90°; applies to the exported STL
  • Movable key light, resizable panel (remembers its width)

Keyboard

Ctrl+O Open Ctrl+S Export STL Ctrl++S Save report Ctrl+Z Undo
Ctrl+Y Redo Ctrl+R Repair Ctrl+U Re-analyse Ctrl+A Select pieces
Del Remove pieces R Gizmo F Fit W Wireframe
E Open edges G Plate 17 Views ? Help

Automation — MCP server & Python API

The desktop app is a thin shell over one engine. The same engine is available to AI assistants, editors and scripts.

// claude_desktop_config.json
{ "mcpServers": {
    "meshwright": { "command": "python", "args": ["D:/path/to/Meshwright/mcp_server.py"] }
} }

14 tools — load_model, analyze, repair, fix_slivers, simplify, retopologize, remove_shells, rotate, undo, redo, revert, states, export_stl, export_report — plus a meshwright://report resource.

from engine.service import MeshService

svc = MeshService()
svc.load("miniature.stl")
svc.repair()                                   # measured, verified, undoable
svc.retopo(20000, method="quadriflow")         # smart retopology
svc.export_stl("miniature_print_ready.stl")

Every input is validated, every call is guarded and undoable. See docs/MCP.md and docs/API.md.


Supported formats

In — OBJ · FBX · GLB · GLTF · STL · PLY · 3MF · DAE · OFF · 3DS Out — binary STL · JSON report


Built on

Meshwright is a careful integration of the best open mesh libraries. Full credit where it is due:

Library Role Licence
trimesh Loading, geometry, analysis, export MIT
QuadriFlow via pyQuadriFlow Smart quad retopology BSD-3 / MIT wrapper
MeshFix via pymeshfix Hole filling, self-intersection repair GPL-3 ⚠
MeshLab via PyMeshLab Non-manifold repair, decimation, isotropic remesh GPL-3 ⚠
Manifold3D Guaranteed-manifold solid reconstruction Apache-2.0
fast-simplification Fast quadric decimation MIT
scikit-image Marching cubes for voxel remesh BSD-3
NumPy · SciPy Array maths, spatial queries BSD-3
Three.js r128 WebGL viewport MIT
pywebview Desktop shell (Edge WebView2) BSD-3
ufbx FBX fallback loader MIT
MCP SDK MCP server MIT

Licensing note — Meshwright's own code is MIT. PyMeshLab and pymeshfix are GPL-3. Using them is fine; redistributing a bundled binary means complying with the GPL. Both are optional — the pipeline degrades gracefully without them. See docs/LICENSES.md.

About panel listing every engine and its installed version
The in-app About panel lists every engine with its installed version — click the studio name, top-left.

Documentation

docs/USER_GUIDE.md Every panel, button and workflow
docs/DIAGNOSTICS.md What each check means and how to fix it
docs/REDUCTION.md Choosing between retopology, decimation and remeshing
docs/MCP.md MCP server setup and every tool
docs/API.md Python API reference
docs/ARCHITECTURE.md How the engine is put together
docs/LICENSES.md Third-party licences in full
CONTRIBUTING.md Development setup, tests, style
CHANGELOG.md Release history

Development

python -m venv .venv
.venv\Scripts\python -m pip install -r requirements-dev.txt
npm install       # vendors Three.js into ui/vendor and installs eslint

npm test          # pytest, 54 tests
npm run lint      # eslint + ruff
npm run mcp       # start the MCP server

Dependency versions in requirements.txt are deliberately bounded (numpy>=1.26,<2.4 and so on) so an install can never drag a shared environment to an incompatible version.


☕ Support Meshwright

Meshwright is free and open source. If it saved you a failed print, a wasted spool, or an evening of hunting for a hole in a mesh — consider buying me a coffee.

geekatplay.gumroad.com/coffee


Geekatplay Studio · Vladimir Chopine geekatplay.com · YouTube · Gumroad

Released under the MIT License.

About

Know why your model won't print. Fix it. Prove it. — mesh analysis, repair and smart retopology for 3D printing, by Geekatplay Studio

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages