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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file py-origami-editor-3d-0.1.0.tar.gz.

File metadata

  • Download URL: py-origami-editor-3d-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for py-origami-editor-3d-0.1.0.tar.gz
Algorithm Hash digest
SHA256 31c6e65f5b79ad33a3360488378fcdea01ec7afd523282d96962f3608c3f4e80
MD5 439db2beb054d02742757a0089d9651e
BLAKE2b-256 3e698894f0fc84807103ee1181980dbabd50fcdb0fc7f3b9e481a9cb439f3d06

See more details on using hashes here.

File details

Details for the file py_origami_editor_3d-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: py_origami_editor_3d-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for py_origami_editor_3d-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5be4afa6ff96dadc72ed5dcc35e4cf5245e6325a81aa6f1f58ff84fd418d57e9
MD5 2b1e5dd1927e29cadd661fcad2196475
BLAKE2b-256 71bbea3abaddf830db926c73d0493044a305bb014989459b66dd72d03c6652d7

See more details on using hashes here.

Supported by

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