Wednesday, March 16, 2016

More designing and 3D printing


The last couple of weeks I've been busy mastering 3D modeling programs and bringing my creations to life with my Hephestos 3D printer. In this entry I'll share some of my creations and how they were made. For 3D modeling I started with OpenSCAD in the beginning of this year and later started using FreeCAD. The reason for using FreeCAD is that with more complex design in OpenSCAD it is easy for me to get lost in a large script. Yes, the learning curve of FreeCAD is steep but eventually it's easier for me to create more complex models in this program than in OpenSCAD. For simpler models I still like OpenSCAD better.

MineCraft Creeper keychain made with OpenSCAD.

My youngest son is a fan of Minecraft and I suggested to him to make a creeper keychain. With OpenSCAD I could use simple primitives for head, body and legs. By parameterization of the script I can easily change the dimensions of the creeper.

body_height = 40;
body_width1 = 20;
body_width2 = body_width1;

feet_height = 20;
feet_width1 = 20;
feet_width2 = 10;

head_height = 20;
head_width1 = 20;
head_width2 = 26;

module body(){
    cube([body_width1,body_width2,body_height], center = true);

module feet(){
    cube([feet_width1,feet_width2,feet_height], center = true);

module head(){
    cube([head_width1,head_width2,head_height], center = true);

Click here if you want the whole OpenSCAD source file.

Minecraft creeper on the print bed of the Hephestos 2.

Foot for stepladder created with FreeCAD.

My father's stepladder had a broken foot and he asked me if I could made a new one for him. I used FreeCAD to design it using the part design workbench. The part design workbench is probably the main tool in FreeCAD while creating 3D models. Here is the FreeCAD file.

3D-model of the foot made with FreeCAD.

Dice made with FreeCAD and OpenSCAD.

A FreeCAD tutorial series on YouTube, which I highly recommend, contains the modeling of a dice. I did this tutorial and then created the same dice in OpenSCAD just to get some idea of the difference between the two programs. The shape of the dice is easily made by the intersection of a cube and a sphere.

        cube([dice_size,dice_size,dice_size], center = true);

Next every face of the dice is covered with the dots. Click here if you want the OpenSCAD source file of the dice.

Large dice on the print bed of the Hephestos 2.

Surface generator with OpenSCAD.

While making the creeper I had the idea to add a 'blocky' Minecraft style surface instead of a smooth surface. This idea resulted in some preliminary script that added a 'blocky' surface to a simple cube. The core of the script is this:


A cube is drawn where the height (z-axis) is determined by a random number between rands_min and rands_max. This is an example where OpenSCAD shines. With a couple of lines a seemingly complex model can be created (especially when the user is familiar with mathematics and programming). Here is the OpenSCAD source file of the 'blocky' cube.

3D model made in OpenSCAD of a cube with a 'blocky' surface.

No comments:

Post a Comment