3D Printing

Laurent software Tutorials and 3D models

Modelize your first 3D shape with openSCAD #5

5. Modules

Modules are used to define an object. It’s a very useful feature you must use in every of your projects. The principal advantage is to avoid code duplication and to have a more ridable code.


module Name(parameters) {

     “your code”



And to call the module: Name(parameters);



module Ecroue(h,r){



        translate([0,0,-1]) cylinder(hauteur+2,r*0.7,r*0.7);






6. Other Functionnalities

Now you know all the basic functionalities there is a multiple of over one that can be very useful I can’t list them all but there is some that can interest you if you want to go further in openSCAD.


a. Text

To include text, you have 3 variables:

  • text(“myText”,”myStyle”) include your text
  • resize([x,y]) change the size of the text
  • offset(number) the width of the text



resize([30,10]) offset(0.5) text("Tutorial","Arial:style=Bold");



b. Minkowski

Minkowski is a cool functionality that will allowed you to do shapes that are very hard to do with difference(). It will do very elegant shapes like this one:



minkowski() {

   hull() {


       translate([0,0,20]) cylinder(1,8,8);






7. Final Exercises


1) Try to reproduce the previous shape (Exercise 3) with modules. (correction)


2)Do a key ring with a module for the key and on for the ring. In this key ring put text encrusted with a hull shape. (correction)


8. Conclusion

I hope you liked my tutorial and that it will help you for you 3d printing project. If you want some idea for your first shapes to print go check my creation in 3D models or on thinginverse who is a very cool website with a large database of 3D object created by the community.

I will just finish with a topic on features I would personally like to be implemented on my favorite 3D creation software. For my part it will be very simple things like scroll past end, parenthesis and brackets handle to go faster when tiping.


1 Comment

  1. Hello everyone 🙂 I’m pretty new to 3d printing and I have a lot of questions on the subject, so I hope you will not get mad at me for asking here at least a few of them. I think before I’ll get seriously into sculpting I should focus on the software I’m going to use, and that’s what I’d like to ask you about. Mainly, should I start with the most simple and crudest program there is or would it be better to start on something more complicated? I’m worried that I’ll get some undesirable habits while working on simpler software. My second question is about the program as well: should I search for software that will allow me design and slice it in it, or should I use a separate program for each of them? Does it even make a difference? Weirdly, I couldn’t find the answer to that, as it seems like most blogs want to focus on the very basics (like what is 3d printing and so on), and while the answers to those questions are fine, it seems like no one wants to go into the details (it looks like some of them even steal from each other! I swear I’ve read the same answers to the same questions on at least 3 different websites) but I’m getting off-topic… The last question is about 3d pens. Would it be possible to somehow convert whatever I draw with a 3d pen to a 3d model in a program? For example, if I’ll draw a car with 3d pen, would it be possible to get its design in a software? I’m not sure how that could even work, but the very idea sounds interesting to me. I apologise that I’m using your content to ask questions, but I hope you’ll understand and help a rookie like me. Anyway, thank you for posting. I did learn something from this and that’s always appreciated. Thank you, and I hope to hear back from you very soon 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *