3D Ambigram Generation using Cadquery
Project description
:shipit: Ambigram
:bookmark: Table of contents
:question: About
Ambigram is a small but powerful library that automates the process of creating 3D Ambigram from two different length (with spaces) strings.
:file_folder: Installation
:penguin: Binary dependencies (Unix)
sudo apt-get install python3 python3-pip python3-setuptools
:snake: Option 1: Pypi
python3 -m pip install ambigram
:hand: Option 2: Git repository (Still connects to Pypi)
pip install git+https://github.com/sivefunc/ambigram.git
:computer: Example
Simple Text
from cadquery.vis import show
from ambigram import Ambigram
ambigram = Ambigram("HELLO", "WORLD")
show(ambigram.assembly)
| X Perspective | Y Perspective |
|---|---|
Two different length string with a Rectangular Base
from cadquery.vis import show
from ambigram import Ambigram
ambigram = Ambigram("ANDROID", "IOS")
ambigram = ambigram.add_base_rectangle(
height=ambigram.font_size / 10.0,
padding=ambigram.font_size / 10.0,
)
show(ambigram.assembly)
| X Perspective | Y Perspective |
|---|---|
Letter Support + Base
from cadquery.vis import show
from ambigram import Ambigram
ambigram = Ambigram("RECURSIVE", "FUNCTION")
ambigram = ambigram.add_letter_support_to_all(
cylinder_height=ambigram.font_size / 4.0,
cylinder_radius=ambigram.font_size / 4.0,
rect_height=ambigram.font_size / 16.0,
)
ambigram = ambigram.add_base_rectangle(
height=ambigram.font_size / 10.0,
padding=ambigram.font_size / 10.0,
)
show(ambigram.assembly)
| X Perspective | Y Perspective |
|---|---|
:notebook: Notes
- Different Length String are implemented by placing the extra chars behind the shortest one (see it for yourself)
- Spaces are Allowed but needs further testing.
- A new algorithm for bases is need the current ones are rectangular and P2P, P2P is quite good at == string lengt but more improvement is needed.
- Needs further documentation
- Needs further testing
Thanks to
- 2CatTeam That allowed me to see that whitespaces and different string length are allowed.
- Lucandia That allowd me to see that It was possible in Python.
Made by :link: Sivefunc
Licensed under :link: GPLv3
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
ambigram-0.0.28.tar.gz
(22.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ambigram-0.0.28-py3-none-any.whl
(23.5 kB
view details)
File details
Details for the file ambigram-0.0.28.tar.gz.
File metadata
- Download URL: ambigram-0.0.28.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9a7bc2cc1b68a5e90b6c725432a6d14b653e8a59a1faa222d4c63a22e25b729
|
|
| MD5 |
b113e8ed34fc8c322e29a86f5aeee4ff
|
|
| BLAKE2b-256 |
143207d2a719a57d531edd8765fd749424914881cea995869af55cddc65d441e
|
File details
Details for the file ambigram-0.0.28-py3-none-any.whl.
File metadata
- Download URL: ambigram-0.0.28-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a29d00326954b79b82373b5bee00c59a1efd960e839b8fe89ab0be2e67fb2a4
|
|
| MD5 |
c4c0360b988f1b5d1e24b10b92222143
|
|
| BLAKE2b-256 |
fc7725e2851d64692f5fd357bf7f76dc870237541c3b4534ca07a822ba3fa28b
|