Skip to main content

Image to OpenSCAD converter

Project description

img2scad - Convert images to OpenSCAD structures <https://gitlab.com/engmark/img2scad>

Default syntax:

img2scad [-b|–base=N] [-l|–log] < input_file

Description:

For each pixel in the input, it will create a cube in the output. The height of the cube corresponds to the whiteness of the corresponding pixel.

If -b or –base is specified, all values will be shifted by that value. This can be positive or negative. This can be used to output zero values.

If -l or –log is specified, the logarithm of the grey values will be used for the output.

Examples:

img2scad < example.png > example.scad

Convert example.png to example.scad.

img2scad -b 1 < example.png > example.scad

Convert example.png to example.scad, with a “bedrock” of height 1.

img2scad -b 2 -l < example.png > example.scad

Convert example.png to example.scad, taking the logarithm for the height and preserving the black pixels.

<http://www.thingiverse.com/thing:4448>

Bugs:

Please submit bug reports at https://gitlab.com/engmark/img2scad/-/issues.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

img2scad-0.5-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file img2scad-0.5-py3-none-any.whl.

File metadata

  • Download URL: img2scad-0.5-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for img2scad-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3b277e2922840ac9bce8e63e0a0f453b16249ab7e42ee20c4b234fa51bab34ee
MD5 415f3d9fb53ababa095850b206fcf858
BLAKE2b-256 cb17111d0aff054b87416dbd86df0a90c7d0b66dfb8779b3c03475b122f2ada0

See more details on using hashes here.

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