{"id":13574901,"url":"https://github.com/edemaine/fold","last_synced_at":"2025-04-04T21:11:44.983Z","repository":{"id":19192700,"uuid":"74400902","full_name":"edemaine/fold","owner":"edemaine","description":"FOLD file format for origami models, crease patterns, etc.","archived":false,"fork":false,"pushed_at":"2024-01-04T16:00:56.000Z","size":282,"stargazers_count":308,"open_issues_count":27,"forks_count":48,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-10-14T09:48:58.352Z","etag":null,"topics":["fold","mesh","meshes","origami"],"latest_commit_sha":null,"homepage":null,"language":"CoffeeScript","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/edemaine.png","metadata":{"funding":{"github":["edemaine"]},"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":"2016-11-21T20:00:27.000Z","updated_at":"2024-10-07T11:28:18.000Z","dependencies_parsed_at":"2022-07-27T00:02:05.594Z","dependency_job_id":"51ef12d0-2eeb-46e2-929b-c1f2a4beb63f","html_url":"https://github.com/edemaine/fold","commit_stats":{"total_commits":178,"total_committers":7,"mean_commits":"25.428571428571427","dds":0.1629213483146067,"last_synced_commit":"01cf6668ff4b8584532c6e102641e010a5ac2567"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edemaine%2Ffold","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edemaine%2Ffold/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edemaine%2Ffold/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edemaine%2Ffold/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edemaine","download_url":"https://codeload.github.com/edemaine/fold/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247249536,"owners_count":20908212,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["fold","mesh","meshes","origami"],"created_at":"2024-08-01T15:00:55.974Z","updated_at":"2025-04-04T21:11:44.946Z","avatar_url":"https://github.com/edemaine.png","language":"CoffeeScript","funding_links":["https://github.com/sponsors/edemaine"],"categories":["CoffeeScript","Software"],"sub_categories":[],"readme":"# FOLD [[spec](doc/spec.md), [viewer](https://edemaine.github.io/fold/examples/foldviewer.html), [API](doc/api.md)]\n\n**FOLD** (Flexible Origami List Datastructure) is a file format (with extension\n`.fold`) for describing **origami models**: crease patterns, mountain-valley\npatterns, folded states, etc.  Mainly, a FOLD file can store a **mesh** with\n**vertices**, **edges**, **faces**, and links between them, with optional\n2D or 3D geometry, plus the topological **stacking order** of faces that\noverlap geometrically.\nA mesh can also easily store additional user-defined data.\nOne FOLD file can even store multiple such meshes in \"**frames**\"\n(but this feature is not yet supported in any code).\n\nThis repository both **documents** the FOLD format (which is still in early\nstages so its definition is evolving) and provides web **software tools**\nand **JavaScript libraries** to aid in manipulation of FOLD files.\nFOLD is built upon\n**[JSON](http://www.json.org/)** (JavaScript Object Notation)\nso [parsers](http://www.json.org/) are available in essentially all\nprogramming languages.  Once parsed, the format also serves as the typical\ndata structure you'll want to represent foldings in your software.\nOur libraries also help build useful redundant data structures for\nnavigating the mesh.\n\nFOLD is similar in spirit to the\n[OBJ format](http://paulbourke.net/dataformats/obj/) (and other similar\nformats) for storing 3D meshes; its main distinguishing features are\n**easy parsing**, **easy extensibility**, the ability to disambiguate\n**overlapping faces** with stacking order, and the ability to define edges\nand thus edge properties (such as mountain-valley assignments) and\n**arbitrary polyhedral complexes**.\n(Without edges, OBJ cannot distinguish between two faces sharing two\nconsecutive vertices from faces sharing an edge.)\nIn addition, FOLD can support **linkages** (with 1D edges but no 2D faces).\n\n## [FOLD Format Documentation](https://github.com/edemaine/fold/tree/main/doc/spec.md)\n\n* [FOLD specification](https://github.com/edemaine/fold/tree/main/doc/spec.md)\n* [2-page paper describing FOLD](http://erikdemaine.org/papers/FOLD_CGW2016/)\n* [Examples of .fold files](https://github.com/edemaine/fold/tree/main/examples/)\n\n## FOLD Software Tools\n\nHere is software supporting the FOLD format, built both within this project\nand by other people:\n\n* [FOLD viewer](https://edemaine.github.io/fold/examples/foldviewer.html)\n  loads and display a given .fold file, useful for visualization and testing\n* Amanda Ghassaei's\n  [Origami Simulator](https://github.com/amandaghassaei/OrigamiSimulator)\n  supports FOLD input and output\n* Tomohiro Tachi's\n  [Freeform Origami](http://origami.c.u-tokyo.ac.jp/~tachi/software/#ffo)\n  (simulator and design tool)\n  supports FOLD input and output\n* Robby Kraft's [Rabbit Ear](https://rabbitear.org/docs/)\n  is based on FOLD.  It includes a\n  [file converter](https://convert.rabbitear.org/)\n  (FOLD display, SVG import/export, and flat folding).\n* [ORIPA](https://github.com/oripa/oripa): Origami Pattern Editor\n  v1.10+ supports FOLD import/export (in addition to its OPX file format).\n* [Crease Pattern Editor](https://github.com/edemaine/cp-editor/)\n  supports FOLD export\n* [Rhino Grasshopper FOLD plugin](https://github.com/robbykraft/rhino-grasshopper-fold)\n  converts between Rhino meshes and FOLD format/data\n\n## [FOLD JavaScript Library](https://github.com/edemaine/fold/tree/main/doc/api.md)\n\nFor simple web apps, add this tag to your HTML:\n`\u003cscript src=\"https://edemaine.github.io/fold/dist/fold.js\"\u003e\u003c/script\u003e`\n(or save a local copy of\n[`dist/fold.js`](https://github.com/edemaine/fold/blob/main/dist/fold.js)\nand use that).\nThen, if you add `FOLD = require('fold')` to your JavaScript/CoffeeScript code,\nyou can access the library via `FOLD.moduleName.functionName`, e.g.,\n`FOLD.filter.collapseNearbyVertices`.\n\nFor Node apps, just `npm install --save fold`;\nthen add `FOLD = require('fold')` to your JavaScript/CoffeeScript code;\nthen access the library via `FOLD.moduleName.functionName`, e.g.,\n`FOLD.filter.collapseNearbyVertices`.\n\nThe [FOLD library API](https://github.com/edemaine/fold/tree/main/doc/api.md)\ndocuments the available modules and functions for manipulating FOLD objects.\nIf you have a `.fold` file, first parse it with `JSON.parse(fileContents)`\nto get a FOLD object.\n\nThe JavaScript library also provides a command-line interface called\n`fold-convert`.  To use it, make sure you have [Node.js](https://nodejs.org/en/)\ninstalled, and then run `npm install -g fold` from the command line.\nThen you can use the following features:\n* `fold-convert -o .fold *.opx`: Convert ORIPA `.opx` files to `.fold`.\n* `fold-convert --flat-fold -o B.fold A.fold`:\n  Flat fold crease pattern `A` into folded geometry `B`\n\n## Authors\n\nThe FOLD format was invented by three people:\n* [Erik Demaine](http://erikdemaine.org), M.I.T.\n* [Jason Ku](http://jasonku.mit.edu), M.I.T.\n* [Robert Lang](http://langorigami.com), langorigami.com\n\nWe welcome your feedback and suggestions!  The goal is for all software in\ncomputational origami to support FOLD as a common interchange format.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedemaine%2Ffold","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedemaine%2Ffold","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedemaine%2Ffold/lists"}