{"id":37071446,"url":"https://github.com/bdlucas1/diff3d","last_synced_at":"2026-01-14T08:23:00.794Z","repository":{"id":267656621,"uuid":"901666992","full_name":"bdlucas1/diff3d","owner":"bdlucas1","description":"Fast visual 3d diff for STL, OBJ, 3MF, and STEP files","archived":false,"fork":false,"pushed_at":"2024-12-24T12:33:29.000Z","size":5575,"stargazers_count":44,"open_issues_count":11,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-14T04:41:29.716Z","etag":null,"topics":["3d","3d-models","3d-printing","3mf","build123d","cad","cadquery","freecad","obj","onshape","prusa","prusaslicer","python","pyvista","step","stl","vedo","visualization"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bdlucas1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-11T04:59:55.000Z","updated_at":"2025-07-09T18:29:07.000Z","dependencies_parsed_at":"2024-12-11T17:33:59.323Z","dependency_job_id":null,"html_url":"https://github.com/bdlucas1/diff3d","commit_stats":null,"previous_names":["bdlucas1/diff3d"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bdlucas1/diff3d","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdlucas1%2Fdiff3d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdlucas1%2Fdiff3d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdlucas1%2Fdiff3d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdlucas1%2Fdiff3d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdlucas1","download_url":"https://codeload.github.com/bdlucas1/diff3d/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdlucas1%2Fdiff3d/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:16:59.381Z","status":"ssl_error","status_checked_at":"2026-01-14T08:13:45.490Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-models","3d-printing","3mf","build123d","cad","cadquery","freecad","obj","onshape","prusa","prusaslicer","python","pyvista","step","stl","vedo","visualization"],"created_at":"2026-01-14T08:23:00.179Z","updated_at":"2026-01-14T08:23:00.783Z","avatar_url":"https://github.com/bdlucas1.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"This Python program provides a simple, fast, and robust way to visually\ncompare 3d files such as STL, OBJ, 3MF, and STEP. The unchanged parts\nof the objects are shown in gray, while the changed parts are shown in\ncontrasting colors that stand out, illustrated by the following\nexample.\n\n\u003cimg src=\"https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/scheme1.png\" width=\"50%\"\u003e\n\nIn this example most of the lens clamp is unchanged and is displayed\nin gray, while the differing parts are displayed in red for one file\nand green for the other file: in the red file the diameter is smaller,\nwhile in the green file the base is longer, and the threaded hole has\nmoved.\n\n\n### Quick start\n\nYou will need to have Python installed - see notes in the next section\non installing Python if you don't already have it. Python comes with a\nprogram called `pip` for installing Python programs at the system\nlevel. To install `diff3d` run this command:\n\n    pip install diff3d\n\n(On some Linux systems you may need to use `pipx` instead of `pip`; see\nnext section.)\n\nThen to test the installation download two test files\n[lens-clamp-A.stl](https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/lens-clamp-A.stl)\nand\n[lens-clamp-B.stl](https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/lens-clamp-B.stl)\nand run the command\n\n    diff3d lens-clamp-A.stl lens-clamp-B.stl\n\nThe first time you run the `diff3d` command it may take a little time\nto start while it loads and compiles the supporting packages, but\nafter that the startup time will be very quick.\n\nYou can drag the displayed object to rotate it, use the mouse wheel to\nzoom, and shift-drag to pan.\n\nThe second file is optional, in which case the first file will simply\nbe displayed without diffs. This allows the tool to be used as a\nsimple 3d file viewer in addition to its primary function.\n\n\n### Supported platforms, file formats, and object types\n\nI have tested on the following platforms:\n\n* Windows 11, Python 3.13. Download and install from\n  [python.org](https://www.python.org/downloads/), and in the\n  installation program be sure to check the the box that says \"Add\n  python.exe to PATH\" which will make `pip` and `diff3d` available\n  from the command line. Then open a command prompt window and type\n  `pip install diff3d`.\n\n* MacOS, Python 3.13 installed using `brew install python`, then `pip\n  install diff3d`.\n\n* Linux Mint, Python 3.13 installed using `sudo apt install python\n  pipx`, then `pipx install diff3d` (instead of using `pip`).\n\nOut of the box `diff3d` supports STL, OBJ, and 3MF files. Support for a\nnumber of additional file types is available by installing `meshio`,\nand support for STEP files can be enabled by installing `build123d`.\n\nUnlike other tools that do 3d diffs by using 3d boolean operations\nlike intersection and difference, this tool is robust and is not\nlimited to manifold (closed surface) meshes, but can diff anything that\ncan be rendered, including open surfaces, curves, and points.\n\n\n### Color animation\n\nSmall areas of difference may be difficult to spot under some\ncircumstances, especially for people with some form of\ncolorblindness. To help highlight areas of difference, you can press\nthe \"a\" key and the colored areas will flash briefly.\n\nThis feature was inspired by the much more sophisticated color\nanimations for enhancing color vision provided by\n[ColorPhi](https://www.colorphi.com).\n\n\n### Object alignment\n\nIn some cases two objects to be compared may be shifted relative to\neach other in addition to other changes. This is illustrated by\nexample files\n[lens-clamp-A.obj](https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/lens-clamp-A.obj)\nand\n[lens-clamp-C.obj](https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/lens-clamp-C.obj)\nin the images below.\n\n\u003cimg src=\"https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/alignment1.png\" width=\"30%\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/alignment2.png\" width=\"30%\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/alignment3.png\" width=\"30%\"\u003e\n\nThe first image is produced by just comparing the two files as-is\nwithout any attempt to align them:\n\n    diff3d lens-clamp-A.obj lens-clamp-C.obj\n\nThe misalignment obscures the relevant changes.\n\nThe second image was produced by aligning the centroids of the two\nobjects. This is better, but it is still difficult to see the\ninteresting changes.\n\nInstead `diff3d` provides an alignment method that attempts to align\nthe objects such that major features that they have in common are\naligned, thus displaying a minimal set of differences between the\nobjects. This is illustrated by the third image above, produced using\nthe `--align` flag:\n\n    diff3d --align lens-clamp-A.obj lens-clamp-C.obj\n\nThis is not the default because it's not always necessary and it may\ntake a bit of time to do the alignment. The first time you use the\n`--align` option it may take a little time to start while it loads and\ncompiles the supporting packages, but after that the startup time will\nbe very quick.\n\n\n### Color schemes\n\nThree color schemes designed to be colorblind-friendly are\nprovided. (This is based on information from\nhttps://davidmathlogic.com/colorblind, and I have not verified\nthis. If you have information to add please contact me by opening an\nissue on github.)\n\n\u003cimg src=\"https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/scheme1.png\" width=\"30%\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/scheme2.png\" width=\"30%\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/bdlucas1/diff3d/refs/heads/master/examples/scheme3.png\" width=\"30%\"\u003e\n\nYou can choose a scheme using the `-s` or `--scheme` option.  The\nabove schemes are named \"1\", \"2\", and \"3\" respectively.\n\n\n### API\n\nThe `diff3d` module provides a simple API if you want to integrate it\ninto your own program. As this is an early version of the program,\nI'll try to maintain the stability of these APIs, but I can't\nguarantee it. See the code for details.\n\n* `diff3d.from_files` opens a window displaying the diff between two files\n\n* `diff3d.diff` opens a window displaying the diff between two pyvista objects.\n\n* If you are using a different mesh or CAD package, if you can obtain\n  point and triangle arrays, you can convert them to pyvista objects\n  using `pyvista.PolyData.from_regular_faces`\n\n* You can align two meshes without displaying them using `diff3d.align3d`.\n\n\n### Discussions and Issues\n\nIf you would like to report an issue, ask a question, or make a\nsuggestion you do so through the\n[Discussions](https://github.com/bdlucas1/diff3d/discussions) and\n[Issues](https://github.com/bdlucas1/diff3d/issues) pages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdlucas1%2Fdiff3d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdlucas1%2Fdiff3d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdlucas1%2Fdiff3d/lists"}