Results 1 to 10 of 18
Thread: Printing Spheres
-
05-17-2015, 12:54 AM #1
- Join Date
- May 2015
- Posts
- 8
Printing Spheres
is it possible to print one piece spheres with a hole of a specific size?
thank you
-
05-17-2015, 03:44 PM #2
- Join Date
- Jan 2014
- Location
- Oakland, CA
- Posts
- 935
Yes. But you need to start with a solid model that's watertight.
-
05-17-2015, 04:39 PM #3
- Join Date
- May 2015
- Posts
- 8
-
05-17-2015, 09:22 PM #4
Fire up OpenScad and put this code in... You will get what you want.
Sphere_with_holes.jpg
-
05-17-2015, 09:24 PM #5
- Join Date
- Mar 2015
- Location
- San Diego, CA
- Posts
- 107
-
05-19-2015, 04:26 PM #6
- Join Date
- May 2015
- Posts
- 8
-
05-19-2015, 04:28 PM #7
- Join Date
- May 2015
- Posts
- 8
-
05-19-2015, 07:30 PM #8
- Join Date
- May 2015
- Posts
- 8
hey roxy,
this is fun. i like entering code to get models or a mesh i guess. new to all this. the openscad user manual seems well written. this is making sense.
i played with the code you gave me because i need a sphere with one hole only.
i was able to accomplish this as shown, but had some questions.
i don't understand why the second hole would not disappear until i reduced the cylinder height to 60
and how is this connected to the translate variables?
and i was wondering what makes the cylinder a child of the sphere?
Clipboard01.jpgLast edited by urglik; 05-20-2015 at 01:27 PM.
-
05-22-2015, 09:30 AM #9
Normally, it is easier to see what is going on in OpenScad. But you picked a particularly difficult idea to see. However, if you go back to the original code I posted I'll walk you through it. Grab that original code and put it back into OpenScad. Then change this line to have a # in front of it:
# translate([0,0,-50]) cylinder(r=5, h=100,$fn=50);
When ever you put a # in front of something it will display that object. So you will see a cylinder translated down to z=-50 and going up to z=+50. That object is being subtracted from the hollow sphere. You might have to do a Design/Render followed by a View/Animate to see the # object.
You can't see inside of the hollow sphere very well, but you could make it so you just get one hole by changing that line to:
# cylinder(r=5, h=100,$fn=50);
Now the cylinder is just as tall but it starts with its bottom at the origin. If you want to see inside the sphere and how the cylinder is positioned, you might try cutting away the first quadrant. Try this code so you can look inside:
sphere_with_holes();
module sphere_with_holes() {
difference() {
sphere(r=20, $fn=40);
sphere(r=18, $fn=40);
#cylinder(r=3.375, h=100, $fn=50);
cube([500,500,500]); // cut away the 1st quadrant
}
}Last edited by Roxy; 05-22-2015 at 09:56 AM.
-
05-29-2015, 06:55 AM #10# translate([0,0,-50]) cylinder(r=5, h=100,$fn=50);
When ever you put a # in front of something it will display that object. So you will see a cylinder translated down to z=-50 and going up to z=+50. That object is being subtracted from the hollow sphere. You might have to do a Design/Render followed by a View/Animate to see the # object.
You can't see inside of the hollow sphere very well, but you could make it so you just get one hole by changing that line to:
# cylinder(r=5, h=100,$fn=50);
Now the cylinder is just as tall but it starts with its bottom at the origin. If you want to see inside the sphere and how the cylinder is positioned, you might try cutting away the first quadrant. Try this code so you can look inside:
sphere_with_holes();
module sphere_with_holes() {
difference() {
sphere(r=20, $fn=40);
sphere(r=18, $fn=40);
#cylinder(r=3.375, h=100, $fn=50);
cube([500,500,500]); // cut away the 1st quadrant
}
}
Ender 3v2 poor printing quality
10-28-2024, 09:08 AM in Tips, Tricks and Tech Help