3D PRINTERING: MAKING A thing WITH OPENSCAD

This week, we’re starting off with OpenSCAD, a 3D modelling program that’s a lot more like programming than drawing. A great deal of beneficial 3D printable objects – including the parts for a great deal of RepRaps – are created in OpenSCAD, so ideally by the end of this you’ll be able to style your own parts.

This isn’t indicated to be a total tutorial for OpenSCAD; I’m just demoing SCAD sufficient to develop a basic part. next week I’ll a lot of likely be creating a part with AutoCAD, however if you have an concept of what software application tools I must utilize as a tutorial to make a part, leave a note in the comments. inspect out the 3D Printering guide to making a part with OpenSCAD below.

First, some basics
The fundamental concept behind OpenSCAD is constructive solid geometry this is a modeling method that utilizes fundamental primitives such as a sphere, cube, or cylinder together with fundamental boolean operations to produce an object. utilizing words to explain this method is just terrible, so here’s a very, extremely short example. To the ideal is a photo of two objects produced in OpenSCAD, a cube as well as a cylinder below is the code, which you must be able to comply with easily:

před

1.
2.
3.
4
5
6.
7.
module example() {
     sphere(10);
     translate([15,15,-10]){
          cylinder(h=20, r=5);
     }
}
příklad();

Brain dead simple, right? We’re just producing a ball with a radius of 10 as well as a cylinder with a radius of 5 as well as a height of 20. We’re equating the cylinder in area by 15 units in the x as well as y axes, as well as down 10 units in the z axis. Here’s where constructive solid geometry comes in. We can integrate those two 3D primitives by utilizing the union() command like so:

1.
2.
3.
4
5
6.
unie(){
   sphere(10);
   translate([0,0,-10]){
      cylinder(h=20, r=5);
   }
}

In OpenSCAD, the union command is implicit. a lot of of the time, you don’t requirement it, except in situations where you’re integrating other boolean operations. There are two a lot more boolean operations we can utilize – difference, or just subtracting one item from another, as well as intersection. right here is the difference command:

1.
2.
3.
4
5
6.
rozdíl(){
   sphere(10);
   translate([0,0,-10]){
      cylinder(h=20, r=5);
   }
}

And the intersection command:

1.
2.
3.
4
5
6.
průsečík(){
   sphere(10);
   translate([0,0,-10]){
      cylinder(h=20, r=5);
   }
}

That’s constructive solid geometry. With these boolean operations, you can make just about anything. I mean it’s time to demonstrate that, huh?

Our Thing
considering that I’m going to be doing a number of tutorials of exactly how to develop a ‘thing’, it makes sense to have one basic ‘thing’ to make with these tutorials. selecting an item to copy was suddenly hard, however after pulling out a few books on engineering drawing as well as drafting, I settled on the above ‘thing’, from engineering drawing (French, 1929). If you’re wondering why I selected something so strange out of a book so old, just remember: the people who created the Apollo spacecraft discovered drafting as well as drawing with this book. Also, this is my column, so offer with it. By integrating a few cylinders as well as cubes it’s relatively simple to produce a extremely fundamental shape of what will ended up being our completed part. The preliminary code is below, together with a render:

1.
2.
3.
4
5
6.
7.
8.
9.
10.
11
12
13
14
15
16
17
18
19
20
module thing()
{
rozdíl(){
        cylinder(h=7, r=19);
        cylinder(h=7, r=8);
     }

     translate([-23,10,0]){
        cube([46, 10, 7]);
     }

     translate([-10,-26,0]){
        cube([20, 16, 7]);
     }

     translate([-10,-26,7]){
        cube([20,4,7]);
     }
}
věc();

Again, this is just the beginning of our part. we’re only utilizing cubes as well as cylinders here. If you’re wondering why the dimensions we’re utilizing are so odd, it’s since the original part (published in my fourth edition copy of Engineering Drawing in 1929, however it might be from the very first edition published in 1911) was created in eighths of an inch. I’m just composing my OpenSCAD so one system is equal to one eighth of an inch. When we print this out, we can repair any type of size problems just by multiplying. To surface up the primary body of our part, we requirement to add a few cylinders on the flange. One thing that’s truly awesome about OpenSCAD is the capability to produce little parts as well as later integrate them with the union command. Here’s a collection of cylinders for our flange:

1.
2.
3.
4
5
6.
7.
8.
9.
10.
11
12
13
14
15
16
17
18
19
20
module flange() {
     rotate([270,0,180]){
          translate([-10,6,-4]){
rozdíl(){
unie(){
                   cube([20,12,4]);
                   translate([10,0,0]){
                      cylinder(h=4, r=10);
                    }
                 }
                 translatE ([10,0,0]) {
válec (H = 4, R = 3,5);
otočit ([0,0,90]) {
válec (H = 3, R = 7);
}
}
}
}
}
}

Protože OpenSCAD je obecně jen kód, můžeme tento modul hovořit pouze na příslušné oblasti v kódu. To můžete vidět v dokončeném kódu, pár se posouvá dolů. Ideální nyní Naše část se zdá být takto: Teď jediná věc delegována přidat do této věci je 3/8 “slot na primárním těle, stejně jako několik filetů. Upustím filety jako cvičení čtenáři, nicméně zde je kód, stejně jako fotografie pro výslednou část:

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21. \ t
22.
23.
24.
25.
26.
27.
28.
29.
30.
31. \ t
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
Module věc ()
{
rozdíl(){
válec (H = 7, R = 19);
válec (H = 7, R = 8);
otočit ([0,0,225]) {
Přeložit ([0,1,5,0]) {
kostka ([20,3,7]);
}
}
}
Přeložit ([- 23,10,0]) {
kostka ([46, 10, 7]);
}
Přeložit ([- 10, -26,0]) {
kostka ([20, 10, 7]);
}
Přeložit ([0, -26,24]) {
příruba();
}
}

modulová příruba () {
otočit ([270,0,180]) {
Přeložit ([- 10,6, -4]) {
rozdíl(){
unie(){
krychle ([20,12,4]);
Přeložit ([10,0,0]) {
válec (H = 4, R = 10);
}
}
Přeložit ([10,0,0]) {
válec (H = 4, R = 3,5);
otočit ([0,0,90]) {
                          cylinder(h=3, r=7);
                       }
                 }
             }
         }
     }
}

věc();

Takže tam půjdeš. A thing, produced with OpenSCAD. Is this the conclusive guide to creating stuff with OpenSCAD? No, however it’s a lot more than sufficient to get your feet wet. It’s sufficient so you can style your own parts as well as send them over to a 3D printer. next week, I’ll be making the exact same part in AutoCAD, which must equate well to other CAD packages. If you have any type of wish to see this part made with one more 3D style package, leave a note in the comments.

Leave a Reply

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

Related Post

Design mlýn CPUDesign mlýn CPU

Existují v podstatě dvě metody pro výpočet dat. Nejprve je s DSP, čip, který provádí extrémně specializované funkce na omezené sadě dat. Jedná se o velmi levné, mají pozoruhodný výkon