Introduction to 3D modeling using openScad


openScad Basic Concepts


This is how the new openScad (version v2019.05) looks like:


Basically openScad has three windows, the one at the left [1] is where you write the script or code, on the upper right windows [2] there is a rendered figure, that is what your code produce and finally, at the small console [3] where you can see warning and some information about your design. Needless to say you can hide, resize and locate windows as you want.

The first thing to notice is that the rendering window has three axis (X, Y, Z) and that’s the basic concept of any 3D software. You will work with coordinates over those axis to position or translate your parts, the origin is 0, 0, 0 and sometimes it is convenient to locate objects there and then move them to other places, specially if you play with rotations, believe me, you can get really confused at the beginning while rotating objects far from the origin.

openScad has a few simple elements you will have to learn. openScad has some primitives to position things, draw basic shapes and some control structures like the ones you can find in C (if, for, etc), we will cover them all.

As you can see in the picture you can include comments a la C and C++, include other files where you could have common definitions but the key elements of openScad are the modules. Modules are a kind of function where you define reusable things, modules can have parameters which is quite convenient for reusing components. As an example of the former you could have a module to render (or draw) a screw and have a few parameters about the size of it, another handy thing is that parameters can have default values.

To start with something simple, we will drop a few commands to see what happens. Make it sure you have openScad properly installed and start a new design. On the code window just write:

cube (size= [10, 10, 10]);

Then hit the icons highlighted in red on the figure above and you will see your cube rendered in the screen. That Icon will do a fast rendering, if you want the final rendering with the icon next to it. What is impressive about this is that you can already generate a 3D printable design, hit the STL icon and that file will be ready to be sent to Cura or any other 3D printing software (this version includes the function to send the design to the printer but I didn't test it yet). If your table is not stable, now you have a simple 3D printed solution!


There are few things you can render, examples of that are cylinders and complex polygons where you can specify each point of them. In this series of posts I will share some information and findings to help you make functional cases or part for your devices. If you are curious and anxious like me, you can find a cheat sheet right here.


To be continued soon.

13 views
  • Twitter Social Icon
  • Mail Icon

You are welcomed - WildEdge - BCB

11

JAGUARS

CANNOT LIVE

WITHOUT A HOME

SAY NO TO

DEFORESTATION