is it possible to print one piece spheres with a hole of a specific size?
thank you
Printable View
is it possible to print one piece spheres with a hole of a specific size?
thank you
Yes. But you need to start with a solid model that's watertight.
Fire up OpenScad and put this code in... You will get what you want.
Attachment 6060
I was able to draw a sphere with the "follow me" tool in Sketchup.
The details are in the Sketchup knowledge base.
You may need to draw 2, an inner wall and an outer wall.
You can easily draw a circle on the surface and push it through the 2 walls with the extruder tool.
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?
Attachment 6075
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
}
}
Well, nicely defined by the code....I will try this code later. Generally, as a standard printer needs directions to let it know what to do ordinarily from some kind of word preparing archive the printing.Quote:
# 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
}
}