Welcome! Log In Create A New Profile

Advanced

Cuting a sphere from a cube in stl file

Posted by znri 
Cuting a sphere from a cube in stl file
September 25, 2014 03:23PM
Hello everybody. I have a cube in a file with stl format. I want to cut a central sphere from that cube. How can I do this?
Re: Cuting a sphere from a cube in stl file
September 25, 2014 03:37PM
If it's only a cube get the dimension of the side and then do it in any 3d design program.
Otherwise use any 3d design program that can load an STL file (which is most of them) and then subtract the sphere.

In OpenSCAD:
side = 20;

difference()
{
	cube([side,side,side], true);
	sphere(r=side/3, center=true, $fn=100);
	
	translate([-side/2,0,0])
		cube([side,side*2,side*2], true);
}

The second cube is subracted to cut the cube in half so you can see that indeed the sphere has been cut out of the inside!




Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Sorry, only registered users may post in this forum.

Click here to login