A little Blender script to rescale and export 3D objects in multiple sizes

Did you ever need to scale your object in multiple dimensions and export it to an external format, like .stl ?

There is many cases where it is useful:

  • To provide XS, S, M, L, XL (…) versions of the objet.
  • When making rings. You may model a size 6 ring and want to scale it to sizes 1 to 16…
  • When making a reduced model. You may want to make several scales available: 1:12, 1:24, 1:48, train standards OH, G, N…

If you need it, you will find a few useful Blender scripts in this article.

Blender is an Open Source 3D suite that you can download for free. It supports scripting in Python language. Well… It is the first time I write a script. Sambler and JCNouveau kindly helped me to settle this.

 

Case 1: resizing an object using a predetermined set of scale factors

Let’s says that you modeled a table scale 1 and that you want to provide 1:12, 1:24, 1:48 reduced models.

  • Download the blender file with the script here
  • Copy it to the directory where you want to save your exports
  • Modify the scales array to fit 1/12, 1/24, 1/48
  • File > Import to add your model to the scene
  • Select your model (right clic)
  • Clic on “run script” on the down left
  • That’s it, 3 new scaled .stl files were created in your directory

 

Case 2: resizing an object to a predetermined set of target dimensions

Let’s say that you made a 12mm width object and that you want to scale it to 16, 20, 24mm.

Of course, you could make a cross-multiplication. But isn’t it way more comfortable to let the machine doing the calculus?

  • Download the blender file with the script here
  • Copy it to the directory where you want to save your exports
  • Modify the target dimensions to S=12, M=16, L=20, XL=24
  • Replace the original size by “S”
  • File > Import to add your model to the scene
  • Select your model (right clic)
  • Clic on “run script” on the down left
  • That’s it, 4 new scaled .stl files were created in your directory

 

Case 3: generate all ring sizes from one ring

Let’s say you modeled a ring in Size 7. You want to generate all other sizes by scaling this ring.

Nb : If you encounter too thin or too thick walls problems, consider cutting it in 2 or more. I.e. generating half the sizes from scale 2 and half the sizes from scale 7.

 The script is exactly the same as the previous one. Plus, it has all the US ring size already implemented with inner diameters. Download it here. Follow the same process and change the model_size parameter to 7.

 

Ii It can help… Feel free to modify or distribute it !

By | 2018-02-22T23:38:36+00:00 février 22nd, 2018|Categories: Outils numériques, Ressources et savoirs|0 Comments

About the Author:

Crée de nouveaux produits. Blog sur le design, l'industrie, l'innovation...

Laisser un commentaire