3D PRINTERING: MAKING A thing WITH OPENSCAD

author
4 minutes, 45 seconds Read

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:

prima

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

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.
unione(){
   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.
differenza(){
   sphere(10);
   translate([0,0,-10]){
      cylinder(h=20, r=5);
   }
}

And the intersection command:

1.
2.
3.
4.
5
6.
intersezione(){
   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?

La nostra cosa
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()
{
differenza(){
        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]);
     }
}
cosa();

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]){
differenza(){
unione(){
                   cube([20,12,4]);
                   translate([10,0,0]){
                      cylinder(h=4, r=10);
                    }
                 }
                 translate ([10,0,0]) {
cilindro (h = 4, r = 3.5);
Ruota ([0,0,90]) {
cilindro (h = 3, r = 7);
}
}
}
}
}
}

Poiché OpenScad è generalmente solo codice, possiamo semplicemente chiamare questo modulo nell’area appropriata nel codice. Puoi vedere questo nel codice finalizzato a poche scorriere verso il basso. Ideale ora la nostra parte appare così: ora l’unica cosa delegata Aggiungi a questa cosa è lo slot da 3/8 “sul corpo primario, così come alcuni filetti. Lascerò i filetti come esercizio del lettore, tuttavia ecco il codice così come una foto per la parte risultante:

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
Modulo cosa ()
{
differenza(){
cilindro (h = 7, r = 19);
cilindro (h = 7, r = 8);
Ruota ([0,0225]) {
Traduci ([0,1.5,0]) {
cubo ([20,3,7]);
}
}
}
Traduci ([- 23,10,0]) {
Cubo ([46, 10, 7]);
}
Traduci ([- 10, -26,0]) {
cubo ([20, 10, 7]);
}
Traduci ([0, -26,24]) {
flangia();
}
}

Flangia del modulo () {
Ruota ([270,01.8]) {
Traduci ([- 10,6, -4]) {
differenza(){
unione(){
cubo ([20,12,4]);
Traduci ([10,0,0]) {
cilindro (h = 4, r = 10);
}
}
Traduci ([10,0,0]) {
cilindro (h = 4, r = 3.5);
Ruota ([0,0,90]) {
cilindro (h = 3, r = 7);
}
}
}
}
}
}

cosa();

Quindi eccoti. Una cosa, prodotta con OpenScad. È questa la guida conclusiva per creare cose con OpenScad? No, tuttavia è molto più che sufficiente per bagnare i piedi. È sufficiente in modo da poter stilare le proprie parti oltre a inviarle a una stampante 3D. La prossima settimana, farò la stessa identica parte in AutoCAD, che deve equiparare bene ad altri pacchetti CAD. Se hai qualche tipo di desiderio di vedere questa parte fatta con un altro pacchetto stile 3D, lasciare una nota nei commenti.

Similar Posts

Leave a Reply

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