Ir para conteรบdo
3DFinder
Log in

You're on 3DFinder

We search Thingiverse, MakerWorld, and Printables at once so you get the best of each.

Find more like this
3D model image2surface by polymaker on Thingiverse

Description

Thundercats! Thundercats! Thundercats! HO!!!

I wrote this script for the sole purpose of making a thundercats stamp, but my prints always sink in on the top layer so it only stamps a patchy outline. Sigh...

This is a Python script that takes an image and turns it into something like a relief or a stamp. Sorry, it's not magic; it doesn't just convert any 2d image to 3d. It would have no way of knowing what should be popping up out of the image. That being said, sometimes it does work like that, and sometimes you just need to do a little editing first.

It treats white as the baseline and any color in between white and black should be raised up a height corresponding to the difference from white. Specifying -i (inverse) will treat black as the baseline instead.

The latest code will always be here (it will always be a work in progress): https://github.com/brad/image2surface

Caveats: -At the moment, I haven't been able to make anything with an image over 200x200 pixels. Anything larger and OpenSCAD crashes when rendering the STL. -I don't know if this will work with CMYK images, I have only tested with RGB and RGBA.

Instructions

Requirements ======== >= Python 2.7 Python Imaging Library

I hope the help output provides enough instruction: brad@inspiration:~/code/image2surface$ ./image2surface.py -h usage: image2surface.py [-h] [-i] [-r] [-d MAXDIM] [-z ZHEIGHT] [-o FILENAME] IMAGEFILE

Convert image to a surface for OpenSCAD and a .stl if desired.

positional arguments: IMAGEFILE The path to the image file you want to convert to a surface.

optional arguments: -h, --help show this help message and exit -i Defaults to white as a background, this option makes black the background. -r Remove base layer from surface. Only applies if exporting to .scad and/or .stl. -d MAXDIM The maximum size in mm to make the x or y dimension. Only applies if exporting to .scad and/or .stl. -z ZHEIGHT The max z-height of the text, defaults to 5 -o FILENAME By default, this script just outputs textsurface.dat, which can be imported into an OpenSCAD document. If you specify a .scad filename for this parameter, the script will also output a .scad file which imports the surface. If you specify a .stl filename, the script will go further and generate a .stl file.

====================

I provided some example .stl files to show some examples of what you can do. The thundercats logo and bathroom signs were generated from images I obtained online and modified, so I didn't include the modified images for legality reasons.

Believe it or not, I generated the shotglass directly from this image: http://thingiverse-production.s3.amazonaws.com/assets/e8/74/0c/05/58/surfaceshotglass.png using this command: python image2surface.py -i -r -z 50 -d 60 -o surfaceshotglass.stl surfaceshotglass.png

Thingiverse

image2surface

131
Likes
0
Downloads
36
Collections
Tags
2Color 2D 3D bluetooth image openscad relief restroom script shot glass sign stamp surface thundercats
License GNU - GPL
Files (5)
womens.stl 3.4 MB
mens.stl 2.4 MB
thundercats.stl 5 MB
surfaceshotglass.stl 15 MB
bluetooth.stl 2.8 MB
View on Thingiverse (opens in new tab)

Like this model? Create a free account to save your favorites and come back to them later.

Create account