Code Monkey home page Code Monkey logo

paperfoldmodels's Introduction

paperfoldmodels

A python module that unfolds triangular surfaces onto the plane. The result can be used to create papercraft models.

The python bindings of OpenMesh are used and thus the original mesh can be loaded from any format supported by it. The output consists of several SVG files, each containing an intersection-free component of the unfolding.

Dependencies

  • Python 3
  • NumPy
  • OpenMesh
  • NetworkX

Example

The usage is shown in testUnfold.py

Unfolding of the stanford bunny: bunny The colors indicate the folding direction and the numbers the corresponding glued edge.

Method

The algorithm consists of three steps:

  1. Find a minimum spanning tree of the dual graph of the mesh.
  2. Unfold the dual graph.
  3. Remove self-intersections by adding additional cuts along edges.

Reference

The code is mostly based on the algorithm presented in this report by Straub and Prautzsch.

Language

Because the original target audience was a group of German-speaking high-school students, many of the comments are written in German.

Author

Felix Scholz [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.