# Rotary extrude with constant wall thickness, plz help!

31 messages
12
Open this post in threaded view
|

## Rotary extrude with constant wall thickness, plz help!

 Hello, i want to make a brim for a vessel, which needs to be an ellipsoid, but of course keep cutouts for fitting on the vessel constant. I do a rotate extrude of my basic shape and then scale the model. Of course the cutouts get rescaled to, but i need a constant wall and cutout thickness. How can i achieve this, i tried a bunch of stuff but nothing worked so far. Please help! My code: \$fn = 30; scale([2.5,1,1]){         rotate_extrude(convexity = 10){                 translate([100, 0, 0]){                         difference(){                                 square([10,10]);                                 translate([2.5,0,0]){                                         square([5,10]);                                 }                         }                 }         } }
Open this post in threaded view
|

## Fwd: Rotary extrude with constant wall thickness, plz help!

-------- Weitergeleitete Nachricht --------
Betreff: [OpenSCAD] Rotary extrude with constant wall thickness, plz help! Fri, 24 Jul 2015 08:57:40 -0700 (MST) PYM [hidden email] OpenSCAD general discussion [hidden email] [hidden email]

```Hello,

i want to make a brim for a vessel, which needs to be an ellipsoid, but of
course keep cutouts for fitting on the vessel constant. I do a rotate
extrude of my basic shape and then scale the model. Of course the cutouts
get rescaled to, but i need a constant wall and cutout thickness.

How can i achieve this, i tried a bunch of stuff but nothing worked so far.

My code:

\$fn = 30;

scale([2.5,1,1]){
rotate_extrude(convexity = 10){
translate([100, 0, 0]){
difference(){
square([10,10]);
translate([2.5,0,0]){
square([5,10]);
}
}
}
}
}

--
View this message in context: http://forum.openscad.org/Rotary-extrude-with-constant-wall-thickness-plz-help-tp13287.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
[hidden email]
```

_______________________________________________
[hidden email]
Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

The way to do this is to rotate extrude a very thin slice (e=0.01), scale it into an ellipse, and than hull  it with a cylinder of diameter equal to the thickness required.

2015-07-24 17:59 GMT+02:00 Patrick Mörwald :

-------- Weitergeleitete Nachricht --------
Betreff: [OpenSCAD] Rotary extrude with constant wall thickness, plz help! Fri, 24 Jul 2015 08:57:40 -0700 (MST) PYM [hidden email] OpenSCAD general discussion [hidden email] [hidden email]

```Hello,

i want to make a brim for a vessel, which needs to be an ellipsoid, but of
course keep cutouts for fitting on the vessel constant. I do a rotate
extrude of my basic shape and then scale the model. Of course the cutouts
get rescaled to, but i need a constant wall and cutout thickness.

How can i achieve this, i tried a bunch of stuff but nothing worked so far.

My code:

\$fn = 30;

scale([2.5,1,1]){
rotate_extrude(convexity = 10){
translate([100, 0, 0]){
difference(){
square([10,10]);
translate([2.5,0,0]){
square([5,10]);
}
}
}
}
}

--
View this message in context: http://forum.openscad.org/Rotary-extrude-with-constant-wall-thickness-plz-help-tp13287.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
[hidden email]
```

_______________________________________________
[hidden email]

--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.

Enjoy!

_______________________________________________
[hidden email]
Open this post in threaded view
|

## Re: Rotary extrude with constant wall thickness, plz help!

Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

In reply to this post by Peter Falke
Sorry, it is minkowski() not hull():

\$fn = 16;
e=0.02;
minkowski(){
scale([2.5,1,1])
rotate_extrude(convexity = 10)
translate([100, 0, 0])
square([e,10]);
cylinder(10,1,1);
}

2015-07-24 20:45 GMT+02:00 Peter Falke :
The way to do this is to rotate extrude a very thin slice (e=0.01), scale it into an ellipse, and than hull  it with a cylinder of diameter equal to the thickness required.

2015-07-24 17:59 GMT+02:00 Patrick Mörwald :

-------- Weitergeleitete Nachricht --------
Betreff: [OpenSCAD] Rotary extrude with constant wall thickness, plz help! Fri, 24 Jul 2015 08:57:40 -0700 (MST) PYM [hidden email] OpenSCAD general discussion [hidden email] [hidden email]

```Hello,

i want to make a brim for a vessel, which needs to be an ellipsoid, but of
course keep cutouts for fitting on the vessel constant. I do a rotate
extrude of my basic shape and then scale the model. Of course the cutouts
get rescaled to, but i need a constant wall and cutout thickness.

How can i achieve this, i tried a bunch of stuff but nothing worked so far.

My code:

\$fn = 30;

scale([2.5,1,1]){
rotate_extrude(convexity = 10){
translate([100, 0, 0]){
difference(){
square([10,10]);
translate([2.5,0,0]){
square([5,10]);
}
}
}
}
}

--
View this message in context: http://forum.openscad.org/Rotary-extrude-with-constant-wall-thickness-plz-help-tp13287.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
[hidden email]
```

_______________________________________________
[hidden email]

--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.

Enjoy!

--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.

Enjoy!

_______________________________________________
[hidden email]
Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

Yes, offset is the way to go: it is much faster!

\$fn = 16;
module oval(){
scale([2.5,1,1])
circle(10);
}

difference(){
offset(r=2)oval();
oval();
}

2015-07-24 20:51 GMT+02:00 Peter Falke :
Sorry, it is minkowski() not hull():

\$fn = 16;
e=0.02;
minkowski(){
scale([2.5,1,1])
rotate_extrude(convexity = 10)
translate([100, 0, 0])
square([e,10]);
cylinder(10,1,1);
}

2015-07-24 20:45 GMT+02:00 Peter Falke :
The way to do this is to rotate extrude a very thin slice (e=0.01), scale it into an ellipse, and than hull  it with a cylinder of diameter equal to the thickness required.

2015-07-24 17:59 GMT+02:00 Patrick Mörwald :

-------- Weitergeleitete Nachricht --------
Betreff: [OpenSCAD] Rotary extrude with constant wall thickness, plz help! Fri, 24 Jul 2015 08:57:40 -0700 (MST) PYM [hidden email] OpenSCAD general discussion [hidden email] [hidden email]

```Hello,

i want to make a brim for a vessel, which needs to be an ellipsoid, but of
course keep cutouts for fitting on the vessel constant. I do a rotate
extrude of my basic shape and then scale the model. Of course the cutouts
get rescaled to, but i need a constant wall and cutout thickness.

How can i achieve this, i tried a bunch of stuff but nothing worked so far.

My code:

\$fn = 30;

scale([2.5,1,1]){
rotate_extrude(convexity = 10){
translate([100, 0, 0]){
difference(){
square([10,10]);
translate([2.5,0,0]){
square([5,10]);
}
}
}
}
}

--
View this message in context: http://forum.openscad.org/Rotary-extrude-with-constant-wall-thickness-plz-help-tp13287.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
[hidden email]
```

_______________________________________________
[hidden email]

--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.

Enjoy!

--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.

Enjoy!

--
[hidden email]

P.S. Falls meine E-Mail kürzer ausfällt als Dir angenehm ist:
Ich probiere gerade aus kurze Antworten statt gar keine Antworten zu schreiben.
Wenn Du gerne mehr lesen möchtest, dann lass es mich bitte wissen.

P.S. In case my e-mail is shorter than you enjoy:
I am currently trying short replies instead of no replies at all.

Enjoy!

_______________________________________________
[hidden email]
Open this post in threaded view
|

## Re: Rotary extrude with constant wall thickness, plz help!

Open this post in threaded view
|

## Re: Rotary extrude with constant wall thickness, plz help!

 In reply to this post by Greg Frost On Sat, Jul 25, 2015 at 04:19:30AM +0930, Greg Frost wrote: > Perhaps use 2D operations to get a cross section of the vessel shape and then > use the offset() function to create the brim. This would work for any > arbitrary shape. Sounds like what I did here: https://github.com/alexrj/Slic3r/issues/641#issuecomment-100101745-- Kind regards, Loong Jin _______________________________________________ OpenSCAD mailing list [hidden email] http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org signature.asc (836 bytes) Download Attachment
Open this post in threaded view
|

## Re: Rotary extrude with constant wall thickness, plz help!

 Hello guys, great ideas, i will give the different solutions a try this evening. Will report back when i got some results. By the way, the Brim structure (intersected) is not only two walls but more complex in reality. I hope thats still ok for the posted resolutions. Pat
Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

 In reply to this post by Peter Falke Hello, actually that works good for a cylinder object, but it doesnt work for a complex shape like polygon( points=[[0,0],[2,1],[1,2],[1,3],[3,4],[0,5]] ); The cross section of my brim is a complex profile. How can i do that? Please help!
Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

 This post has NOT been accepted by the mailing list yet. In reply to this post by PYM Scale is an affine transformation, and as such converts an ellipse into another ellipse (a circle is an ellipse where both axes are of equal length). What you want is a plain rotation, followed by a translation. Since inside any CSG solid there is hidden the solid's reference coordinate system, which is attached to that solid and rotates with it, the distance needed for that translation is given by the equation of an ellipse in polar coordinates. This is the code: for(i=[0:10:360])   { A=25;   //long half-axis of ellipse     B=10;   //short half-axis of ellipse     Width=15;  //Width of the brim / Length of the cubes shown     r=A*B/sqrt(A*A*sin(i)*sin(i)+B*B*cos(i)*cos(i));  //Radius of an ellipse in polar coordinates     echo("i=",i); echo("y=",y);         { color("violet")       rotate(i+5,[1,0,0])       translate([0,A,0])       cube([2,1,1],center=true);     }     { color("violet")       rotate(i+5,[1,0,0])       translate([0,B,0])       cube([2,1,1],center=true);     }     { color("Green")       rotate(i,[1,0,0])       translate([0,r+Width/2,0])       cube([1,Width,1],center=true);     }   } It produces two violet circles passing through the endpoints of the ellipse's major and minor axis, and the green elliptic brim you are looking for. I have intentionally left spaces to better show its components. Make it solid by using any of the usual techniques: a wider cube is the easiest. Better resolution is obtained by increasing the number of steps in the for loop, and decreasing the upper limit from 360 degrees to e.g. 180 degrees produces a partial ellipse / circle, i.e. the silly limitations of both linear_extrude and rotate_extrude are overcome, and rods, screws, gears, tori can all be easily made. It is however necessary to pay careful attention to the built-in (and hidden) coordinate system any CSG solid has. It rotates and translates together with the solid, and except for center=true or center= false I am not aware of any way to programmatically control it in OpenSCAD. And while I am at it, also be careful with the vector setting in the rotate command. I have obtained a lot of non-sensical behaviour when using arbitrary vectors. And lastly, be aware: the outer edge of your brim is not an ellipse. Only the inner one is. Setting the step variable in the for loop to 0.1 will make that abundantly clear.
Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

 In reply to this post by Peter Falke Hello Peter, no not really, see the link for a quick sketch of what i need. Maybe an admin can actually merge this Thread and the linked one?
Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

 In reply to this post by wolf Hi, thanks for the code, but i dont think it makes a good ellipse. I used hull() around the for-loop to illustrate that. See the picture.
Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

 Hello guys, @wolf: Sorry i overread in your post that only the inner boundary is an ellipse. You are of course right about that! I made some advancements in creating an elliptic brim with sweep() in scad-utils. However, i dont get why my extruded shape twists around its path with my ellipse equation: Here is my code: use use use A=450;   //long half-axis of ellipse B=300;   //short half-axis of ellipse /* function f(t) = [     (t / 1.5 + 0.5) * 100 * cos(6 * 360 * t),     (t / 1.5 + 0.5) * 100 * sin(6 * 360 * t),     200 * (1 - t) ]; */ function e(i) = [     450 * cos(6 * 360 * i),     300 * sin(6 * 360 * i),     0 ]; function shape() = [     [-10, -1],     [-10,  6],     [ -7,  6],     [ -7,  1],     [  7,  1],     [  7,  6],     [ 10,  6],     [ 10, -1]]; function myshape() = square(10);         step = 0.0005; /* path = [for (t=[0:step:1-step]) f(t)]; path_transforms = construct_transform_path(path); sweep(shape(), path_transforms); */ path = [for (i=[0:step:1-step]) e(i)]; path_transforms = construct_transform_path(path); sweep(myshape(), path_transforms);
Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

 In reply to this post by PYM This may not help your case directly, but here's one way to use 2D Minkowski to create an extension in a particular direction for an arbitrary 2D shape: https://github.com/clothbot/ClothBotCreations/blob/master/examples/directional_minkowski.scadYou can then use it as a mask for other shapes, features, etc. Enable "Animation" for fun; looks kinda like a projected shadow. Andrew.
Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

Open this post in threaded view
|

## Re: Fwd: Rotary extrude with constant wall thickness, plz help!

Open this post in threaded view
|