0.1.5 • Published 8 years ago

meshdiff v0.1.5

Weekly downloads
Last release
8 years ago


Inspired by git diff this command line tool helps you visually diff changes in your 3D meshes.

meshdiff mesh1.stl mesh2.stl

Image of diff


npm install meshdiff -g

build from repo

git clone https://TimothyStiles@github.com/TimothyStiles/meshdiff.git && cd meshdiff && npm run build


Currently meshdiff only supports files with the .stl extension. To produce a diff between a newer and older version of your mesh run the following after install:

meshdiff filePathTonNewerMesh.stl filePathToOlderMesh.stl

Meshdiff will then open your default browser (only chrome and firefox currently supported) load and render your original meshes. Then meshdiff will produce a visual diff by transforming your meshes into constructive solid geometries which it will use to find the following:

newerMesh - olderMesh // render green for new addition to mesh

oldermesh - newerMesh // render red for new subtraction to mesh

newerMesh ∩ oldermesh // render blue for no change in mesh

(olderMesh - (olderMesh - newerMesh)) - (newerMesh ∩ oldermesh) // render red for new subtraction to mesh

The resulting solid geometries will then be transformed back into meshes and rendered to the appropriate colors using a Lambert shading material in your browser thus producing your meshdiff!

#todo Port browser selection to electron instead of relying on users native browser.

Add support for PLY, OBJ, etc files.

Figure out computationally efficient way to display holes made in old mesh from new mesh. Can be done using:

(olderMesh - (olderMesh - newerMesh)) - (newerMesh ∩ oldermesh)

but is tricky to implement because of time/ language constraints.

Possibly port to clojure/clojurescript for multithreading and immutable data structures.

Fix registration.


Copyright 2016 Timothy S. Stiles

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.