Scripted vases

by hakalan, published

Scripted vases by hakalan Jun 16, 2013

Featured Thing!



Use This Project

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag

Thing Statistics

104104Views 71164Downloads Found in Decor


Vases with varying shapes, generated directly from a Python script.

Very quick to print with single perimeter thickness, and surprisingly rigid thanks to all the folds and curved surfaces.


Slice and print with one perimeter, no top layers, no infill.

I use PLA with 0.2 mm layer thickness, and a 0.4 mm nozzle. With 40 mm perimeter speed (and active cooling) a 10 cm high vase takes just over one hour to print.

Slic3r complains about a hole, because the top surface is missing from the uploaded stl:s. However the result is fine.
The reason is that this way I get an object which is displayed with thin walls, but Slic3r views it as a solid object so you can still slice it with fine control over the wall thickness (number of perimeters in the slicer settings).
The downside is of course that it is no longer a solid object, but Slic3r does not seem to mind (much).

The stl files are generated by the included python scripts:
Install Python 2.7.
Unzip vasegenerator.zip.
Run vasegenerator.py

To generate solid solids, with top surfaces, just change the parameter "top" to True in the function "gen".

It would be great to see more designs based on this, so I'll give a few hints to get you started:

  • The "gen" function takes as input a number of steps (the resolution) and a polygon generator function.
  • The polygon generator function will be called once per step with a value which increases from 0 to 1. It must return a polygon with the same number of segments each time.
  • There is one polygon generator function for each vase. Typically a polygon is created using some primitives described below, then a z-component is added to make the vase rise, and possibly some rotation arounds the z-axis.

I have used a few "turtle graphics" primitives to generate the polygons, but you can generate polygons any way you like.
Here is an overview:
koch, circle, square, gear: Generates "turtle" output.
bevel: rounds corners by inserting short segments.
turtle: Converts "turtle" output to a polygon.
morph: Blends different polygons or turtle outputs.

NB: One or two of the vases fold into themselves (intersecting facets), but slic3r handles it without complaint.

More from Decor

view more

All Apps

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

Quickly Scale, Mirror or Cut your 3D Models

App Info Launch App

Hi, can you modify the script to create lamp shade? thank you

Hi, that's not really possible due to how the geometry is constructed. But just drill a hole in the base and you're done. Have a look at my other things.

Thanks for your answer, going to look at both.

I cant seem to get the script working. I want to make the Gear vase, 200% larger than the STL. and with 2mm thick walls and base. How do i do that? My goal is to print it in wood PLA and have a workable plant pot that looks cool. These designs are by far the most stylin i have seen

Thanks! Well, the wall thickness is not controlled by the script anyway. You control it in the slicer instead, by number of perimeters, loops or wall thickness or whatever your slicer likes to call it. Scaling can usually also be done in the slicer.

Wow, I really love your models. They look very good !!!
Printed one already and no leaking or what so ever.

Thanks for sharing !!!

Wow excellent vase!

Hello, good job! what software use you for drawing this vases ? Thank you. Mat

Hi, see the instructions. Full python source code is included.

After one hour there was no leaking.

Water testing:


How is it a vase with no hollow middle? Can someone help??? I am VERY new at this!

use no infill.

use no infill.

I agree there is no flat bottom. I would love to learn the whole code from the developer. I have tried to figure it out but with little success. Would really appreciate. Thanks in advance

I'm not entirely sure I understand what you mean, but I suspect that it is due to the model not being solid.
Try re-generating the stl:s as solids by changing to top=True. See the instructions for more details.

If you scroll down in the comments, I gave a brief code intro to QuentinT. Otherwise the general idea is also explained in the instructions. I believe a good understanding of the stl file format is essential too.
Code-wise it's just a hack, so I apologize for the lack of comments and structure.

Just curious is it just me or is there no flat bottom?

Hello! My name is Sara and I'm with Beartown Inc. (notjustprototypes.com). We are interested in discussing some ideas with you about your vase designs. Would you email me at sara(at)beartowninc(dot)com ? Thank you!

These pieces are beautiful. You are very talented. Keep up the good work!

Thank you!

Great thing to print. I have printed these up to 1100mm high. http://www.thingiverse.com/make:94668

Scripted vases
by se7en

Very cool, thanks for posting.

I'm a complete noob when it comes to 3D printing. I've no idea how to use Slicer software. I was wondering if anyone had tried printing this on a Cubify CubeX and if so, how do i get the vase to be hollow in the middle? (i assume that's what the Slicer is for).
Any help would be much appreciated, as i have no idea how to print these models with a hollow middle.

Did you get any clarification on your comment? I do not know how to print with a hollow middle, either!

I think people are having issue printing this because the normals of the inner surface (inside of the cup) are pointed in the wrong direction. Some slicers try to correct inconsistant normals at slice time and some don't. I'm assuming Slicer silently changes the normals which is why ="thingiverse-0ddfce009feef8de73f1d781e16290ad:disqus" href="http://disqus.com/thingiverse-0ddfce009feef8de73f1d781e16290ad/hakalan didn't have any issues.

There is no inner surface. However, since the top surface is missing, it looks that way in most viewers. This is intentional.
The slicer may or may not "repair" the part by adding a horizontal top surface, but it does not matter to the slicing process, since every horizontal slice is a valid polygon. It works well with the slicers I ever use: slic3r, cura and kisslicer. As noted in the instructions, it is possible to generate proper solids from the included scripts if problems arise.

I am trying to generate code by using the Classic on MakerWare but it let the bottom open and close the top of the vase. Any idea how to fix this?

I tried the ribbon 2 one I thing that the ribbon is spiral, Did you have to print using support, mine failed lastnight. http://www.ustream.tv/recorded/44567970http://www.ustream.tv/recorded...

No, support should not be required for any of these vases. From your video it seems there are a few layers with poor extrusion, which causes the entire thing to shear off later during the print.
It could be related to this particular model, because it does have issues with self intersecting surfaces (I got a bit overenthusiastic with the folds), so it could upset the slicer and cause it to give "unexpected" results. I think this is the only one with this issue though.

BTW absolutely love these designs!


So I sliced the Stripe2, Stripe3, and Classic files with Slic3r, all of them came up with 200-400 errors and 3-5 hours of printing time depending on size (one scaled at 75% and the rest left as is). I set the Slic3r settings following what is in the instructions. I was wondering if this length of printing time is correct? I'm using a Prusa i3.

I was also wondering what the smallest size anyone has tried printing any of the vases, I like doing scaled down versions before doing full size ones.


The cause of the errors is described in the instructions. That should be all right. There is one important aspect which is easy to miss. Slcers typically lower the printing speed for vase prints due to the minimum layer time (under cooling in Slic3r). Skip this and use a fan instead, and you will bring print times down a lot.

Thanks! I have a fan attached to my extruder to keep my Magma hot end from jamming. I turned off the cooling in Slic3r, now just waiting for the gcode to finish up.

Is using the spiral vase option in Slic3r recommended with these vases? Thanks!

Well, it gives a bit better finish, but in general I'm not sure it's worth the effort. It has a tendency to cause problems as well...

Good to know :) Thanks!

why is the ribbon one stl trying to infill the whole thing for me? haven't had this problem with any other item on here..

to fix that change density to 0%

Same here. I let it print over night only to discover that it filled the entire thing (stripe 1)! Never had this problem with any other model on here. Wasted soooo much plastic -_- Hakalan, what did you use to model these things??

Ouch. It's a Python hack! Details on how to slice correctly are in the instructions.
The models should be treated as solid, even though they appear not to be...

No idea. I never had this problem, and they should all be the same.

Great work here. I've been playing with your scripts, and they are very cool. I've made some of my own designs and they look great.

slic3r handles the stl files without any problems, but it does have to fix them. openSCAD, too, complains that "Object isn't a valid 2-manifold!". I've made some minimal designs and tried to figure out what it's complaining about, but I can't figure it out.

Do you know why the scripts make illegal objects? Have you been able to figure it out? It's not causing problems, but I'd like to understand it none the less.

Thanks! I would really like to see what you have designed.
I assume you include the top surface, and avoid self-intersecting shapes? Otherwise the slicer is entitled to complain.
I am not aware of any other problems, except that the triangluator may not always handle tricky shapes perfectly.
Try loading the stl into Kisslicer or Cura, which show any offending surfaces or edges on the model.

Yeah, it was the top. When I added the top, all errors disappeared.

Hi, I really like these vases, and I was wondering if you could give me some help modifying them. I'm trying to make the ribbon2 vase larger diameter, but the same height to use as a pot for a plant. I brought it into netfabb and stretched it in the X and Y directions, but this left some harsh overhang angles that were impossible to print. I would instead like to add a few more ribbons while stretching the diameter to reduce the angles a little bit. I have no clue which numbers to tweak though, as they are all just letter variables. Thanks!

Sure! As you suggest, increasing the number of ribbons is one possibility. This is done easily by increasing the first argument to the gear function. But then you still get steep overhangs because the diameter is proportional to the number of cogs. I tweaked some of the parameters to reduce this effect and got this: http://www.thingiverse.com/thing:145543http://www.thingiverse.com/thi...

To understand what is going on, I recommend starting with a simple shape, for example:

def simple(i):
z = Vector(0,0,i*100.)
t = bevel(gear(10,8,8,4,90),5,0.5)
poly = [p+z for p in turtle(t)]
return center(poly)

Then add "perturbances" to see what happens. The magic is in the arguments to gear:
gear("number of cogs", "length of cog base", "length of cog tip", "cog depth", "cog angle")

If I remember correctly... :)

Scripted pot
by hakalan

Thanks for the explanation! I will definitely do some fooling around with these

Thanks for sharing the script as well as the STLs. Have been printing a few over the past few days and the hardest part is choosing which to print next!

Wow, you printed one at 200% scale! At that size, you should probably run the script with increased resolution (see instructions) to get better surface finish, at least for some of the models.
By the way, I've come to realize that a delta printer must be ideal for printing vases. That will be my next project... :)

That's one of my next "to do"s. Get in and figure out your script.
You're right, a delta printer does a pretty good job of printing cylindrical prints quickly and accurately. Having said that I think the deltas are better for just about everything. Less places for mechanical error.
I based my delta on makerslides rails and have been happy with the results so far.

just made one, i was surprised with how great it looked. thanks for making this.

Thank you for uploading these, the designs are stunning.

Thank you! Your print looks great! I really like that color.

Have you printed all of these generated designs? In the second picture? If yes, which material and 3D printer?

Yes, the first and second pictures show most of the designs printed in PLA on my Mendel-Parts Orca 0.4 upgraded with a hotend from http://E3D-online.comE3D-online.com.

This is incredible.

You just coded up a vase. How cool is that?

Wow.... I always wanted to write my own triangulation-code in Octave/Matlab but never got the patience. I will use your python code as inspiration and motivation.

Thanks! Actually, I just updated the triangulation code because I found a much nicer implementation in a forum post (see http://triangulate.pytriangulate.py). The previous one implemented the same ear-clipping algorithm, but it contained some unnecessary optimization which made it complicated to read.

Just FYI, if you want a hollow object with control over the wall thickness you can build it as a solid, watertight mesh with a flat top, and then in Slic3r specify that it should use 0.0% infill and build zero top solid layers. I do this a lot when making vases and pencil holders and the like, because I can still specify that I want a thick bottom (usually I do 4-6 solid layers) for stability but maintain those nice thin walls with no janky infill.

Hi! Yes I know. But I was annoyed that it is not shown as a hollow vase when looking at the model in a viewer. Omitting the top surface was just a hack to get both the viewers and the slicers to do what I wanted.


I'm looking at the ribbon one in meshlab and I see that it has no thickness. Its a 2 dimensional surface. I'm going to need to do some modification on it to print on an Afinia. Otherwise, the printer software will assume that the mouth is a hole and close it, printing the entire vase as a solid filled object.

Just check "shell" on the printer driver, I've did it and my Afinia printed the vases fine. I'm gonna upload the photos later.

Hi! Yes, that's actually the idea, kind of. The slicer thinks it is a solid object. However, you turn it into a vase by telling it to skip infill and top layers. Most slicers allow you to do this.

The advantage of this method is that you have complete control over wall thickness. I print these vases with a single perimeter, which is almost impossible to achieve otherwise.

I can recommend the very latest version of Slic3r (0.9.10b) with its new spiral vase feature (a.k.a "Joris" in Skeinforge).

Not sure if you noticed or not, but the 0.9.10b has a defect in the "spiral vase" settings that's causing a nasty artifact - see https://github.com/alexrj/Slic3r/issues/1251https://github.com/alexrj/Slic...

Hmm, yes I did notice that there is a discontinuity where the layer change would have been, and assumed that Slic3r's spiral vase mode still uses horizontal slices to calculate the perimeters, meaning there is still a "virtual" layer change where the perimeter shape may change abruptly. Nevertheless, the result is a lot better than the standard settings (on my printer at least).
Nice print by the way!