1 00:00:00,560 --> 00:00:06,559 Well, today we are going to talk about how to use OpenSCAD. 2 00:00:06,559 --> 00:00:21,559 OpenSCAD is an open source application that lets us create different figures to be printed within the printer, for example. 3 00:00:21,559 --> 00:00:29,559 Nowadays it is a very interesting one because we are developing different things in this case. 4 00:00:29,559 --> 00:00:42,799 As always you must download it and then when you have uploaded the folder and zip it and inside the folder 5 00:00:42,799 --> 00:00:56,909 you can have different options to open the OpenSCAP in your computer 6 00:00:56,909 --> 00:01:21,189 The environment for OpenSCAP is quite easy. It has two parts. You can change if you want the environment. You can change if you want to change the environment. You can change the environment. 7 00:01:21,189 --> 00:01:29,370 But in any case, you have in this part the result of the things that you write in this other part. 8 00:01:29,829 --> 00:01:31,030 You use command. 9 00:01:31,730 --> 00:01:34,030 You have three main figures. 10 00:01:34,250 --> 00:01:40,760 One is a sphere, the other is a cube, and the other is a cylinder. 11 00:01:41,959 --> 00:01:44,120 What are the parameters of one sphere? 12 00:01:44,340 --> 00:01:47,439 One sphere just only has one parameter, which is its radio. 13 00:01:47,439 --> 00:02:03,030 so just only type the radio for this one, semicolon, and click in the 5 key 14 00:02:03,030 --> 00:02:10,030 so I can see the result of this command 15 00:02:10,030 --> 00:02:14,979 this is the result, it's an sphere 16 00:02:14,979 --> 00:02:20,979 Instead of an sphere, I can create also a cylinder 17 00:02:20,979 --> 00:02:27,740 Cylinders have two bases and a weight 18 00:02:27,740 --> 00:02:38,740 So, for example, weight 10 and two bases must be one 10 and the other 10 19 00:02:38,740 --> 00:02:42,740 And the result is this cylinder 20 00:02:42,740 --> 00:02:52,740 If you change any parameter, for example the width, the result is different 21 00:02:52,740 --> 00:03:03,180 Well, cylinder let us also change the parameter, create another figure, for example if one of the base is O 22 00:03:03,180 --> 00:03:10,180 instead of cylinder what you have is a cone 23 00:03:10,180 --> 00:03:15,180 this is a cone, because one of the base is O 24 00:03:15,180 --> 00:03:24,180 later we are going also to know how to create for example different types of pyramids 25 00:03:24,180 --> 00:03:34,180 because we can add it another parameter which you can change with $fn and then the number of faces 26 00:03:34,180 --> 00:03:47,180 for example you can add it 6 faces and what you have instead of cone is a pyramid 27 00:03:47,180 --> 00:03:59,509 something similar happens with cube 28 00:03:59,509 --> 00:04:27,459 cube have indeed three main parameters, which are the width, the height, and the length. 29 00:04:27,459 --> 00:04:40,819 So if you, for example, type in this way, the result is this. 30 00:04:40,819 --> 00:04:50,839 So apart of these main figures, that are the base of the 3D design, you can also move something, 31 00:04:50,839 --> 00:04:59,800 for example, there are two main movements, which is translation and rotation, for example, 32 00:04:59,800 --> 00:05:14,629 If I want to translate inside, I need to write the translation. 33 00:05:14,629 --> 00:05:20,949 For example, I'm going to translate 0010. 34 00:05:20,949 --> 00:05:34,079 If I do it this way, no, sorry, because it's this one, if I do the translation, I change. 35 00:05:34,079 --> 00:05:39,079 So maybe if you want, you can center this figure. 36 00:05:40,100 --> 00:05:44,079 Apart from the translation, you can do rotation 37 00:05:52,839 --> 00:05:55,079 with this one. 38 00:05:55,079 --> 00:05:58,680 So this is the rotation, if you want you can, 39 00:05:58,680 --> 00:06:03,579 for example, rotate 30, that is the result. 40 00:06:03,579 --> 00:06:08,579 So we have, the main idea is that you have 41 00:06:08,579 --> 00:06:18,579 You have the simple things, the simple elements, as a putlet you can join different elements in order to have the figures that you want 42 00:06:18,579 --> 00:06:30,579 So finally we can also use one interaction between two figures, for example 43 00:06:30,579 --> 00:06:42,579 I have a cube and I want to do a hole in this one, so to do a hole I need a cylinder 44 00:06:42,579 --> 00:07:02,500 A cylinder will have a very large, very light weight and very short diameter 45 00:07:02,500 --> 00:07:11,220 so this is the cylinder if i sorry but because semicolon this is the result well in this case 46 00:07:12,100 --> 00:07:19,860 we have two main figures we can use this this figure we can join which is the one operation 47 00:07:19,860 --> 00:07:26,579 the the union of these and have just only a one one figure if we want 48 00:07:26,579 --> 00:07:41,579 So another thing that I can do is to draw a hole, if I do the join, I can join for example with this command, union 49 00:07:41,579 --> 00:08:06,199 So now this is just only one figure, that's the main idea 50 00:08:06,199 --> 00:08:13,199 If you want to translate this or do something with it, you can do it 51 00:08:13,199 --> 00:08:44,440 Or instead of union you can do a differences. But I think it's better if this is smaller. So I'm going to translate in the middle of this one. That can be used, can be used, can be, do it. 52 00:08:44,440 --> 00:08:47,360 for example, center the cube. 53 00:08:58,320 --> 00:09:00,379 And obviously what happened now 54 00:09:00,379 --> 00:09:04,340 is that the cylinder must be bigger 55 00:09:16,679 --> 00:09:21,679 and we must translate in order to pass through this one. 56 00:09:25,740 --> 00:09:27,399 So if I want to translate, 57 00:09:27,399 --> 00:09:57,950 the translation is the translation in z-axis, so it must be something like this 58 00:09:57,950 --> 00:10:10,679 so now the drill is through it 59 00:10:10,679 --> 00:10:15,679 so if now I do the differences, the difference 60 00:10:15,679 --> 00:10:25,240 if now I do the difference 61 00:10:25,240 --> 00:10:51,269 the result is that you have you have a hole in the other so so now we have you 62 00:10:51,269 --> 00:11:00,370 can do also the interjection so now before doing more things you should 63 00:11:00,370 --> 00:11:10,370 think about how you can create that, how you can create your own figures 64 00:11:10,370 --> 00:11:15,370 I'm going to do one figure and I give you the tutorial of this figure 65 00:11:15,370 --> 00:11:27,370 this is just only to know how to use OpenSCAD as a simple way 66 00:11:27,370 --> 00:11:52,769 So, this is the first part of it. Second part, we are going to begin with a cube, a cube is not so big, just about a cube, for example, 10, 10, and 10 67 00:11:52,769 --> 00:11:56,769 and it is centered in the middle of the axis 68 00:11:56,769 --> 00:12:04,220 don't forget the semicolon 69 00:12:04,220 --> 00:12:08,220 so I have the first figure 70 00:12:08,220 --> 00:12:18,220 I want that the corner, instead of being so injured, must be smoother 71 00:12:18,220 --> 00:12:24,220 so to do this I'm going also to do an sphere 72 00:12:24,220 --> 00:12:59,620 so I know I have the cube and I have the sphere smaller it is so so big even 73 00:12:59,620 --> 00:13:09,460 though I think I think a little well can be but maybe you know this is too small 74 00:13:09,460 --> 00:13:17,399 this is can be enough because between 7 and I think is it is enough so what I 75 00:13:17,399 --> 00:13:30,399 What I want to do is, in a cube, just only the interjection between the cube and the 76 00:13:30,399 --> 00:13:38,159 sphere, the part of the cube and the sphere that both things, both objects, have in common. 77 00:14:06,009 --> 00:14:10,889 Intersection. So now what we have is a cube 78 00:14:10,889 --> 00:14:24,889 but the corners of the cube are smoother because it's what the sphere and the cube have in common 79 00:14:24,889 --> 00:14:32,889 So now, in this cube I'm going to do numbers, you can do it in any way 80 00:14:32,889 --> 00:14:41,889 There is an application that you can add it in your library and you can write numbers, for example 1, 2, 3, 4 81 00:14:41,889 --> 00:14:52,889 and another application that I recommend is do the difference between the cube and the different spheres 82 00:14:52,889 --> 00:15:03,889 So we are going to do the face in which you have the number 1, that is only just one hole 83 00:15:03,889 --> 00:15:13,889 So to do this I must create an sphere with diameter must be for example 1 84 00:15:13,889 --> 00:15:22,720 Now you can see it because this sphere is inside the cube, so you can see because the cube is opaque 85 00:15:22,720 --> 00:15:30,720 You can change the opacity of the group if you want, but I think in this case it's better if you do the translation. 86 00:15:30,720 --> 00:15:53,500 Where you want to translate, obviously, this sphere is in the middle, so the distance to one of the faces must be 5. 87 00:15:53,500 --> 00:16:29,200 So if I say 5 0 0, maybe I can't see yet, but we are going to try. So here it is, our sphere. Can you see it? Here it is, the S-sphere. It's one point. The S-sphere is here. 88 00:16:29,200 --> 00:16:42,690 you have the sphere, this sphere in the middle of the face you have in number 1, in number 3, in number 5, and in number 5 89 00:16:42,690 --> 00:16:54,370 because you already have 6 faces, so you have this one in number 1, number 3, number 5 90 00:16:54,370 --> 00:17:14,369 My advice is if you are organized enough, for example for number 1 you have this one 91 00:17:14,369 --> 00:17:47,599 You can copy and paste for number 3, that you also have in the middle, but instead of C in this, obviously must be in another face 92 00:17:47,599 --> 00:17:50,180 So must be in this other face 93 00:17:50,180 --> 00:17:57,960 number 1, 3 and 5 94 00:17:57,960 --> 00:18:11,119 but instead of this 95 00:18:11,119 --> 00:18:15,019 must be 5 96 00:18:15,019 --> 00:18:17,099 you also can use a 4 97 00:18:17,099 --> 00:18:21,359 but you are in 4th of SO and I think it's better 98 00:18:21,359 --> 00:18:24,299 so now if I 99 00:18:24,299 --> 00:18:34,299 What I have is 1, 4, 1, 3, and 5. I have this one. 100 00:18:34,299 --> 00:18:49,420 What happened with number 2? Well, for number 2 you can use the same. 101 00:18:49,420 --> 00:18:57,039 I'm going to begin with this one, yes. 102 00:18:57,039 --> 00:19:03,039 But what happened is the translation must be 5 103 00:19:03,039 --> 00:19:10,039 and apart from this you also must have another 5 104 00:19:10,039 --> 00:19:19,019 because they must be in the diagonal 105 00:19:19,019 --> 00:19:26,990 must be 5 and what more? you are here 106 00:19:26,990 --> 00:19:32,990 so now you are going to translate in the face in this angle 107 00:19:32,990 --> 00:19:36,990 so must be 5 in this one 108 00:19:36,990 --> 00:20:07,900 And now 3, 3, 3. So we have this one. So number 1 can be, if you use this type of things, number 3. 109 00:20:07,900 --> 00:20:21,079 So what you want? Now you want that is in minus 5. In order to be in another face. In the face which is in the other side. 110 00:20:21,079 --> 00:20:44,460 and we have this and 3 and here you have minus minus so if you rent every size 111 00:20:44,460 --> 00:21:06,500 we have 2 1 2 so with this 2 you can you can create the 3 because 3 must be here 112 00:21:06,500 --> 00:21:24,119 minus three here is five here is three and in the other is this is three minus 113 00:21:24,119 --> 00:21:39,910 three this is five and this is mean you see it so if you're doing this way 114 00:21:39,910 --> 00:21:50,890 if you're doing this way something happened because I have here and I want 115 00:21:50,890 --> 00:22:02,190 this face so in three it must be five this so now we have one two and three 116 00:22:02,190 --> 00:22:11,950 What happens with 4? 4 is 2, for 4, to create the 4 number 117 00:22:11,950 --> 00:22:36,980 4 is double 2, so is 2, double, in which way it must be double? 118 00:22:36,980 --> 00:22:43,880 Well, firstly, you must create in this phase, this phase is the opposite of 3 119 00:22:43,880 --> 00:22:50,099 So it's the opposite of 3, it must be minus 5 120 00:22:50,099 --> 00:23:09,599 And then you must do the different opposites 121 00:23:09,599 --> 00:23:19,700 One is 3, 3 122 00:23:19,700 --> 00:23:28,539 The other is minus 3, minus 3 123 00:23:28,539 --> 00:23:36,750 The other is minus 3, 3 124 00:23:36,750 --> 00:23:48,599 Oh, oh, oh, I'm going to get to you again 125 00:23:48,599 --> 00:24:04,240 Sorry, I have said something 126 00:24:04,240 --> 00:24:49,160 2, 2 is not good, it's opposite to 1, 1 is 5, so 2 minus 3, and this must be 3, 3, we 127 00:24:49,160 --> 00:25:24,079 have opposite to 1 which is minus 5 I think is the opposite which is this this 128 00:25:24,079 --> 00:25:40,519 is 4 so I'm going to delete 4 and then repeat 4 yes so now the opposite of 1 no 129 00:25:40,519 --> 00:25:58,720 it's not the opposite of one one one one is the opposite of three so is two is minus yeah so now 130 00:26:11,940 --> 00:26:33,809 now so this is two and using two we can create four so i'm going to copy this one 131 00:26:33,809 --> 00:26:44,190 but 4 must be in which phase? 132 00:26:45,410 --> 00:26:48,730 in the phase which is opposite to 1 133 00:26:48,730 --> 00:26:51,769 so opposite to 1 means that 134 00:26:51,769 --> 00:26:53,910 is this 1? 135 00:27:07,089 --> 00:27:12,500 no, 1 is this 1 136 00:27:12,500 --> 00:27:16,200 the opposite of 1 is this 137 00:27:16,200 --> 00:27:32,640 no, the opposite of 1 is this 138 00:27:32,640 --> 00:27:40,859 well, we have 2 in the opposite of 1 139 00:27:40,859 --> 00:27:48,130 yeah, but it is not the opposite of 1 140 00:27:48,130 --> 00:27:51,210 It's the opposite of 5 141 00:27:51,210 --> 00:27:53,950 That's the problem 142 00:27:53,950 --> 00:27:56,109 It's the opposite of 5 143 00:27:56,109 --> 00:27:59,950 So the minus 5 is here 144 00:27:59,950 --> 00:28:19,119 So we have these two 145 00:28:19,119 --> 00:28:51,630 So we have 4 146 00:28:51,630 --> 00:29:02,450 So we have 1, 2, 3, 4, and 5 147 00:29:02,450 --> 00:29:58,170 5 is this one, but in this face, so we have 5, yes, and finally 6 is opposite to 1, no, but this one, 1, 2, 3, 4, 5, so 6 is opposite to 1, 148 00:29:58,170 --> 00:30:27,279 and you can get 6 the same as 4 149 00:30:27,279 --> 00:30:41,029 copied it 4, copied it 4 150 00:30:41,029 --> 00:30:42,130 but where? 151 00:30:43,029 --> 00:30:45,009 you must copied it 4 in where? 152 00:30:45,009 --> 00:30:50,910 you must copied it 4 in the face which opposite to 1 153 00:30:50,910 --> 00:30:56,940 this is 1 and this is the face opposite 154 00:30:56,940 --> 00:31:10,849 so 1 is this, 1 is 5, so it's minus 5 155 00:31:10,849 --> 00:32:08,680 but this is 4, and I want 6 156 00:32:08,680 --> 00:32:12,700 so I need to add 2 more spheres 157 00:32:12,700 --> 00:32:22,839 I need to add 2 more spheres 158 00:32:22,839 --> 00:32:26,279 and the spher must be 159 00:32:26,279 --> 00:32:30,940 one of these must be, what is this? 160 00:32:30,940 --> 00:32:37,940 in I must be 3 and minus 3 161 00:32:37,940 --> 00:32:46,099 must be 3 and minus 3 162 00:32:46,099 --> 00:33:16,240 O is 3 163 00:33:16,240 --> 00:33:27,960 and finally 164 00:33:27,960 --> 00:33:35,759 you must be very meticulous 165 00:33:35,759 --> 00:33:37,759 because if you aren't 166 00:33:37,759 --> 00:34:12,840 you can't have you don't you don't do well so here you have one and we need to 167 00:34:12,840 --> 00:34:36,989 repeat so we have all the numbers one two three four five and six well what 168 00:34:36,989 --> 00:34:50,670 happen is not a whole so you want to create holes you must using the the 169 00:34:50,670 --> 00:34:59,670 common difference so a you must wait we're going to do the union of the first 170 00:34:59,670 --> 00:35:35,610 part of the of the figure and now we are going to do the differences I know if I 171 00:35:35,610 --> 00:35:48,829 can do in just only one step I think it's better step by step our difference 172 00:35:48,829 --> 00:36:20,460 and we're going to do the union here one union for one for two and for three so I 173 00:36:20,460 --> 00:36:41,320 So I do the differences between each number, this one and this other one. 174 00:36:41,320 --> 00:36:46,320 What we have now, instead of this, I have a whole. 175 00:36:46,320 --> 00:36:49,099 So it's due to the union. 176 00:36:49,099 --> 00:37:15,599 You can do the difference with the difference unions, I think. 177 00:37:15,599 --> 00:37:27,269 So now it's the difference, till this one, and you have the result. 178 00:37:27,269 --> 00:37:31,690 And the same for the rest of the numbers. 179 00:37:31,690 --> 00:37:54,960 Number 5, we're going to do the union. 180 00:37:54,960 --> 00:38:13,179 Number 2, we're going to do the union. 181 00:38:13,179 --> 00:38:26,320 Number 4, another union. 182 00:38:26,320 --> 00:38:42,840 And number 6, another union. 183 00:38:42,840 --> 00:38:50,059 And then, you can do the differences, and instead of having this one, what you have 184 00:38:50,059 --> 00:38:52,320 are holes. 185 00:38:52,320 --> 00:39:01,900 So you have your figure, this is your figure, finally if you want to export to STL code 186 00:39:01,900 --> 00:39:16,219 you can do it but you must render it firstly, to export this you must press 56, do a renderation 187 00:39:16,219 --> 00:39:21,619 and that you can have the STL file 188 00:39:21,619 --> 00:39:23,619 let's take some time 189 00:39:23,619 --> 00:39:35,219 with this STL file you can transform from STL file to 190 00:39:35,219 --> 00:39:44,449 I'm going to export 191 00:39:44,449 --> 00:40:18,320 we want save as stl format so we have we can it is safe you can do better the 192 00:40:18,320 --> 00:40:58,400 holes if you want so well so now the last part so the last part is using 193 00:40:58,400 --> 00:41:18,000 repetir host, we can transform the figure to gcode, and the gcode is what you must use 194 00:41:18,000 --> 00:41:19,000 to print. 195 00:41:19,000 --> 00:41:40,550 So now I'm going to get, I haven't, so we will finish it in class. 196 00:41:40,550 --> 00:41:45,530 So this is the first part of the activity.