<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Cuting a sphere from a cube in stl file</title>
        <description> 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?</description>
        <link>https://reprap.org/forum/read.php?80,411919,411919#msg-411919</link>
        <lastBuildDate>Wed, 17 Jun 2026 15:58:35 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?80,411919,411925#msg-411925</guid>
            <title>Re: Cuting a sphere from a cube in stl file</title>
            <link>https://reprap.org/forum/read.php?80,411919,411925#msg-411925</link>
            <description><![CDATA[ If it's only a cube get the dimension of the side and then do it in any 3d design program.<br />
Otherwise use any 3d design program that can load an STL file (which is most of them) and then subtract the sphere.<br />
<br />
In <a href="http://www.openscad.org/" target="_blank"  rel="nofollow">OpenSCAD</a>:<br />
<pre class="bbcode">
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);
}</pre>
<br />
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!<br />
<br />
[attachment 41013 cubesub.png]]]></description>
            <dc:creator>rhmorrison</dc:creator>
            <category>3D Design tools</category>
            <pubDate>Thu, 25 Sep 2014 15:37:15 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?80,411919,411919#msg-411919</guid>
            <title>Cuting a sphere from a cube in stl file</title>
            <link>https://reprap.org/forum/read.php?80,411919,411919#msg-411919</link>
            <description><![CDATA[ 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?]]></description>
            <dc:creator>znri</dc:creator>
            <category>3D Design tools</category>
            <pubDate>Thu, 25 Sep 2014 15:23:01 -0400</pubDate>
        </item>
    </channel>
</rss>
