discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Curved Cylinders

D
dandare2020
Mon, Sep 19, 2016 12:52 PM

Afternoon All

I'm after a bit of guidance and advice weather or not what i'm trying to do
is possible. The problem i have is i want to convert the following to a 3d
image

http://forum.openscad.org/file/n18425/sample.png

Basically the large round Circle (1200mm) is 20mm thick the lines on top
represents various inputs they all end up at 0deg but could start anywhere
from 90deg to 270deg and have various diameters from 100mm to 300mm for the
curved lines the radius will always be 400mm.

What i'm aiming for is to change a couple of references for the angles and
number of inputs and diameters and away it goes. If possible i would just
like a bit of guidance on where to start with it all

Many Thanks

Dan

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Afternoon All I'm after a bit of guidance and advice weather or not what i'm trying to do is possible. The problem i have is i want to convert the following to a 3d image <http://forum.openscad.org/file/n18425/sample.png> Basically the large round Circle (1200mm) is 20mm thick the lines on top represents various inputs they all end up at 0deg but could start anywhere from 90deg to 270deg and have various diameters from 100mm to 300mm for the curved lines the radius will always be 400mm. What i'm aiming for is to change a couple of references for the angles and number of inputs and diameters and away it goes. If possible i would just like a bit of guidance on where to start with it all Many Thanks Dan -- View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
Ronaldo
Mon, Sep 19, 2016 3:35 PM

Your problem seems to be a geometric problem and not an OpenSCAD one. Anyway,
it was not clear to me. Is the issue to calculate the center of the circle
arcs for a given radius and input-output angle?

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18428.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Your problem seems to be a geometric problem and not an OpenSCAD one. Anyway, it was not clear to me. Is the issue to calculate the center of the circle arcs for a given radius and input-output angle? -- View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18428.html Sent from the OpenSCAD mailing list archive at Nabble.com.
D
dandare2020
Mon, Sep 19, 2016 3:42 PM

I think i didn't quite explain myself basically i would like to put a start
point of 0 deg and then another point on the circle (1200mm dia) lets say at
90 and then say i would like a cylinder at 150mmdia that meets the two end
points with a radius of 400 inbetween if that makes sense

Regards

Dan

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18429.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

I think i didn't quite explain myself basically i would like to put a start point of 0 deg and then another point on the circle (1200mm dia) lets say at 90 and then say i would like a cylinder at 150mmdia that meets the two end points with a radius of 400 inbetween if that makes sense Regards Dan -- View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18429.html Sent from the OpenSCAD mailing list archive at Nabble.com.
R
Ronaldo
Mon, Sep 19, 2016 4:05 PM

r=1200;
r1=400;
h= 200;
color("blue") cylinder(r=r, h=h);
translate([r1, -r1, h]) cylinder(r=r1, h=h);
line([0, -r, h], [0, -r1, h], thickness=30);
line([r1, 0, h], [r, 0, h], thickness=30);

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18432.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Something like that? <http://forum.openscad.org/file/n18432/cyls.png> > r=1200; > r1=400; > h= 200; > color("blue") cylinder(r=r, h=h); > translate([r1, -r1, h]) cylinder(r=r1, h=h); > line([0, -r, h], [0, -r1, h], thickness=30); > line([r1, 0, h], [r, 0, h], thickness=30); -- View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18432.html Sent from the OpenSCAD mailing list archive at Nabble.com.
GF
Greg Frost
Mon, Sep 19, 2016 10:20 PM

Or if you want to do it the cheats way without any trigonometry (other than
making a wedge with the angle you want):

angle=50;
radius=40;
big_circle_radius=100;
intersection()
{
circle(r=big_circle_radius);

offset(r=radius)
offset(r=-radius)
scale(radius*10)
polygon(points=[[0,0],[0,-1],[cos(angle),sin(angle)]]);

}

On Tue, Sep 20, 2016 at 1:35 AM, Ronaldo rcmpersiano@gmail.com wrote:

r=1200;
r1=400;
h= 200;
color("blue") cylinder(r=r, h=h);
translate([r1, -r1, h]) cylinder(r=r1, h=h);
line([0, -r, h], [0, -r1, h], thickness=30);
line([r1, 0, h], [r, 0, h], thickness=30);

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-
tp18425p18432.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Or if you want to do it the cheats way without any trigonometry (other than making a wedge with the angle you want): angle=50; radius=40; big_circle_radius=100; intersection() { circle(r=big_circle_radius); offset(r=radius) offset(r=-radius) scale(radius*10) polygon(points=[[0,0],[0,-1],[cos(angle),sin(angle)]]); } On Tue, Sep 20, 2016 at 1:35 AM, Ronaldo <rcmpersiano@gmail.com> wrote: > Something like that? > <http://forum.openscad.org/file/n18432/cyls.png> > > > r=1200; > > r1=400; > > h= 200; > > color("blue") cylinder(r=r, h=h); > > translate([r1, -r1, h]) cylinder(r=r1, h=h); > > line([0, -r, h], [0, -r1, h], thickness=30); > > line([r1, 0, h], [r, 0, h], thickness=30); > > > > > > -- > View this message in context: http://forum.openscad.org/Curved-Cylinders- > tp18425p18432.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
R
Ronaldo
Tue, Sep 20, 2016 4:08 AM

You may try this:

ang = 30;
r    = 90;
R    = 100;
s    = sign(90-ang);
// tangential circle center
c  = rs[1, (sin(ang)-1)/cos(ang)];
// far away points for hull
c1 = c + 2R[cos(ang), sin(ang)];
c2 = 2sR*[1, -1];
c3 = [c[0], -2*R];
intersection() {
// comment this line to see what is going on
circle(R,$fa=2);
hull() {
translate(c) circle(r,$fa=2);
translate(c1)circle(r);
translate(c2)circle(r);
translate(c3)circle(r);
}
}

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18438.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

You may try this: > ang = 30; > r = 90; > R = 100; > s = sign(90-ang); > // tangential circle center > c = r*s*[1, (sin(ang)-1)/cos(ang)]; > // far away points for hull > c1 = c + 2*R*[cos(ang), sin(ang)]; > c2 = 2*s*R*[1, -1]; > c3 = [c[0], -2*R]; > intersection() { > // comment this line to see what is going on > circle(R,$fa=2); > hull() { > translate(c) circle(r,$fa=2); > translate(c1)circle(r); > translate(c2)circle(r); > translate(c3)circle(r); > } > } -- View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18438.html Sent from the OpenSCAD mailing list archive at Nabble.com.
D
dandare2020
Tue, Sep 20, 2016 7:31 AM

Thank you for your help but i'm looking for something more like below if
possible please

http://forum.openscad.org/file/n18439/download.jpg

or
http://forum.openscad.org/file/n18439/images.jpg

Many Thanks for your help

Dan

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18439.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Thank you for your help but i'm looking for something more like below if possible please <http://forum.openscad.org/file/n18439/download.jpg> or <http://forum.openscad.org/file/n18439/images.jpg> Many Thanks for your help Dan -- View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18439.html Sent from the OpenSCAD mailing list archive at Nabble.com.
RP
Ronaldo Persiano
Tue, Sep 20, 2016 4:16 PM

You will need rotate_extrude
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#Rotate_Extrude
and some math to find angles and centers.

2016-09-20 4:31 GMT-03:00 dandare2020 dandare2020@gmail.com:

Thank you for your help but i'm looking for something more like below if
possible please

http://forum.openscad.org/file/n18439/download.jpg

or
http://forum.openscad.org/file/n18439/images.jpg

Many Thanks for your help

Dan

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-
tp18425p18439.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

You will need rotate_extrude <https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_the_2D_Subsystem#Rotate_Extrude> and some math to find angles and centers. 2016-09-20 4:31 GMT-03:00 dandare2020 <dandare2020@gmail.com>: > Thank you for your help but i'm looking for something more like below if > possible please > > <http://forum.openscad.org/file/n18439/download.jpg> > > or > <http://forum.openscad.org/file/n18439/images.jpg> > > Many Thanks for your help > > Dan > > > > -- > View this message in context: http://forum.openscad.org/Curved-Cylinders- > tp18425p18439.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
P
pff
Tue, Sep 20, 2016 7:11 PM

So you'd like to union (well, almost) two or more toroidal segments, yes?
Where the torii are hollow, aka tubes ???
If tubes, you want the passageways open ???
Like an tubular exhaust manifold for a combustion engine ???
Phil(f) in WI

On 9/19/2016 7:52 AM, dandare2020 wrote:

Afternoon All

I'm after a bit of guidance and advice weather or not what i'm trying to do
is possible. The problem i have is i want to convert the following to a 3d
image

http://forum.openscad.org/file/n18425/sample.png

Basically the large round Circle (1200mm) is 20mm thick the lines on top
represents various inputs they all end up at 0deg but could start anywhere
from 90deg to 270deg and have various diameters from 100mm to 300mm for the
curved lines the radius will always be 400mm.

What i'm aiming for is to change a couple of references for the angles and
number of inputs and diameters and away it goes. If possible i would just
like a bit of guidance on where to start with it all

Many Thanks

Dan

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

So you'd like to union (well, almost) two or more toroidal segments, yes? Where the torii are hollow, aka tubes ??? If tubes, you want the passageways open ??? Like an tubular exhaust manifold for a combustion engine ??? Phil(f) in WI On 9/19/2016 7:52 AM, dandare2020 wrote: > Afternoon All > > I'm after a bit of guidance and advice weather or not what i'm trying to do > is possible. The problem i have is i want to convert the following to a 3d > image > > <http://forum.openscad.org/file/n18425/sample.png> > > Basically the large round Circle (1200mm) is 20mm thick the lines on top > represents various inputs they all end up at 0deg but could start anywhere > from 90deg to 270deg and have various diameters from 100mm to 300mm for the > curved lines the radius will always be 400mm. > > What i'm aiming for is to change a couple of references for the angles and > number of inputs and diameters and away it goes. If possible i would just > like a bit of guidance on where to start with it all > > Many Thanks > > Dan > > > > -- > View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
R
Ronaldo
Tue, Sep 20, 2016 10:13 PM

Now, with the pictures, your problem is clear. You asked if it is possible.
The answer is yes:
http://forum.openscad.org/file/n18445/Tube_junction.png
You asked for some guidance. Here you have:
a) you will need rotate_extrude, preferably with a OpenSCAD version 2016.xx;
this will give you the cylinder bendings; two standard cylinders will extend
it;
b) you will need to calculate the center of the torus arcs from the bending
angles; here is where some trigonometry is helpful;
c) to make the holes in the tubes, you will need to subtract (difference())
the inside bent cylinder model from the outside bent cylinder model;
d) to make the passages through the enclosure cylinder, you will need to
subtract (difference()) the inside bent cylinder models from the enclosure
model.
I think it is more convenient to measure the bending from the vertical
direction.
That is a good exercise of OpenSCAD modelling.
If you have additional questions, ask. If you want my code, just ask.

--
View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18445.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Now, with the pictures, your problem is clear. You asked if it is possible. The answer is yes: <http://forum.openscad.org/file/n18445/Tube_junction.png> You asked for some guidance. Here you have: a) you will need rotate_extrude, preferably with a OpenSCAD version 2016.xx; this will give you the cylinder bendings; two standard cylinders will extend it; b) you will need to calculate the center of the torus arcs from the bending angles; here is where some trigonometry is helpful; c) to make the holes in the tubes, you will need to subtract (difference()) the inside bent cylinder model from the outside bent cylinder model; d) to make the passages through the enclosure cylinder, you will need to subtract (difference()) the inside bent cylinder models from the enclosure model. I think it is more convenient to measure the bending from the vertical direction. That is a good exercise of OpenSCAD modelling. If you have additional questions, ask. If you want my code, just ask. -- View this message in context: http://forum.openscad.org/Curved-Cylinders-tp18425p18445.html Sent from the OpenSCAD mailing list archive at Nabble.com.