discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Cylindrical Skew?

A
azdle
Sun, Mar 3, 2024 2:42 AM

I'm trying to design a one-piece printable Stevenson Screen. It's
basically a cylinder with downward angled channels all around to
prevent any direct sunlight from getting at a temperature sensor. See
the attached overview image.

I'm struggling to get the geometry to all line up. I was trying to do
this by using BOSL2's cylindrical_extrude with a 45-degree rotated
square and then skewing the result down.

use <BOSL2/std.scad>

wall = 3;
cells_around = 16;
downward_angle = 50;
body_od = 150;
body_id = 75;

body_oc = PI * body_od;
cell_width = (body_oc / cells_around) * sin(45);

module cell() {
    skew(szy = sin(downward_angle))
    cylindrical_extrude(od = body_od, id=body_id, spin=360)
    zrot(45)
    difference () {
        square([cell_width, cell_width], center = true);
        square([cell_width - wall, cell_width - wall], center = 

true);
}
}

zrot_copies(n = cells_around)
cell();

zrot(360/cells_around/2)
zcopies(cell_width/sin(45), 2)
zrot_copies(n = cells_around)
cell();

However this doesn't work because the side points get skewed quite as
far as the center points. AFAIK that's because the side points are ever
so slightly closer to the Y-Z plane so they don't get skewed down quite
as far.

I think the thing that I want is a way to skew as a function of
distance from the Z-axis rather than the Y-Z plane. But, I can't figure
out any way to do that. Is that something that's possible? Or is there
a better way to go about this?

I'm trying to design a one-piece printable Stevenson Screen. It's basically a cylinder with downward angled channels all around to prevent any direct sunlight from getting at a temperature sensor. See the attached overview image. I'm struggling to get the geometry to all line up. I was trying to do this by using BOSL2's cylindrical_extrude with a 45-degree rotated square and then skewing the result down. use <BOSL2/std.scad> wall = 3; cells_around = 16; downward_angle = 50; body_od = 150; body_id = 75; body_oc = PI * body_od; cell_width = (body_oc / cells_around) * sin(45); module cell() { skew(szy = sin(downward_angle)) cylindrical_extrude(od = body_od, id=body_id, spin=360) zrot(45) difference () { square([cell_width, cell_width], center = true); square([cell_width - wall, cell_width - wall], center = true); } } zrot_copies(n = cells_around) cell(); zrot(360/cells_around/2) zcopies(cell_width/sin(45), 2) zrot_copies(n = cells_around) cell(); However this doesn't work because the side points get skewed quite as far as the center points. AFAIK that's because the side points are ever so slightly closer to the Y-Z plane so they don't get skewed down quite as far. I think the thing that I want is a way to skew as a function of distance from the Z-axis rather than the Y-Z plane. But, I can't figure out any way to do that. Is that something that's possible? Or is there a better way to go about this?
SP
Sanjeev Prabhakar
Sun, Mar 3, 2024 8:58 AM

actual shape cannot remain square at both the ends, because as the radius
increases, height of the square section will remain same and the width will
increase.

maybe the shape will be something like this
check the attached file
[image: image.png]

On Sun, 3 Mar 2024 at 08:13, azdle via Discuss discuss@lists.openscad.org
wrote:

I'm trying to design a one-piece printable Stevenson Screen. It's
basically a cylinder with downward angled channels all around to
prevent any direct sunlight from getting at a temperature sensor. See
the attached overview image.

I'm struggling to get the geometry to all line up. I was trying to do
this by using BOSL2's cylindrical_extrude with a 45-degree rotated
square and then skewing the result down.

 use <BOSL2/std.scad>

 wall = 3;
 cells_around = 16;
 downward_angle = 50;
 body_od = 150;
 body_id = 75;

 body_oc = PI * body_od;
 cell_width = (body_oc / cells_around) * sin(45);

 module cell() {
     skew(szy = sin(downward_angle))
     cylindrical_extrude(od = body_od, id=body_id, spin=360)
     zrot(45)
     difference () {
         square([cell_width, cell_width], center = true);
         square([cell_width - wall, cell_width - wall], center =

true);
}
}

 zrot_copies(n = cells_around)
 cell();

 zrot(360/cells_around/2)
 zcopies(cell_width/sin(45), 2)
 zrot_copies(n = cells_around)
 cell();

However this doesn't work because the side points get skewed quite as
far as the center points. AFAIK that's because the side points are ever
so slightly closer to the Y-Z plane so they don't get skewed down quite
as far.

I think the thing that I want is a way to skew as a function of
distance from the Z-axis rather than the Y-Z plane. But, I can't figure
out any way to do that. Is that something that's possible? Or is there
a better way to go about this?


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

actual shape cannot remain square at both the ends, because as the radius increases, height of the square section will remain same and the width will increase. maybe the shape will be something like this check the attached file [image: image.png] On Sun, 3 Mar 2024 at 08:13, azdle via Discuss <discuss@lists.openscad.org> wrote: > I'm trying to design a one-piece printable Stevenson Screen. It's > basically a cylinder with downward angled channels all around to > prevent any direct sunlight from getting at a temperature sensor. See > the attached overview image. > > I'm struggling to get the geometry to all line up. I was trying to do > this by using BOSL2's cylindrical_extrude with a 45-degree rotated > square and then skewing the result down. > > use <BOSL2/std.scad> > > wall = 3; > cells_around = 16; > downward_angle = 50; > body_od = 150; > body_id = 75; > > body_oc = PI * body_od; > cell_width = (body_oc / cells_around) * sin(45); > > module cell() { > skew(szy = sin(downward_angle)) > cylindrical_extrude(od = body_od, id=body_id, spin=360) > zrot(45) > difference () { > square([cell_width, cell_width], center = true); > square([cell_width - wall, cell_width - wall], center = > true); > } > } > > zrot_copies(n = cells_around) > cell(); > > zrot(360/cells_around/2) > zcopies(cell_width/sin(45), 2) > zrot_copies(n = cells_around) > cell(); > > However this doesn't work because the side points get skewed quite as > far as the center points. AFAIK that's because the side points are ever > so slightly closer to the Y-Z plane so they don't get skewed down quite > as far. > > I think the thing that I want is a way to skew as a function of > distance from the Z-axis rather than the Y-Z plane. But, I can't figure > out any way to do that. Is that something that's possible? Or is there > a better way to go about this? > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Sun, Mar 3, 2024 10:46 AM

forgot to give the slant
this one is better
also added a few functions in dependencies2.scad file to provide slices in
case you are interested.
[image: image.png]

On Sun, 3 Mar 2024 at 14:28, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

actual shape cannot remain square at both the ends, because as the radius
increases, height of the square section will remain same and the width will
increase.

maybe the shape will be something like this
check the attached file
[image: image.png]

On Sun, 3 Mar 2024 at 08:13, azdle via Discuss discuss@lists.openscad.org
wrote:

I'm trying to design a one-piece printable Stevenson Screen. It's
basically a cylinder with downward angled channels all around to
prevent any direct sunlight from getting at a temperature sensor. See
the attached overview image.

I'm struggling to get the geometry to all line up. I was trying to do
this by using BOSL2's cylindrical_extrude with a 45-degree rotated
square and then skewing the result down.

 use <BOSL2/std.scad>

 wall = 3;
 cells_around = 16;
 downward_angle = 50;
 body_od = 150;
 body_id = 75;

 body_oc = PI * body_od;
 cell_width = (body_oc / cells_around) * sin(45);

 module cell() {
     skew(szy = sin(downward_angle))
     cylindrical_extrude(od = body_od, id=body_id, spin=360)
     zrot(45)
     difference () {
         square([cell_width, cell_width], center = true);
         square([cell_width - wall, cell_width - wall], center =

true);
}
}

 zrot_copies(n = cells_around)
 cell();

 zrot(360/cells_around/2)
 zcopies(cell_width/sin(45), 2)
 zrot_copies(n = cells_around)
 cell();

However this doesn't work because the side points get skewed quite as
far as the center points. AFAIK that's because the side points are ever
so slightly closer to the Y-Z plane so they don't get skewed down quite
as far.

I think the thing that I want is a way to skew as a function of
distance from the Z-axis rather than the Y-Z plane. But, I can't figure
out any way to do that. Is that something that's possible? Or is there
a better way to go about this?


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

forgot to give the slant this one is better also added a few functions in dependencies2.scad file to provide slices in case you are interested. [image: image.png] On Sun, 3 Mar 2024 at 14:28, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > actual shape cannot remain square at both the ends, because as the radius > increases, height of the square section will remain same and the width will > increase. > > maybe the shape will be something like this > check the attached file > [image: image.png] > > On Sun, 3 Mar 2024 at 08:13, azdle via Discuss <discuss@lists.openscad.org> > wrote: > >> I'm trying to design a one-piece printable Stevenson Screen. It's >> basically a cylinder with downward angled channels all around to >> prevent any direct sunlight from getting at a temperature sensor. See >> the attached overview image. >> >> I'm struggling to get the geometry to all line up. I was trying to do >> this by using BOSL2's cylindrical_extrude with a 45-degree rotated >> square and then skewing the result down. >> >> use <BOSL2/std.scad> >> >> wall = 3; >> cells_around = 16; >> downward_angle = 50; >> body_od = 150; >> body_id = 75; >> >> body_oc = PI * body_od; >> cell_width = (body_oc / cells_around) * sin(45); >> >> module cell() { >> skew(szy = sin(downward_angle)) >> cylindrical_extrude(od = body_od, id=body_id, spin=360) >> zrot(45) >> difference () { >> square([cell_width, cell_width], center = true); >> square([cell_width - wall, cell_width - wall], center = >> true); >> } >> } >> >> zrot_copies(n = cells_around) >> cell(); >> >> zrot(360/cells_around/2) >> zcopies(cell_width/sin(45), 2) >> zrot_copies(n = cells_around) >> cell(); >> >> However this doesn't work because the side points get skewed quite as >> far as the center points. AFAIK that's because the side points are ever >> so slightly closer to the Y-Z plane so they don't get skewed down quite >> as far. >> >> I think the thing that I want is a way to skew as a function of >> distance from the Z-axis rather than the Y-Z plane. But, I can't figure >> out any way to do that. Is that something that's possible? Or is there >> a better way to go about this? >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >
A
azdle
Sun, Mar 3, 2024 3:27 PM

actual shape cannot remain square at both the ends, because as the
radius increases, height of the square section will remain same and
the width will increase.

That's not the issue I'm trying to solve.

If you comment out the skew in the scad snippet I posted, you'll see
that all 4 points of each the cells exactly line up with each of it's
neighbors. But, once skewed, the left & right points no longer line up
with the top & bottom points of the cells in the row above and below.

I'm perfectly fine with the inner parts of the cells no longer being
square.

maybe the shape will be something like this
check the attached file

forgot to give the slant
this one is better
also added a few functions in dependencies2.scad file to provide
slices in case you are interested.

How are you generating the trial file? That isn't quite the shape that
I'm going for, but you may be on to something, I just don't know what
it is.

> actual shape cannot remain square at both the ends, because as the > radius increases, height of the square section will remain same and > the width will increase. That's not the issue I'm trying to solve. If you comment out the skew in the scad snippet I posted, you'll see that all 4 points of each the cells exactly line up with each of it's neighbors. But, once skewed, the left & right points no longer line up with the top & bottom points of the cells in the row above and below. I'm perfectly fine with the inner parts of the cells no longer being square. > maybe the shape will be something like this > check the attached file > > forgot to give the slant > this one is better > also added a few functions in dependencies2.scad file to provide > slices in case you are interested. How are you generating the trial file? That isn't quite the shape that I'm going for, but you may be on to something, I just don't know what it is.
SP
Sanjeev Prabhakar
Sun, Mar 3, 2024 3:50 PM

I tried running your file.
downloaded bosl2, but it was showing some errors, so tried to draw
something similar to the pictures you attached.
Anyway, maybe I could not understand the design intent here.
better luck next time

On Sun, 3 Mar 2024 at 20:57, azdle azdle@azdle.net wrote:

actual shape cannot remain square at both the ends, because as the
radius increases, height of the square section will remain same and
the width will increase.

That's not the issue I'm trying to solve.

If you comment out the skew in the scad snippet I posted, you'll see
that all 4 points of each the cells exactly line up with each of it's
neighbors. But, once skewed, the left & right points no longer line up
with the top & bottom points of the cells in the row above and below.

I'm perfectly fine with the inner parts of the cells no longer being
square.

maybe the shape will be something like this
check the attached file

forgot to give the slant
this one is better
also added a few functions in dependencies2.scad file to provide
slices in case you are interested.

How are you generating the trial file? That isn't quite the shape that
I'm going for, but you may be on to something, I just don't know what
it is.

I tried running your file. downloaded bosl2, but it was showing some errors, so tried to draw something similar to the pictures you attached. Anyway, maybe I could not understand the design intent here. better luck next time On Sun, 3 Mar 2024 at 20:57, azdle <azdle@azdle.net> wrote: > > > > actual shape cannot remain square at both the ends, because as the > > radius increases, height of the square section will remain same and > > the width will increase. > > That's not the issue I'm trying to solve. > > If you comment out the skew in the scad snippet I posted, you'll see > that all 4 points of each the cells exactly line up with each of it's > neighbors. But, once skewed, the left & right points no longer line up > with the top & bottom points of the cells in the row above and below. > > I'm perfectly fine with the inner parts of the cells no longer being > square. > > > > maybe the shape will be something like this > > check the attached file > > > > forgot to give the slant > > this one is better > > also added a few functions in dependencies2.scad file to provide > > slices in case you are interested. > > How are you generating the trial file? That isn't quite the shape that > I'm going for, but you may be on to something, I just don't know what > it is. > > >
A
azdle
Sun, Mar 3, 2024 3:54 PM

On Sun, Mar 3 2024 at 09:20:34 PM +0530, Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

I tried running your file.
downloaded bosl2, but it was showing some errors, so tried to draw
something similar to the pictures you attached.
Anyway, maybe I could not understand the design intent here.
better luck next time

Thanks for your help, hopefully someone else will know.

On Sun, Mar 3 2024 at 09:20:34 PM +0530, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I tried running your file. > downloaded bosl2, but it was showing some errors, so tried to draw > something similar to the pictures you attached. > Anyway, maybe I could not understand the design intent here. > better luck next time Thanks for your help, hopefully someone else will know.
SP
Sanjeev Prabhakar
Sun, Mar 3, 2024 4:08 PM

you want the outer cells to be square

On Sun, 3 Mar 2024 at 21:24, azdle azdle@azdle.net wrote:

On Sun, Mar 3 2024 at 09:20:34 PM +0530, Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

I tried running your file.
downloaded bosl2, but it was showing some errors, so tried to draw
something similar to the pictures you attached.
Anyway, maybe I could not understand the design intent here.
better luck next time

Thanks for your help, hopefully someone else will know.

you want the outer cells to be square On Sun, 3 Mar 2024 at 21:24, azdle <azdle@azdle.net> wrote: > > > On Sun, Mar 3 2024 at 09:20:34 PM +0530, Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > I tried running your file. > > downloaded bosl2, but it was showing some errors, so tried to draw > > something similar to the pictures you attached. > > Anyway, maybe I could not understand the design intent here. > > better luck next time > > Thanks for your help, hopefully someone else will know. > > >
A
azdle
Sun, Mar 3, 2024 4:31 PM

Yeah, I was going for square at the outside and diamond shaped at the
inside.

I also want to make it parametric. I've got a few designs I want to try
with different sizes, cell counts and wall thicknesses.

Also, I'm still curious what you're using to generate the giant list of
points in your scad file.

On Sun, Mar 3 2024 at 09:38:12 PM +0530, Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

you want the outer cells to be square

On Sun, 3 Mar 2024 at 21:24, azdle azdle@azdle.net wrote:

On Sun, Mar 3 2024 at 09:20:34 PM +0530, Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

I tried running your file.
downloaded bosl2, but it was showing some errors, so tried to draw
something similar to the pictures you attached.
Anyway, maybe I could not understand the design intent here.
better luck next time

Thanks for your help, hopefully someone else will know.

Yeah, I was going for square at the outside and diamond shaped at the inside. I also want to make it parametric. I've got a few designs I want to try with different sizes, cell counts and wall thicknesses. Also, I'm still curious what you're using to generate the giant list of points in your scad file. On Sun, Mar 3 2024 at 09:38:12 PM +0530, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > you want the outer cells to be square > > On Sun, 3 Mar 2024 at 21:24, azdle <azdle@azdle.net> wrote: >> >> >> On Sun, Mar 3 2024 at 09:20:34 PM +0530, Sanjeev Prabhakar >> <sprabhakar2006@gmail.com> wrote: >> > I tried running your file. >> > downloaded bosl2, but it was showing some errors, so tried to draw >> > something similar to the pictures you attached. >> > Anyway, maybe I could not understand the design intent here. >> > better luck next time >> >> Thanks for your help, hopefully someone else will know. >> >>
SP
Sanjeev Prabhakar
Sun, Mar 3, 2024 4:44 PM

I do all the calculations in python and render results in openSCAD and use
native features of openSCAD like intersection, difference etc to draw
shapes.
and it is perfectly parametric in python
Is this the shape?

[image: image.png]

On Sun, 3 Mar 2024 at 22:01, azdle azdle@azdle.net wrote:

Yeah, I was going for square at the outside and diamond shaped at the
inside.

I also want to make it parametric. I've got a few designs I want to try
with different sizes, cell counts and wall thicknesses.

Also, I'm still curious what you're using to generate the giant list of
points in your scad file.

On Sun, Mar 3 2024 at 09:38:12 PM +0530, Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

you want the outer cells to be square

On Sun, 3 Mar 2024 at 21:24, azdle azdle@azdle.net wrote:

On Sun, Mar 3 2024 at 09:20:34 PM +0530, Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

I tried running your file.
downloaded bosl2, but it was showing some errors, so tried to draw
something similar to the pictures you attached.
Anyway, maybe I could not understand the design intent here.
better luck next time

Thanks for your help, hopefully someone else will know.

I do all the calculations in python and render results in openSCAD and use native features of openSCAD like intersection, difference etc to draw shapes. and it is perfectly parametric in python Is this the shape? [image: image.png] On Sun, 3 Mar 2024 at 22:01, azdle <azdle@azdle.net> wrote: > Yeah, I was going for square at the outside and diamond shaped at the > inside. > > I also want to make it parametric. I've got a few designs I want to try > with different sizes, cell counts and wall thicknesses. > > Also, I'm still curious what you're using to generate the giant list of > points in your scad file. > > On Sun, Mar 3 2024 at 09:38:12 PM +0530, Sanjeev Prabhakar > <sprabhakar2006@gmail.com> wrote: > > you want the outer cells to be square > > > > On Sun, 3 Mar 2024 at 21:24, azdle <azdle@azdle.net> wrote: > >> > >> > >> On Sun, Mar 3 2024 at 09:20:34 PM +0530, Sanjeev Prabhakar > >> <sprabhakar2006@gmail.com> wrote: > >> > I tried running your file. > >> > downloaded bosl2, but it was showing some errors, so tried to draw > >> > something similar to the pictures you attached. > >> > Anyway, maybe I could not understand the design intent here. > >> > better luck next time > >> > >> Thanks for your help, hopefully someone else will know. > >> > >> > > >
A
azdle
Sun, Mar 3, 2024 5:05 PM

Yeah! That looks like pretty much exactly what I'm going for.

Any chance you can share the scad file and the python too?

On Sun, Mar 3 2024 at 10:14:47 PM +0530, Sanjeev Prabhakar
sprabhakar2006@gmail.com wrote:

I do all the calculations in python and render results in openSCAD
and use native features of openSCAD like intersection, difference etc
to draw shapes.
and it is perfectly parametric in python
Is this the shape?

Yeah! That looks like pretty much exactly what I'm going for. Any chance you can share the scad file and the python too? On Sun, Mar 3 2024 at 10:14:47 PM +0530, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I do all the calculations in python and render results in openSCAD > and use native features of openSCAD like intersection, difference etc > to draw shapes. > and it is perfectly parametric in python > Is this the shape? > >