Rotary extrude with constant wall thickness, plz help!

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

Rotary extrude with constant wall thickness, plz help!

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

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

PYM



-------- Weitergeleitete Nachricht --------
Betreff: [OpenSCAD] Rotary extrude with constant wall thickness, plz help!
Datum: Fri, 24 Jul 2015 08:57:40 -0700 (MST)
Von: PYM [hidden email]
Antwort an: OpenSCAD general discussion [hidden email]
An: [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.

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]);
				}
			}
		}
	}
}




--
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.

_______________________________________________
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: Fwd: Rotary extrude with constant wall thickness, plz help!

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 <[hidden email]>:



-------- Weitergeleitete Nachricht --------
Betreff: [OpenSCAD] Rotary extrude with constant wall thickness, plz help!
Datum: Fri, 24 Jul 2015 08:57:40 -0700 (MST)
Von: PYM [hidden email]
Antwort an: OpenSCAD general discussion [hidden email]
An: [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.

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]);
				}
			}
		}
	}
}




--
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.

_______________________________________________
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




--
[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.
Please let me know, if you like to read more.

Enjoy!

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

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

Greg Frost
In reply to this post by PYM
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.

Greg Frost

> On 25 Jul 2015, at 1:27 am, PYM <[hidden email]> wrote:
>
> 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]);
>                }
>            }
>        }
>    }
> }
>
>
>
>
> --
> 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.
>
> _______________________________________________
> 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: Fwd: Rotary extrude with constant wall thickness, plz help!

Peter Falke
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 <[hidden email]>:
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 <[hidden email]>:



-------- Weitergeleitete Nachricht --------
Betreff: [OpenSCAD] Rotary extrude with constant wall thickness, plz help!
Datum: Fri, 24 Jul 2015 08:57:40 -0700 (MST)
Von: PYM [hidden email]
Antwort an: OpenSCAD general discussion [hidden email]
An: [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.

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]);
				}
			}
		}
	}
}




--
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.

_______________________________________________
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




--
[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.
Please let me know, if you like to read more.

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.
Please let me know, if you like to read more.

Enjoy!

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

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

Peter Falke
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 <[hidden email]>:
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 <[hidden email]>:
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 <[hidden email]>:



-------- Weitergeleitete Nachricht --------
Betreff: [OpenSCAD] Rotary extrude with constant wall thickness, plz help!
Datum: Fri, 24 Jul 2015 08:57:40 -0700 (MST)
Von: PYM [hidden email]
Antwort an: OpenSCAD general discussion [hidden email]
An: [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.

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]);
				}
			}
		}
	}
}




--
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.

_______________________________________________
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




--
[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.
Please let me know, if you like to read more.

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.
Please let me know, if you like to read more.

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.
Please let me know, if you like to read more.

Enjoy!

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

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

louijp
In reply to this post by PYM
What about:

$fn = 100;

module MyEllipse() { scale([2.5,1,1]) circle(100); }

difference() {
        linear_extrude(10) MyEllipse();
        translate([0,0,-1])
                linear_extrude(12) offset(r=-2) MyEllipse();
}
difference() {
        linear_extrude(10) offset(r=-8) MyEllipse();
        translate([0,0,-1])
                linear_extrude(12) offset(r=-10) MyEllipse();
}
That works great and fast.

Jean-Paul
AC9GH



> On Jul 24, 2015, at 11:59 AM, Patrick Mörwald <[hidden email]> wrote:
>
>
>
>
> -------- Weitergeleitete Nachricht --------
> Betreff: [OpenSCAD] Rotary extrude with constant wall thickness, plz help!
> Datum: Fri, 24 Jul 2015 08:57:40 -0700 (MST)
> Von: PYM <[hidden email]>
> Antwort an: OpenSCAD general discussion <[hidden email]>
> An: [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.
>
> 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]);
> }
> }
> }
> }
> }
>
>
>
>
> --
> 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.
>
> _______________________________________________
> 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


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

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

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

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

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

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

PYM
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!

Reply | Threaded
Open this post in threaded view
|

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

Peter Falke

​Is this what you want?

module shape(){
    polygon( points=[[0,0],[2,1],[1,2],[1,3],[3,4],[0,5]] );
}


$fn = 32;

difference(){
offset(r=.5)shape();
shape();
}

%color("red")shape();

2015-07-27 11:46 GMT+02:00 PYM <[hidden email]>:
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!





--
View this message in context: http://forum.openscad.org/Rotary-extrude-with-constant-wall-thickness-plz-help-tp13287p13319.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



--
[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.
Please let me know, if you like to read more.

Enjoy!

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

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

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

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

PYM
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?



PYM
Reply | Threaded
Open this post in threaded view
|

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

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

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

PYM
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 <list-comprehension-demos/sweep.scad>
use <scad-utils/transformations.scad>
use <scad-utils/shapes.scad>

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

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

clothbot
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.scad

You can then use it as a mask for other shapes, features, etc.

Enable "Animation" for fun; looks kinda like a projected shadow.

Andrew.
Reply | Threaded
Open this post in threaded view
|

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

Peter Falke
Here is my first take on the brim problem.
This is done by chain-hull()ing the profile at angle aa and aa+delta aa, respectively.
One problem of chain-hull()ing is that it can only handle convex profiles, therefore the profile of the vessel is subtracted by parts.
(The second problem is that it gets slow for higher resolution (here $fn and fn_a))

But there is still a problem with the angle of the profile along the ellipse: the profile points in the direction of the angle aa, but it should point along the normal of the ellipse at angle aa.
This can be seen in the third picture.
Now this will require some work with trigonometry and a pencil. :(
Or does someone know the angle of the normal on an ellipse as function of the angle of the "radius"?

The code is in the appendix.

From below:

Miss aligned profile:






2015-07-28 16:59 GMT+02:00 clothbot <[hidden email]>:
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.scad

You can then use it as a mask for other shapes, features, etc.

Enable "Animation" for fun; looks kinda like a projected shadow.

Andrew.




--
View this message in context: http://forum.openscad.org/Rotary-extrude-with-constant-wall-thickness-plz-help-tp13287p13335.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



--
[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.
Please let me know, if you like to read more.

Enjoy!

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

brim.scad (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Peter Falke
Ok, I found the normal angle as a function of polar angle.

// angle of the normal (aa_n) along the ellipse as function of the polar angle (aa)
function aa_n(x1,x2,aa)=atan(x1/x2*tan(aa));

The problem I now have is that atan(tan(aa)) diverges at aa=90 (and 270) degree.
How do I fix that?




2015-07-28 18:23 GMT+02:00 Peter Falke <[hidden email]>:
Here is my first take on the brim problem.
This is done by chain-hull()ing the profile at angle aa and aa+delta aa, respectively.
One problem of chain-hull()ing is that it can only handle convex profiles, therefore the profile of the vessel is subtracted by parts.
(The second problem is that it gets slow for higher resolution (here $fn and fn_a))

But there is still a problem with the angle of the profile along the ellipse: the profile points in the direction of the angle aa, but it should point along the normal of the ellipse at angle aa.
This can be seen in the third picture.
Now this will require some work with trigonometry and a pencil. :(
Or does someone know the angle of the normal on an ellipse as function of the angle of the "radius"?

The code is in the appendix.

From below:

Miss aligned profile:






2015-07-28 16:59 GMT+02:00 clothbot <[hidden email]>:
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.scad

You can then use it as a mask for other shapes, features, etc.

Enable "Animation" for fun; looks kinda like a projected shadow.

Andrew.




--
View this message in context: http://forum.openscad.org/Rotary-extrude-with-constant-wall-thickness-plz-help-tp13287p13335.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



--
[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.
Please let me know, if you like to read more.

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.
Please let me know, if you like to read more.

Enjoy!

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

brim2.scad (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

nophead
Use atan2((x1,x2*tan(aa))

On 28 July 2015 at 18:50, Peter Falke <[hidden email]> wrote:
Ok, I found the normal angle as a function of polar angle.

// angle of the normal (aa_n) along the ellipse as function of the polar angle (aa)
function aa_n(x1,x2,aa)=atan(x1/x2*tan(aa));

The problem I now have is that atan(tan(aa)) diverges at aa=90 (and 270) degree.
How do I fix that?




2015-07-28 18:23 GMT+02:00 Peter Falke <[hidden email]>:
Here is my first take on the brim problem.
This is done by chain-hull()ing the profile at angle aa and aa+delta aa, respectively.
One problem of chain-hull()ing is that it can only handle convex profiles, therefore the profile of the vessel is subtracted by parts.
(The second problem is that it gets slow for higher resolution (here $fn and fn_a))

But there is still a problem with the angle of the profile along the ellipse: the profile points in the direction of the angle aa, but it should point along the normal of the ellipse at angle aa.
This can be seen in the third picture.
Now this will require some work with trigonometry and a pencil. :(
Or does someone know the angle of the normal on an ellipse as function of the angle of the "radius"?

The code is in the appendix.

From below:

Miss aligned profile:






2015-07-28 16:59 GMT+02:00 clothbot <[hidden email]>:
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.scad

You can then use it as a mask for other shapes, features, etc.

Enable "Animation" for fun; looks kinda like a projected shadow.

Andrew.




--
View this message in context: http://forum.openscad.org/Rotary-extrude-with-constant-wall-thickness-plz-help-tp13287p13335.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



--
[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.
Please let me know, if you like to read more.

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.
Please let me know, if you like to read more.

Enjoy!

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

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

tp3
In reply to this post by PYM
On 07/28/2015 03:22 PM, PYM wrote:
> 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:
> <http://forum.openscad.org/file/n13333/twisted_shape.png>
>
I don't have the math background to explain why it happens, but there's
an easy workaround. Just sweep in the X-Z plane by changing e() to

function e(i) = [
     450 * cos(6 * 360 * i),
     0,
     300 * sin(6 * 360 * i)
];

and rotate the result back to X-Y.

ciao,
   Torsten.


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