Skip to main content

Python preprocessing tool to create OrigamiScript input files for Origami Editor 3D

Project description

Py Origami Editor 3D project

Python preprocessing tool to create OrigamiScript input files for Origami Editor 3D

Overview

Origami Editor 3D is a GUI for creating origami "on the screen". OrigamiScript is a scripting tool for Origami Editor 3D. However, the scripting capabilities are limited, mainly the fact that numbers mist be hard-coded, there are no variables, no computing etc.

This project is a Python preprocessing tool for OrigamiScript. The exported result is OrigamiScript file, but before the export, you can use Python to compute some intermediate values, use variables for re-used values etc.

Usage

The implemented commands are basically analogous to the original OrigamiScript definitions.

See the example below

Example

Kirigami example from OrigamiScript manual

from py_origami_editor_3d.origami import Origami
from py_origami_editor_3d.paper_types import SQUARE
#
origami = Origami()
origami.comment("A very basic paper flower")
origami.paper(SQUARE)
origami.comment("Fold in half twice:")
origami.plane((200, 200), (1, 0, 0)).reflect()
origami.plane((200, 200), (0, 1, 0)).reflect()
origami.comment("Cut some paper:")
origami.angleBisector((200, 0), (100, 0), (200, 100)).cut()
origami.angleBisector((0, 200), (0, 100), (100, 200)).cut()
origami.plane((130, 200), (1, 1, 0)).cut()
origami.comment("Unfold:")
origami.target(100, 100).plane((200, 200), (1, 0, 0)).reflect()
origami.target(100, 100).plane((200, 200), (0, 1, 0)).reflect()
origami.save("kirigami.txt")

Installation

  1. Using pip

    [sudo] python3 -m pip install [options] py-origami-editor-3d, e.g. pip install --user py-origami-editor-3d

  2. Using make (calls python3 -m pip install ., i.e. option 3, internally):

    make install [options], e.g. make install USER=TRUE

  3. Using pip locally

    python3 -m pip install . [options], e.g. python3 -m pip install . --user

Contribution

Merge Requests

Are welcome

Bug reporting

In case of any question or problem, please leave an issue at the GitLab page of the project.

Contributors

License

This project is licensed under the MIT License - see the license file for details.

TODO

  • other commands
  • more tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-origami-editor-3d-0.1.0.tar.gz (6.3 kB view hashes)

Uploaded Source

Built Distribution

py_origami_editor_3d-0.1.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page