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
-
Using
pip
[sudo] python3 -m pip install [options] py-origami-editor-3d
, e.g.pip install --user py-origami-editor-3d
-
Using
make
(callspython3 -m pip install .
, i.e. option 3, internally):make install [options]
, e.g.make install USER=TRUE
-
Using
pip
locallypython3 -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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for py-origami-editor-3d-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31c6e65f5b79ad33a3360488378fcdea01ec7afd523282d96962f3608c3f4e80 |
|
MD5 | 439db2beb054d02742757a0089d9651e |
|
BLAKE2b-256 | 3e698894f0fc84807103ee1181980dbabd50fcdb0fc7f3b9e481a9cb439f3d06 |
Hashes for py_origami_editor_3d-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5be4afa6ff96dadc72ed5dcc35e4cf5245e6325a81aa6f1f58ff84fd418d57e9 |
|
MD5 | 2b1e5dd1927e29cadd661fcad2196475 |
|
BLAKE2b-256 | 71bbea3abaddf830db926c73d0493044a305bb014989459b66dd72d03c6652d7 |