From the course: Creating a Captive Sphere with OpenSCAD

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Reducing the cube

Reducing the cube

- In order to see exactly what's going on here, it would help if we could view the second cube. Of course, it's invisible, because it's subtracting from the first one. We can make it show up in the preview by clicking before the word cube and typing in the # character. When we now preview, we can see the cube showing up perfectly. And it shows up in this translucent way so we can see this actually, it won't print, this is just giving us an indication of where it is. What we want is for this cube to be right size to take out the base of the sphere, but not so large that it fills the whole area. So let's try making the cube smaller. We could give it a side of not 30, but 15. And let's take a look at that. Now the problem here is it's given it 15 on each side, but we still moved it down by -30, and so it's come detached entirely. The easiest way to fix this is to give the cube three dimensions rather than just one. If we give it one dimension, it's a true cube, but the command cube can…

Contents