shapeviz
A lightweight 3D mesh and point cloud viewer that opens an interactive browser tab.
No Open3D. No VTK. No 500 MB install that breaks every time you change Python
versions. Just pip install shapeviz, point it at a file, call view(), and a
beautiful interactive 3D viewer opens in your browser — powered by Three.js
loaded straight from a CDN.
import shapeviz
shapeviz.view("mesh.ply")
shapeviz.view("cloud.xyz", mode="pointcloud", point_size=2)
shapeviz.compare("before.ply", "after.ply") # side by side
Why shapeviz?
If you work with 3D geometry in Python — robotics, point-cloud ML, NeRF, mesh processing, game assets — your options for just looking at the thing are heavy. Open3D and VTK are powerful but large, native, and notoriously fragile across Python/OS versions.
shapeviz is the opposite:
| shapeviz | Open3D | |
|---|---|---|
| Install size | a few KB | ~500 MB |
| Required dependencies | zero | many native libs |
| Rendering | Three.js in your browser | native OpenGL window |
| Works over SSH / in notebooks | ✅ (browser / inline IFrame) | ✗ awkward |
| Breaks on Python upgrade | basically never | often |
numpy and scipy are optional — install them only if you want faster mesh processing. Everything works without them.
Installation
pip install shapeviz
Optional extras:
pip install "shapeviz[numpy]" # faster normal computation / heatmaps
pip install "shapeviz[full]" # numpy + scipy
pip install "shapeviz[dev]" # contributor tooling (pytest, ruff, build…)
Requires Python 3.9+. Works on Windows, macOS, and Linux.
Supported formats
| Extension | Type | ASCII | Binary |
|---|---|---|---|
.ply |
mesh / point cloud | ✅ | ✅ |
.obj |
mesh (with vertex colors) | ✅ | — |
.stl |
mesh | ✅ | ✅ |
.xyz, .xyzrgb, .pts |
point cloud (XYZ / XYZRGB / XYZ+normals) | ✅ | — |
.pcd |
point cloud | ✅ | ✅ |
The loader auto-detects meshes vs. point clouds and reads vertex colors and normals when present.
Python API
view(source, **options)
Open a single mesh or point cloud.
import shapeviz
# From a file path...
shapeviz.view("bunny.ply")
# ...or from an in-memory object you built yourself.
from shapeviz import Mesh
m = Mesh(vertices=[[0,0,0],[1,0,0],[0,1,0]], faces=[[0,1,2]])
shapeviz.view(m)
Common options (all keyword-only):
| Option | Values | Description |
|---|---|---|
mode |
"solid", "wireframe", "pointcloud", "normals" |
initial render mode |
color_mode |
"solid", "vertex", "normals", "heatmap" |
initial coloring |
point_size |
float | point size for clouds |
color |
hex string, e.g. "#6cb6ff" |
solid color |
background |
hex string | background color |
show_axes |
bool | show XYZ axes on start |
show_grid |
bool | show the ground grid |
compute_normals |
bool | compute per-vertex normals for meshes that lack them |
open_browser |
bool | open the system browser (default True) |
inline |
bool | force/disable inline Jupyter rendering (default: auto) |
return_html |
bool | return the raw HTML string instead of viewing |
shapeviz.view("cloud.xyz", mode="pointcloud", point_size=3, color_mode="heatmap")
shapeviz.view("part.stl", color="#ff8866", compute_normals=True)
compare(*sources, titles=None, **options)
Show two or more geometries side by side with synchronised cameras — rotate one, they all rotate. Perfect for before/after, ground-truth vs. prediction, raw vs. filtered.
shapeviz.compare("before.ply", "after.ply")
shapeviz.compare(raw, filtered, meshed, titles=["raw", "filtered", "meshed"])
save_html(source, path, **options)
Render to a standalone .html file you can email, embed, or open later. (The
only external thing it needs is the Three.js CDN at view time.)
shapeviz.save_html("scan.pcd", "report.html", color_mode="heatmap", point_size=2)
load(path)
Just parse a file into geometry without rendering.
g = shapeviz.load("mesh.ply")
print(g) # <Mesh 'mesh.ply' vertices=35947 faces=69451 ...>
print(g.num_vertices, g.bounds())
Interactive viewer controls
Once the viewer opens, a floating panel gives you:
- Render mode — solid · wireframe · point cloud · normals overlay
- Color mode — solid color · vertex colors · normals-as-color · heatmap (by Z)
- Solid color picker and point size slider
- Toggles for grid, axes, and a light/dark background
- Sync cameras (in compare mode)
- Reset view and Screenshot (saves a PNG)
Mouse: drag to rotate · right-drag to pan · scroll to zoom.
Command line
shapeviz installs a shapeviz command:
shapeviz view mesh.ply
shapeviz view cloud.xyz --mode pointcloud --point-size 3 --color-mode heatmap
shapeviz compare before.ply after.ply
shapeviz save mesh.ply out.html --color "#ff8866"
shapeviz info cloud.pcd # print stats without rendering
shapeviz view/compare start a tiny local HTTP server and open your browser;
press Ctrl+C to stop. Add --no-browser to start the server without
opening a tab. Run shapeviz --help or shapeviz <command> --help for all
options.
Jupyter notebooks
Inside a notebook, view() and compare() render inline automatically via
an IFrame — no server, no new tab:
import shapeviz
shapeviz.view("mesh.ply", height=500)
Use inline=False to force a browser tab instead, or inline=True to force
inline rendering outside a notebook.
How it works
- Parse the file in pure Python into a
MeshorPointCloud. - Serialise vertices/faces/colors/normals into a compact JSON payload.
- Embed that payload into a self-contained HTML document that pulls
Three.js from a CDN and builds a
BufferGeometryin the browser. - Serve it from Python's built-in
http.server(or inline it as a data-URI IFrame in Jupyter, or write it to disk withsave_html).
No native rendering, no GPU drivers to fight with — your browser already has a great WebGL renderer.
Development
git clone https://github.com/amanmukati09/shapeviz.git
cd shapeviz
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS/Linux
pip install -e ".[dev]"
pytest
ruff check src tests
The test suite generates tiny sample files for every format on the fly and runs both with and without numpy, so it verifies the pure-Python fallbacks too.
License
MIT © Aman Mukati. See LICENSE.
Metadata
Release files for shapeviz 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shapeviz-0.1.1.tar.gz | 28.5 kB | Without provenance | Details for shapeviz-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shapeviz-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for shapeviz-0.1.1-py3-none-any.whl |
Total release size: 56.2 kB
Release files / shapeviz-0.1.1.tar.gz
| Download URL | shapeviz-0.1.1.tar.gz |
|---|---|
| Size | 28.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
073019a6a3c27324bfa42917cdb891aeeaf7c813301e942bbfd325c6a8a16ed6
|
|
BLAKE2b-256 checksum How to use checksums |
c979a2558bcfc701b29fd4e23f491171ffa494f8b6d3de0158c187f0e63b9418
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / shapeviz-0.1.1-py3-none-any.whl
| Download URL | shapeviz-0.1.1-py3-none-any.whl |
|---|---|
| Size | 27.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a15ce5323bb9ae423128869b7ee4df25e5885c8f265cc3416aa69856f288c07a
|
|
BLAKE2b-256 checksum How to use checksums |
5b584d71f4a6262203ce4a78e1ac6261c5caf6d2929f2f376b527e9953c2f7ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for shapeviz 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.