Curved Cylinders

classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Curved Cylinders

dandare2020
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



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
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

Ronaldo
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?
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

dandare2020
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
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

Ronaldo
Something like that?

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);
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

Greg Frost
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 <[hidden email]> 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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

Ronaldo
In reply to this post by dandare2020
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);
    }
}
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

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



or


Many Thanks for your help

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

Ronaldo
You will need rotate_extrude and some math to find angles and centers.

2016-09-20 4:31 GMT-03:00 dandare2020 <[hidden email]>:
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
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
pff
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

pff
In reply to this post by dandare2020
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
> [hidden email]
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

Ronaldo
In reply to this post by dandare2020
Now, with the pictures, your problem is clear. You asked if it is possible. The answer is yes:

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.
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

MichaelAtOz
Administrator
In reply to this post by dandare2020
dandare2020 wrote
Thank you for your help but i'm looking for something more like below if possible please



or


Many Thanks for your help

Dan
I've seen that before.
Is this a course exercise?
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

MichaelAtOz
Administrator
MichaelAtOz wrote
I've seen that before.
Is this a course exercise?
Ah, in your original post.
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

MichaelAtOz
Administrator
Interesting use of industrial robot to carve foam for concrete moulds
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

dandare2020
In reply to this post by Ronaldo
Ronaldo all i can say is thank you that is more or less what i'm looking for minus the ring round the side and and small 20mm base on the bottom that would be perfect. If you could post the code i will have a play

Thank you very much


Cheers

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

dandare2020
In reply to this post by MichaelAtOz
MichaelATOz
That is excatly what i'm trying to do I have the front end sorted in with a nice user interface and just trying to sort out this bit. I got it to do stright pipes at 180 and 90 etc but no curves and a such but it looks like with the help of you guys i will get there

Many Thanks

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

Ronaldo
And what you intend to do with this work?

2016-09-21 4:55 GMT-03:00 dandare2020 <[hidden email]>:
MichaelATOz
That is excatly what i'm trying to do I have the front end sorted in with a
nice user interface and just trying to sort out this bit. I got it to do
stright pipes at 180 and 90 etc but no curves and a such but it looks like
with the help of you guys i will get there

Many Thanks

Dan



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

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

dandare2020
It's just something I'm playing with at work to see what is possible. we are buying the smart Cast system but just fancied playing really and openscad does seem to have potential in some applications so I thought I would see what it can do. Long term I would like to learn it in depth but I've always been one for looking at code and working out what it does and then playing I seem to learn better this way for some reason

Cheers

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

dandare2020
In reply to this post by Ronaldo
Morning Ronaldo

Could you send me the code please so i can have a play. I have a few hours spare today. Once i have everything connected together i have no issues uploading all the files and code for the front end and the connection to the openscad so others can play and use if wanted.

Regards

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

Ronaldo
This post was updated on .
Hi, Dan. I needed one more day to organize the code mess and adapt it to OpenSCAD customizer, a nice way to present and explore demos.
pipe_junction2.scad
Be careful with the resolution parameters; even the preview (which is a really mess) requires a distressing time to process. Raise the resolution only after the other parameters fulfill your requirements. Ah, the code requires an OpenSCAD version 2016.xxxx.
Hope it helps.
Reply | Threaded
Open this post in threaded view
|

Re: Curved Cylinders

dandare2020
That looks fantastic thank you. I'll have a play to see how close i can get with removing the rings etc. It will give me somthing to do tonight i'm sure my partner will be happy lol

Thank you

Dan
12