|
How do you round the top and bottom of a tube? February 15, 2015 11:25AM |
Registered: 12 years ago Posts: 782 |
|
Re: How do you round the top and bottom of a tube? February 15, 2015 05:08PM |
Registered: 13 years ago Posts: 1,320 |
|
Re: How do you round the top and bottom of a tube? February 16, 2015 04:56AM |
Registered: 13 years ago Posts: 369 |
$fn=100; // reduce this for printing
Rounded_tube(100, 20, 5);
module Rounded_tube(height, radius, wall_thickness)
{
ff = 0.05; // CSG fudge factor
// upper toroidal lip
translate([0, 0, height/2-wall_thickness])
rotate_extrude()
translate([radius-wall_thickness/2, 0, 0])
circle(d=wall_thickness);
// lower toroidal lip
translate([0, 0, wall_thickness-height/2])
rotate_extrude()
translate([radius-wall_thickness/2, 0, 0])
circle(d=wall_thickness);
// bridge it with a tube
difference()
{
cylinder(h=height-2*wall_thickness, r=radius, center=true);
cylinder(h=height, r=radius-wall_thickness, center=true);
}
}
|
Re: How do you round the top and bottom of a tube? February 16, 2015 05:14AM |
Registered: 13 years ago Posts: 369 |
$fn = 100;
Rounded_hole(100, 30, 5);
module Rounded_hole(depth, radius, bevel_radius)
{
difference()
{
cylinder(h=depth, r=radius+bevel_radius, center=true);
//elongated torus
rotate_extrude()
hull()
{
translate([radius+bevel_radius, depth/2-bevel_radius, 0]) circle(r=bevel_radius);
translate([radius+bevel_radius, bevel_radius-depth/2, 0]) circle(r=bevel_radius);
}
}
}
|
Re: How do you round the top and bottom of a tube? February 16, 2015 07:36AM |
Registered: 12 years ago Posts: 782 |
|
Re: How do you round the top and bottom of a tube? February 17, 2015 01:08PM |
Registered: 12 years ago Posts: 782 |
|
Re: How do you round the top and bottom of a tube? February 18, 2015 05:13AM |
Registered: 16 years ago Posts: 3,742 |
$fn = 100;
t = 5;
td = 20;
bd = 15;
h = 30;
difference()
{
cylinder(r1=bd, r2=td, h=h, center=true);
cylinder(r1=bd-t, r2=td-t, h=h+0.01, center=true);
}
translate([0,0,h/2])
color("green")
torus(td, t/2, h);
translate([0,0,-h/2])
color("blue")
torus(bd, t/2, h);
module torus(d, r, h)
{
rotate_extrude()
{
translate([d-r,0,0])
circle(r = r);
}
}
|
Re: How do you round the top and bottom of a tube? February 18, 2015 05:28AM |
Registered: 16 years ago Posts: 3,742 |
Quote
appjaws1
whilst maintaining the overall height of say 30?
h = 30;use:
h = 30 - t;
|
Re: How do you round the top and bottom of a tube? February 18, 2015 05:36AM |
Registered: 13 years ago Posts: 369 |
|
Re: How do you round the top and bottom of a tube? February 18, 2015 07:20AM |
Registered: 12 years ago Posts: 782 |
|
Re: How do you round the top and bottom of a tube? February 18, 2015 08:34AM |
Registered: 16 years ago Posts: 3,742 |
Quote
QuackingPlums
Isn't that what I did Bob? ;-)
Quote
appjaws1
I assume that a teardrop is constructed from a cube and a cylinder
|
Re: How do you round the top and bottom of a tube? February 18, 2015 08:50AM |
Registered: 16 years ago Posts: 3,742 |
$fn = 100;
t = 5;
td = 20;
bd = 15;
h = 30 - t/2 - sqrt(2)*t/2;
difference()
{
cylinder(r1=bd, r2=td, h=h, center=true);
cylinder(r1=bd-t, r2=td-t, h=h+0.01, center=true);
}
translate([0,0,h/2])
color("green")
torus(td, t/2, h);
translate([0,0,-h/2])
color("blue")
tearus(bd, t/2, h);
module torus(d, r, h)
{
rotate_extrude()
{
translate([d-r,0,0])
circle(r = r);
}
}
module tearus(d, r, h)
{
rotate_extrude(convexity=10)
{
translate([d-r,0,0])
union()
{
circle(r);
rotate(-135)
square(size=r,center=false);
}
}
}
|
Re: How do you round the top and bottom of a tube? February 18, 2015 09:40AM |
Registered: 13 years ago Posts: 369 |
|
Re: How do you round the top and bottom of a tube? February 18, 2015 12:53PM |
Registered: 12 years ago Posts: 782 |
|
Re: How do you round the top and bottom of a tube? May 10, 2015 05:00AM |
Admin Registered: 13 years ago Posts: 1,063 |
$fn=127;
diameter = 10;// outerdiameter
india=5; // innerdiameter
length=20; // overall length
rad=diameter-india;
offset=diameter/2-rad/4;
union(){
translate([0,0,rad/4])rotate_extrude()translate([offset,0,0])circle(r=rad/4);
#translate([0,0,length-rad/4])rotate_extrude()translate([offset,0,0])circle(r=rad/4);
difference(){
translate([0,0,rad/4])cylinder(r=diameter/2,h=length-rad/4-rad/4);
translate([0,0,1])cylinder(r=india/2,h=length);// if you don't want the hole in the middle then remove this line
}
}
|
Re: How do you round the top and bottom of a tube? May 10, 2015 08:15AM |
Registered: 12 years ago Posts: 782 |
|
Re: How do you round the top and bottom of a tube? May 23, 2015 03:28AM |
Registered: 10 years ago Posts: 5,232 |
|
Re: How do you round the top and bottom of a tube? May 23, 2015 07:57AM |
Admin Registered: 13 years ago Posts: 1,063 |
Quote
o_lampe
translate([0,0,rad/4])rotate_extrude()translate([offset,0,0])circle(r=rad/4);
I love it, how we have to read from right to left, to understand, what´s going on
Or in other cases, "from bottom up"
-Olaf