why does rotate_extrude fill in holes?

8 messages
Open this post in threaded view
|

why does rotate_extrude fill in holes?

 A while ago I asked how to make a bend in a pipe, and was told to use rotate_extrude on a circle.  Then repeat and position the inside correctly and difference give you a pipe.  All well and good, but it is quite difficult to position the inside properly. So I thought if I define a pipe by taking the difference of two circles and then rotate_extrude it I will get the same effect, but no, I get a solid torus.  Surely I should get a hollow one? The code I used was-         intersection() {                 // torus                 rotate_extrude()                         translate([bendR + innerR, 0, 0])                                 difference() {                                         circle(r=outerR);                                         circle(r=innerR);                                         }                 translate([0,0,-50])                         cube([100, 100, 100]);                 } Where bendR is the bend radius, innerR is the inside radius of the pipe and outerR is the outside radius. I then sliced the result, and there is no hollow in the middle of the torus. David
Open this post in threaded view
|

Re: why does rotate_extrude fill in holes?

 Add this and it sort of works with F5 but is still solid with F6: rotate_extrude(convexity = 5) On 10 May 2012 13:26, David Goodenough wrote: A while ago I asked how to make a bend in a pipe, and was told to use rotate_extrude on a circle.  Then repeat and position the inside correctly and difference give you a pipe.  All well and good, but it is quite difficult to position the inside properly. So I thought if I define a pipe by taking the difference of two circles and then rotate_extrude it I will get the same effect, but no, I get a solid torus.  Surely I should get a hollow one? The code I used was-        intersection() {                // torus                rotate_extrude()                        translate([bendR + innerR, 0, 0])                                difference() {                                        circle(r=outerR);                                        circle(r=innerR);                                        }                translate([0,0,-50])                        cube([100, 100, 100]);                } Where bendR is the bend radius, innerR is the inside radius of the pipe and outerR is the outside radius. I then sliced the result, and there is no hollow in the middle of the torus. David _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad
Open this post in threaded view
|

Re: why does rotate_extrude fill in holes?

 This works:innerR = 10; outerR = 12; bendR = 50; difference() {   intersection() {    // torus    rotate_extrude(convexity = 5)       translate([bendR + innerR, 0, 0])           circle(r=outerR);    translate([0,0,-50])       cube([100, 100, 100]);    }    rotate_extrude(convexity = 5)       translate([bendR + innerR, 0, 0])           circle(r=innerR); } On 10 May 2012 13:42, nop head wrote: Add this and it sort of works with F5 but is still solid with F6: rotate_extrude(convexity = 5) On 10 May 2012 13:26, David Goodenough wrote: A while ago I asked how to make a bend in a pipe, and was told to use rotate_extrude on a circle.  Then repeat and position the inside correctly and difference give you a pipe.  All well and good, but it is quite difficult to position the inside properly. So I thought if I define a pipe by taking the difference of two circles and then rotate_extrude it I will get the same effect, but no, I get a solid torus.  Surely I should get a hollow one? The code I used was-        intersection() {                // torus                rotate_extrude()                        translate([bendR + innerR, 0, 0])                                difference() {                                        circle(r=outerR);                                        circle(r=innerR);                                        }                translate([0,0,-50])                        cube([100, 100, 100]);                } Where bendR is the bend radius, innerR is the inside radius of the pipe and outerR is the outside radius. I then sliced the result, and there is no hollow in the middle of the torus. David _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad
Open this post in threaded view
|

Re: why does rotate_extrude fill in holes?

 Wonderful, that works a treat.  Thank you. David On Thursday 10 May 2012, nop head wrote: > This works: > > innerR = 10; > > outerR = 12; > > bendR = 50; > > > difference() { > >   intersection() { > >    // torus > >    rotate_extrude(convexity = 5) > >       translate([bendR + innerR, 0, 0]) > >           circle(r=outerR); > >    translate([0,0,-50]) > >       cube([100, 100, 100]); > >    } > >    rotate_extrude(convexity = 5) > >       translate([bendR + innerR, 0, 0]) > >           circle(r=innerR); > > } > > On 10 May 2012 13:42, nop head <[hidden email]> wrote: > > Add this and it sort of works with F5 but is still solid with > > F6: rotate_extrude(convexity = 5) > > > > On 10 May 2012 13:26, David Goodenough <[hidden email]>wrote: > >> A while ago I asked how to make a bend in a pipe, and was told to use > >> rotate_extrude on a circle.  Then repeat and position the inside > >> correctly and difference give you a pipe.  All well and good, but it is > >> quite difficult to position the inside properly. > >> > >> So I thought if I define a pipe by taking the difference of two circles > >> and then rotate_extrude it I will get the same effect, but no, I get a > >> solid torus.  Surely I should get a hollow one? > >> > >> The code I used was- > >> > >>        intersection() { > >>         > >>                // torus > >>                rotate_extrude() > >>                 > >>                        translate([bendR + innerR, 0, 0]) > >>                         > >>                                difference() { > >>                                 > >>                                        circle(r=outerR); > >>                                        circle(r=innerR); > >>                                        } > >>                 > >>                translate([0,0,-50]) > >>                 > >>                        cube([100, 100, 100]); > >>                 > >>                } > >> > >> Where bendR is the bend radius, innerR is the inside radius of the > >> pipe and outerR is the outside radius. > >> > >> I then sliced the result, and there is no hollow in the middle of the > >> torus. > >> > >> David > >> _______________________________________________ > >> OpenSCAD mailing list > >> [hidden email] > >> http://rocklinux.net/mailman/listinfo/openscad
Open this post in threaded view
|

Re: why does rotate_extrude fill in holes?

Open this post in threaded view
|