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.29.tar.gz
(24.5 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.29-py3-none-any.whl
(24.2 kB
view details)
File details
Details for the file ambigram-0.0.29.tar.gz.
File metadata
- Download URL: ambigram-0.0.29.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
175ab3d80bcbef274897f79fd2e39fb5360579892a653e1cb2b0292b30d00eb2
|
|
| MD5 |
f3ed9cccbfdf02a7d189dcf3a54fa52e
|
|
| BLAKE2b-256 |
a27f0b4b83e47d288dd674a3f65666f215edab089826cf4a3e1ba68ce9c67a3d
|
File details
Details for the file ambigram-0.0.29-py3-none-any.whl.
File metadata
- Download URL: ambigram-0.0.29-py3-none-any.whl
- Upload date:
- Size: 24.2 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 |
406f30ba3a5c190327aa8e6b4292f6b63b02a025ba0e3c7ae58e42723f70583f
|
|
| MD5 |
a9b5b97282a47dc6c7813e6cb762404c
|
|
| BLAKE2b-256 |
3f5f575f155cefa6dc2b19c6f70de0f1a2aed91a397d1f89538914d762503b51
|