discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

putting fillets on wheel spokes?

K
Ken
Mon, Nov 7, 2022 11:04 PM

I've drawn up what will be a pattern for casting a curved-spoke flywheel
for an old style miniature stationary engine. I need to put a small
(2mm) fillet at both ends of the spokes to help prevent fatigue cracking
when the engine is running, but am at a complete loss as to how to do
it. It is complicated somewhat by the need to have a small taper on both
inner and outer hubs, to enable the pattern to be withdrawn from the mold.

Below is the code for one half of the flywheel- if anyone has any ideas
for how to put the fillets on, I would be most grateful!


$fn = 128;

//Set up the dimensions
hubdiameter = 52;
shaftdiameter = 8;
wheeldiameter = 208;
rimthickness = 30;
spokethickness = 20;
numberofspokes = 5;
//Don't change the next 3 lines
wheelrimthickness = (wheeldiameter - rimthickness);
spokelength = (wheeldiameter-hubdiameter+5);
rotation = 360/(numberofspokes);

//Wheel hub module
module wheel_hub(){
difference(){
  color ("green")
  cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true);
  color ("navy")
  cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true);
}
}
//Round spoke modules
module bentCubeClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,35,0]) rotate([0,0,-a/2])
rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5);
}
module bentCubeAntiClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,78,0]) rotate([0,0,-a/2.5])
rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5);
}

//Create half-thickness wheel for casting
difference()
{
//Wheel rim
union()
{
difference(){
    color ("violet")
 cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true);
     color ("blue")
cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true);

}
//spokes for wheel
  for (i=[1:numberofspokes]){
    rotate([0,0,rotation * i])
    color ("red")
bentCubeClockwise(10, 4, 44, 10);

}
 for (i=[1:numberofspokes]){
    rotate([0,0,rotation * (i+2.25)])
    color ("blue")
bentCubeAntiClockwise(10, 4, 44, -10);
}
wheel_hub();
}
//Cube to remove half the flywheel
translate([0,0,-10])
cube ([wheeldiameter+40,wheeldiameter+40,20],center=true);
//5mm Alignment pin holes
rotate ([0,0,0])
translate([-98,0,0])
cylinder(h=10,d=5,center = true);
rotate ([0,0,0])
translate([98,0,0])
cylinder(h=10,d=5,center = true);
}


--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com/running.html
https://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.

I've drawn up what will be a pattern for casting a curved-spoke flywheel for an old style miniature stationary engine. I need to put a small (2mm) fillet at both ends of the spokes to help prevent fatigue cracking when the engine is running, but am at a complete loss as to how to do it. It is complicated somewhat by the need to have a small taper on both inner and outer hubs, to enable the pattern to be withdrawn from the mold. Below is the code for one half of the flywheel- if anyone has any ideas for how to put the fillets on, I would be most grateful! *********************************************************** $fn = 128; //Set up the dimensions hubdiameter = 52; shaftdiameter = 8; wheeldiameter = 208; rimthickness = 30; spokethickness = 20; numberofspokes = 5; //Don't change the next 3 lines wheelrimthickness = (wheeldiameter - rimthickness); spokelength = (wheeldiameter-hubdiameter+5); rotation = 360/(numberofspokes); //Wheel hub module module wheel_hub(){ difference(){   color ("green")   cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true);   color ("navy")   cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true); } } //Round spoke modules module bentCubeClockwise(width, height, length, dh) { // calculate radius and angle r = (length*length + 4*dh*dh)/(8*dh); a = 2*asin(length/(2*r)); translate([-r,35,0]) rotate([0,0,-a/2]) rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5); } module bentCubeAntiClockwise(width, height, length, dh) { // calculate radius and angle r = (length*length + 4*dh*dh)/(8*dh); a = 2*asin(length/(2*r)); translate([-r,78,0]) rotate([0,0,-a/2.5]) rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5); } //Create half-thickness wheel for casting difference() { //Wheel rim union() { difference(){     color ("violet")  cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true);      color ("blue") cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true); } //spokes for wheel   for (i=[1:numberofspokes]){     rotate([0,0,rotation * i])     color ("red") bentCubeClockwise(10, 4, 44, 10); }  for (i=[1:numberofspokes]){     rotate([0,0,rotation * (i+2.25)])     color ("blue") bentCubeAntiClockwise(10, 4, 44, -10); } wheel_hub(); } //Cube to remove half the flywheel translate([0,0,-10]) cube ([wheeldiameter+40,wheeldiameter+40,20],center=true); //5mm Alignment pin holes rotate ([0,0,0]) translate([-98,0,0]) cylinder(h=10,d=5,center = true); rotate ([0,0,0]) translate([98,0,0]) cylinder(h=10,d=5,center = true); } ************************************************************************** -- Cheers, Ken bats059@gmail.com https://vk7krj.com/running.html https://sstv.vk7krj.com/all_bands.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Our job as parents is to teach them to control all three.
SP
Sanjeev Prabhakar
Mon, Nov 7, 2022 11:39 PM

This seems to be a simpler case. Maybe define a right triangle type of
shape and rotate extrude it to get a chamfer or fillet and place at various
locations.

Otherwise for creating fillets you have to create models by defining points
for everything e.g. hub should be made by 2 circles defined by points where
one circle is at xy plane and the other one at some height from xy and then
create a polyhedron.

This is required to find the intersection points between the various solids
so that fillets could be formed.

That is quite complex but possible for most of the cases.

If you have any idea about python and jupyter notebook, I have written many
examples for the same which can be referred to.

On Tue, 8 Nov, 2022, 4:34 am Ken, bats059@gmail.com wrote:

I've drawn up what will be a pattern for casting a curved-spoke flywheel
for an old style miniature stationary engine. I need to put a small (2mm)
fillet at both ends of the spokes to help prevent fatigue cracking when the
engine is running, but am at a complete loss as to how to do it. It is
complicated somewhat by the need to have a small taper on both inner and
outer hubs, to enable the pattern to be withdrawn from the mold.

Below is the code for one half of the flywheel- if anyone has any ideas
for how to put the fillets on, I would be most grateful!


$fn = 128;

//Set up the dimensions
hubdiameter = 52;
shaftdiameter = 8;
wheeldiameter = 208;
rimthickness = 30;
spokethickness = 20;
numberofspokes = 5;
//Don't change the next 3 lines
wheelrimthickness = (wheeldiameter - rimthickness);
spokelength = (wheeldiameter-hubdiameter+5);
rotation = 360/(numberofspokes);

//Wheel hub module
module wheel_hub(){
difference(){
color ("green")
cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true);
color ("navy")
cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true);
}
}
//Round spoke modules
module bentCubeClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,35,0]) rotate([0,0,-a/2])
rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5);
}
module bentCubeAntiClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,78,0]) rotate([0,0,-a/2.5])
rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5);
}

//Create half-thickness wheel for casting
difference()
{
//Wheel rim
union()
{
difference(){
color ("violet")
cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true);
color ("blue")
cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true);

}
//spokes for wheel
for (i=[1:numberofspokes]){
rotate([0,0,rotation * i])
color ("red")
bentCubeClockwise(10, 4, 44, 10);

}
for (i=[1:numberofspokes]){
rotate([0,0,rotation * (i+2.25)])
color ("blue")
bentCubeAntiClockwise(10, 4, 44, -10);
}
wheel_hub();
}
//Cube to remove half the flywheel
translate([0,0,-10])
cube ([wheeldiameter+40,wheeldiameter+40,20],center=true);
//5mm Alignment pin holes
rotate ([0,0,0])
translate([-98,0,0])
cylinder(h=10,d=5,center = true);
rotate ([0,0,0])
translate([98,0,0])
cylinder(h=10,d=5,center = true);
}


--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.


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

This seems to be a simpler case. Maybe define a right triangle type of shape and rotate extrude it to get a chamfer or fillet and place at various locations. Otherwise for creating fillets you have to create models by defining points for everything e.g. hub should be made by 2 circles defined by points where one circle is at xy plane and the other one at some height from xy and then create a polyhedron. This is required to find the intersection points between the various solids so that fillets could be formed. That is quite complex but possible for most of the cases. If you have any idea about python and jupyter notebook, I have written many examples for the same which can be referred to. On Tue, 8 Nov, 2022, 4:34 am Ken, <bats059@gmail.com> wrote: > I've drawn up what will be a pattern for casting a curved-spoke flywheel > for an old style miniature stationary engine. I need to put a small (2mm) > fillet at both ends of the spokes to help prevent fatigue cracking when the > engine is running, but am at a complete loss as to how to do it. It is > complicated somewhat by the need to have a small taper on both inner and > outer hubs, to enable the pattern to be withdrawn from the mold. > > Below is the code for one half of the flywheel- if anyone has any ideas > for how to put the fillets on, I would be most grateful! > > *********************************************************** > > $fn = 128; > > //Set up the dimensions > hubdiameter = 52; > shaftdiameter = 8; > wheeldiameter = 208; > rimthickness = 30; > spokethickness = 20; > numberofspokes = 5; > //Don't change the next 3 lines > wheelrimthickness = (wheeldiameter - rimthickness); > spokelength = (wheeldiameter-hubdiameter+5); > rotation = 360/(numberofspokes); > > //Wheel hub module > module wheel_hub(){ > difference(){ > color ("green") > cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true); > color ("navy") > cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true); > } > } > //Round spoke modules > module bentCubeClockwise(width, height, length, dh) > { > // calculate radius and angle > r = (length*length + 4*dh*dh)/(8*dh); > a = 2*asin(length/(2*r)); > translate([-r,35,0]) rotate([0,0,-a/2]) > rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5); > } > module bentCubeAntiClockwise(width, height, length, dh) > { > // calculate radius and angle > r = (length*length + 4*dh*dh)/(8*dh); > a = 2*asin(length/(2*r)); > translate([-r,78,0]) rotate([0,0,-a/2.5]) > rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5); > } > > //Create half-thickness wheel for casting > difference() > { > //Wheel rim > union() > { > difference(){ > color ("violet") > cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true); > color ("blue") > cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true); > > } > //spokes for wheel > for (i=[1:numberofspokes]){ > rotate([0,0,rotation * i]) > color ("red") > bentCubeClockwise(10, 4, 44, 10); > > } > for (i=[1:numberofspokes]){ > rotate([0,0,rotation * (i+2.25)]) > color ("blue") > bentCubeAntiClockwise(10, 4, 44, -10); > } > wheel_hub(); > } > //Cube to remove half the flywheel > translate([0,0,-10]) > cube ([wheeldiameter+40,wheeldiameter+40,20],center=true); > //5mm Alignment pin holes > rotate ([0,0,0]) > translate([-98,0,0]) > cylinder(h=10,d=5,center = true); > rotate ([0,0,0]) > translate([98,0,0]) > cylinder(h=10,d=5,center = true); > } > > ************************************************************************** > > -- > Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Our job as parents is to teach them to control all three. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
AM
Adrian Mariano
Mon, Nov 7, 2022 11:46 PM

This kind of thing is hard in OpenSCAD.  I've written code to make joints
like this entirely in OpenSCAD, unlike Sanjeev's approach with python.  I
think you might be able to use it to make the filleted connection and then
join the rest of your model segments in.  Note that I would probably make
that model using a sweep() operation instead of a bunch of cylinders.
This is a link to the module that makes the filleted joints.  It is part of
the BOSL2 library:

https://github.com/revarbat/BOSL2/wiki/rounding.scad#functionmodule-join_prism

On Mon, Nov 7, 2022 at 6:05 PM Ken bats059@gmail.com wrote:

I've drawn up what will be a pattern for casting a curved-spoke flywheel
for an old style miniature stationary engine. I need to put a small (2mm)
fillet at both ends of the spokes to help prevent fatigue cracking when the
engine is running, but am at a complete loss as to how to do it. It is
complicated somewhat by the need to have a small taper on both inner and
outer hubs, to enable the pattern to be withdrawn from the mold.

Below is the code for one half of the flywheel- if anyone has any ideas
for how to put the fillets on, I would be most grateful!


$fn = 128;

//Set up the dimensions
hubdiameter = 52;
shaftdiameter = 8;
wheeldiameter = 208;
rimthickness = 30;
spokethickness = 20;
numberofspokes = 5;
//Don't change the next 3 lines
wheelrimthickness = (wheeldiameter - rimthickness);
spokelength = (wheeldiameter-hubdiameter+5);
rotation = 360/(numberofspokes);

//Wheel hub module
module wheel_hub(){
difference(){
color ("green")
cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true);
color ("navy")
cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true);
}
}
//Round spoke modules
module bentCubeClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,35,0]) rotate([0,0,-a/2])
rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5);
}
module bentCubeAntiClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,78,0]) rotate([0,0,-a/2.5])
rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5);
}

//Create half-thickness wheel for casting
difference()
{
//Wheel rim
union()
{
difference(){
color ("violet")
cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true);
color ("blue")
cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true);

}
//spokes for wheel
for (i=[1:numberofspokes]){
rotate([0,0,rotation * i])
color ("red")
bentCubeClockwise(10, 4, 44, 10);

}
for (i=[1:numberofspokes]){
rotate([0,0,rotation * (i+2.25)])
color ("blue")
bentCubeAntiClockwise(10, 4, 44, -10);
}
wheel_hub();
}
//Cube to remove half the flywheel
translate([0,0,-10])
cube ([wheeldiameter+40,wheeldiameter+40,20],center=true);
//5mm Alignment pin holes
rotate ([0,0,0])
translate([-98,0,0])
cylinder(h=10,d=5,center = true);
rotate ([0,0,0])
translate([98,0,0])
cylinder(h=10,d=5,center = true);
}


--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.


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

This kind of thing is hard in OpenSCAD. I've written code to make joints like this entirely in OpenSCAD, unlike Sanjeev's approach with python. I think you might be able to use it to make the filleted connection and then join the rest of your model segments in. Note that I would probably make that model using a sweep() operation instead of a bunch of cylinders. This is a link to the module that makes the filleted joints. It is part of the BOSL2 library: https://github.com/revarbat/BOSL2/wiki/rounding.scad#functionmodule-join_prism On Mon, Nov 7, 2022 at 6:05 PM Ken <bats059@gmail.com> wrote: > I've drawn up what will be a pattern for casting a curved-spoke flywheel > for an old style miniature stationary engine. I need to put a small (2mm) > fillet at both ends of the spokes to help prevent fatigue cracking when the > engine is running, but am at a complete loss as to how to do it. It is > complicated somewhat by the need to have a small taper on both inner and > outer hubs, to enable the pattern to be withdrawn from the mold. > > Below is the code for one half of the flywheel- if anyone has any ideas > for how to put the fillets on, I would be most grateful! > > *********************************************************** > > $fn = 128; > > //Set up the dimensions > hubdiameter = 52; > shaftdiameter = 8; > wheeldiameter = 208; > rimthickness = 30; > spokethickness = 20; > numberofspokes = 5; > //Don't change the next 3 lines > wheelrimthickness = (wheeldiameter - rimthickness); > spokelength = (wheeldiameter-hubdiameter+5); > rotation = 360/(numberofspokes); > > //Wheel hub module > module wheel_hub(){ > difference(){ > color ("green") > cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true); > color ("navy") > cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true); > } > } > //Round spoke modules > module bentCubeClockwise(width, height, length, dh) > { > // calculate radius and angle > r = (length*length + 4*dh*dh)/(8*dh); > a = 2*asin(length/(2*r)); > translate([-r,35,0]) rotate([0,0,-a/2]) > rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5); > } > module bentCubeAntiClockwise(width, height, length, dh) > { > // calculate radius and angle > r = (length*length + 4*dh*dh)/(8*dh); > a = 2*asin(length/(2*r)); > translate([-r,78,0]) rotate([0,0,-a/2.5]) > rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5); > } > > //Create half-thickness wheel for casting > difference() > { > //Wheel rim > union() > { > difference(){ > color ("violet") > cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true); > color ("blue") > cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true); > > } > //spokes for wheel > for (i=[1:numberofspokes]){ > rotate([0,0,rotation * i]) > color ("red") > bentCubeClockwise(10, 4, 44, 10); > > } > for (i=[1:numberofspokes]){ > rotate([0,0,rotation * (i+2.25)]) > color ("blue") > bentCubeAntiClockwise(10, 4, 44, -10); > } > wheel_hub(); > } > //Cube to remove half the flywheel > translate([0,0,-10]) > cube ([wheeldiameter+40,wheeldiameter+40,20],center=true); > //5mm Alignment pin holes > rotate ([0,0,0]) > translate([-98,0,0]) > cylinder(h=10,d=5,center = true); > rotate ([0,0,0]) > translate([98,0,0]) > cylinder(h=10,d=5,center = true); > } > > ************************************************************************** > > -- > Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Our job as parents is to teach them to control all three. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
K
Ken
Tue, Nov 8, 2022 2:29 AM

Thank you for your help gentlemen- Sanjeev, I have done a bit with
python but have no idea how to use it with openscad- I will have a look
at that and jupyter notebook when I get a minute.

Adrian, your reference to rounding.scad has worked a treat for filleting
my straight-spoked flywheel code, thanks for that, but I fear it's going
to take me a while to see if I can apply it to the curved-spoke
variation. At first glance, it appears I can't- but then, my old primary
schoolteacher always used to say "there's no such word as can't"!

--

Cheers, Ken
bats059@gmail.com
https://vk7krj.com/running.html
https://vk7krj.com

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.

Thank you for your help gentlemen- Sanjeev, I have done a bit with python but have no idea how to use it with openscad- I will have a look at that and jupyter notebook when I get a minute. Adrian, your reference to rounding.scad has worked a treat for filleting my straight-spoked flywheel code, thanks for that, but I fear it's going to take me a while to see if I can apply it to the curved-spoke variation. At first glance, it appears I can't- but then, my old primary schoolteacher always used to say "there's no such word as can't"! -- Cheers, Ken bats059@gmail.com https://vk7krj.com/running.html https://vk7krj.com ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Our job as parents is to teach them to control all three.
AM
Adrian Mariano
Tue, Nov 8, 2022 2:46 AM

I took a closer look at your code and see that you are using rotate_extrude
to make the spokes.  To use join_prism() I think it is possible, but you'll
have to add a straight section at the end of the rotate_extrude and that
straight section will then be joined to the wheel and get its fillet.
Another way to do it would be to use path_sweep with the scale argument to
increase the size at the ends and create the fillet, though it will
probably be hard to get as smooth of a result.

On Mon, Nov 7, 2022 at 9:31 PM Ken bats059@gmail.com wrote:

Thank you for your help gentlemen- Sanjeev, I have done a bit with
python but have no idea how to use it with openscad- I will have a look
at that and jupyter notebook when I get a minute.

Adrian, your reference to rounding.scad has worked a treat for filleting
my straight-spoked flywheel code, thanks for that, but I fear it's going
to take me a while to see if I can apply it to the curved-spoke
variation. At first glance, it appears I can't- but then, my old primary
schoolteacher always used to say "there's no such word as can't"!

--

Cheers, Ken
bats059@gmail.com
https://vk7krj.com/running.html
https://vk7krj.com

A baby can be defined as an ego with a noise at one end and a smell at the
other.
Our job as parents is to teach them to control all three.


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

I took a closer look at your code and see that you are using rotate_extrude to make the spokes. To use join_prism() I think it is possible, but you'll have to add a straight section at the end of the rotate_extrude and that straight section will then be joined to the wheel and get its fillet. Another way to do it would be to use path_sweep with the scale argument to increase the size at the ends and create the fillet, though it will probably be hard to get as smooth of a result. On Mon, Nov 7, 2022 at 9:31 PM Ken <bats059@gmail.com> wrote: > Thank you for your help gentlemen- Sanjeev, I have done a bit with > python but have no idea how to use it with openscad- I will have a look > at that and jupyter notebook when I get a minute. > > Adrian, your reference to rounding.scad has worked a treat for filleting > my straight-spoked flywheel code, thanks for that, but I fear it's going > to take me a while to see if I can apply it to the curved-spoke > variation. At first glance, it appears I can't- but then, my old primary > schoolteacher always used to say "there's no such word as can't"! > > -- > > Cheers, Ken > bats059@gmail.com > https://vk7krj.com/running.html > https://vk7krj.com > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the > other. > Our job as parents is to teach them to control all three. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Tue, Nov 8, 2022 5:06 PM

I wrote a small code, if it is of some interest to you

also attached the file it generates
its a fairly smooth fillet

On Tue, 8 Nov 2022 at 04:34, Ken bats059@gmail.com wrote:

I've drawn up what will be a pattern for casting a curved-spoke flywheel
for an old style miniature stationary engine. I need to put a small (2mm)
fillet at both ends of the spokes to help prevent fatigue cracking when the
engine is running, but am at a complete loss as to how to do it. It is
complicated somewhat by the need to have a small taper on both inner and
outer hubs, to enable the pattern to be withdrawn from the mold.

Below is the code for one half of the flywheel- if anyone has any ideas
for how to put the fillets on, I would be most grateful!


$fn = 128;

//Set up the dimensions
hubdiameter = 52;
shaftdiameter = 8;
wheeldiameter = 208;
rimthickness = 30;
spokethickness = 20;
numberofspokes = 5;
//Don't change the next 3 lines
wheelrimthickness = (wheeldiameter - rimthickness);
spokelength = (wheeldiameter-hubdiameter+5);
rotation = 360/(numberofspokes);

//Wheel hub module
module wheel_hub(){
difference(){
color ("green")
cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true);
color ("navy")
cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true);
}
}
//Round spoke modules
module bentCubeClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,35,0]) rotate([0,0,-a/2])
rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5);
}
module bentCubeAntiClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,78,0]) rotate([0,0,-a/2.5])
rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5);
}

//Create half-thickness wheel for casting
difference()
{
//Wheel rim
union()
{
difference(){
color ("violet")
cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true);
color ("blue")
cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true);

}
//spokes for wheel
for (i=[1:numberofspokes]){
rotate([0,0,rotation * i])
color ("red")
bentCubeClockwise(10, 4, 44, 10);

}
for (i=[1:numberofspokes]){
rotate([0,0,rotation * (i+2.25)])
color ("blue")
bentCubeAntiClockwise(10, 4, 44, -10);
}
wheel_hub();
}
//Cube to remove half the flywheel
translate([0,0,-10])
cube ([wheeldiameter+40,wheeldiameter+40,20],center=true);
//5mm Alignment pin holes
rotate ([0,0,0])
translate([-98,0,0])
cylinder(h=10,d=5,center = true);
rotate ([0,0,0])
translate([98,0,0])
cylinder(h=10,d=5,center = true);
}


--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.


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

I wrote a small code, if it is of some interest to you also attached the file it generates its a fairly smooth fillet On Tue, 8 Nov 2022 at 04:34, Ken <bats059@gmail.com> wrote: > I've drawn up what will be a pattern for casting a curved-spoke flywheel > for an old style miniature stationary engine. I need to put a small (2mm) > fillet at both ends of the spokes to help prevent fatigue cracking when the > engine is running, but am at a complete loss as to how to do it. It is > complicated somewhat by the need to have a small taper on both inner and > outer hubs, to enable the pattern to be withdrawn from the mold. > > Below is the code for one half of the flywheel- if anyone has any ideas > for how to put the fillets on, I would be most grateful! > > *********************************************************** > > $fn = 128; > > //Set up the dimensions > hubdiameter = 52; > shaftdiameter = 8; > wheeldiameter = 208; > rimthickness = 30; > spokethickness = 20; > numberofspokes = 5; > //Don't change the next 3 lines > wheelrimthickness = (wheeldiameter - rimthickness); > spokelength = (wheeldiameter-hubdiameter+5); > rotation = 360/(numberofspokes); > > //Wheel hub module > module wheel_hub(){ > difference(){ > color ("green") > cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true); > color ("navy") > cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true); > } > } > //Round spoke modules > module bentCubeClockwise(width, height, length, dh) > { > // calculate radius and angle > r = (length*length + 4*dh*dh)/(8*dh); > a = 2*asin(length/(2*r)); > translate([-r,35,0]) rotate([0,0,-a/2]) > rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5); > } > module bentCubeAntiClockwise(width, height, length, dh) > { > // calculate radius and angle > r = (length*length + 4*dh*dh)/(8*dh); > a = 2*asin(length/(2*r)); > translate([-r,78,0]) rotate([0,0,-a/2.5]) > rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5); > } > > //Create half-thickness wheel for casting > difference() > { > //Wheel rim > union() > { > difference(){ > color ("violet") > cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true); > color ("blue") > cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true); > > } > //spokes for wheel > for (i=[1:numberofspokes]){ > rotate([0,0,rotation * i]) > color ("red") > bentCubeClockwise(10, 4, 44, 10); > > } > for (i=[1:numberofspokes]){ > rotate([0,0,rotation * (i+2.25)]) > color ("blue") > bentCubeAntiClockwise(10, 4, 44, -10); > } > wheel_hub(); > } > //Cube to remove half the flywheel > translate([0,0,-10]) > cube ([wheeldiameter+40,wheeldiameter+40,20],center=true); > //5mm Alignment pin holes > rotate ([0,0,0]) > translate([-98,0,0]) > cylinder(h=10,d=5,center = true); > rotate ([0,0,0]) > translate([98,0,0]) > cylinder(h=10,d=5,center = true); > } > > ************************************************************************** > > -- > Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Our job as parents is to teach them to control all three. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
SP
Sanjeev Prabhakar
Tue, Nov 8, 2022 5:14 PM

please delete the include statement
it is not required

On Tue, 8 Nov 2022 at 22:36, Sanjeev Prabhakar sprabhakar2006@gmail.com
wrote:

I wrote a small code, if it is of some interest to you

also attached the file it generates
its a fairly smooth fillet

On Tue, 8 Nov 2022 at 04:34, Ken bats059@gmail.com wrote:

I've drawn up what will be a pattern for casting a curved-spoke flywheel
for an old style miniature stationary engine. I need to put a small (2mm)
fillet at both ends of the spokes to help prevent fatigue cracking when the
engine is running, but am at a complete loss as to how to do it. It is
complicated somewhat by the need to have a small taper on both inner and
outer hubs, to enable the pattern to be withdrawn from the mold.

Below is the code for one half of the flywheel- if anyone has any ideas
for how to put the fillets on, I would be most grateful!


$fn = 128;

//Set up the dimensions
hubdiameter = 52;
shaftdiameter = 8;
wheeldiameter = 208;
rimthickness = 30;
spokethickness = 20;
numberofspokes = 5;
//Don't change the next 3 lines
wheelrimthickness = (wheeldiameter - rimthickness);
spokelength = (wheeldiameter-hubdiameter+5);
rotation = 360/(numberofspokes);

//Wheel hub module
module wheel_hub(){
difference(){
color ("green")
cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true);
color ("navy")
cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true);
}
}
//Round spoke modules
module bentCubeClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,35,0]) rotate([0,0,-a/2])
rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5);
}
module bentCubeAntiClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,78,0]) rotate([0,0,-a/2.5])
rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5);
}

//Create half-thickness wheel for casting
difference()
{
//Wheel rim
union()
{
difference(){
color ("violet")
cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true);
color ("blue")
cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true);

}
//spokes for wheel
for (i=[1:numberofspokes]){
rotate([0,0,rotation * i])
color ("red")
bentCubeClockwise(10, 4, 44, 10);

}
for (i=[1:numberofspokes]){
rotate([0,0,rotation * (i+2.25)])
color ("blue")
bentCubeAntiClockwise(10, 4, 44, -10);
}
wheel_hub();
}
//Cube to remove half the flywheel
translate([0,0,-10])
cube ([wheeldiameter+40,wheeldiameter+40,20],center=true);
//5mm Alignment pin holes
rotate ([0,0,0])
translate([-98,0,0])
cylinder(h=10,d=5,center = true);
rotate ([0,0,0])
translate([98,0,0])
cylinder(h=10,d=5,center = true);
}


--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.


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

please delete the include statement it is not required On Tue, 8 Nov 2022 at 22:36, Sanjeev Prabhakar <sprabhakar2006@gmail.com> wrote: > I wrote a small code, if it is of some interest to you > > also attached the file it generates > its a fairly smooth fillet > > On Tue, 8 Nov 2022 at 04:34, Ken <bats059@gmail.com> wrote: > >> I've drawn up what will be a pattern for casting a curved-spoke flywheel >> for an old style miniature stationary engine. I need to put a small (2mm) >> fillet at both ends of the spokes to help prevent fatigue cracking when the >> engine is running, but am at a complete loss as to how to do it. It is >> complicated somewhat by the need to have a small taper on both inner and >> outer hubs, to enable the pattern to be withdrawn from the mold. >> >> Below is the code for one half of the flywheel- if anyone has any ideas >> for how to put the fillets on, I would be most grateful! >> >> *********************************************************** >> >> $fn = 128; >> >> //Set up the dimensions >> hubdiameter = 52; >> shaftdiameter = 8; >> wheeldiameter = 208; >> rimthickness = 30; >> spokethickness = 20; >> numberofspokes = 5; >> //Don't change the next 3 lines >> wheelrimthickness = (wheeldiameter - rimthickness); >> spokelength = (wheeldiameter-hubdiameter+5); >> rotation = 360/(numberofspokes); >> >> //Wheel hub module >> module wheel_hub(){ >> difference(){ >> color ("green") >> cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true); >> color ("navy") >> cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true); >> } >> } >> //Round spoke modules >> module bentCubeClockwise(width, height, length, dh) >> { >> // calculate radius and angle >> r = (length*length + 4*dh*dh)/(8*dh); >> a = 2*asin(length/(2*r)); >> translate([-r,35,0]) rotate([0,0,-a/2]) >> rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5); >> } >> module bentCubeAntiClockwise(width, height, length, dh) >> { >> // calculate radius and angle >> r = (length*length + 4*dh*dh)/(8*dh); >> a = 2*asin(length/(2*r)); >> translate([-r,78,0]) rotate([0,0,-a/2.5]) >> rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5); >> } >> >> //Create half-thickness wheel for casting >> difference() >> { >> //Wheel rim >> union() >> { >> difference(){ >> color ("violet") >> cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true); >> color ("blue") >> cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true); >> >> } >> //spokes for wheel >> for (i=[1:numberofspokes]){ >> rotate([0,0,rotation * i]) >> color ("red") >> bentCubeClockwise(10, 4, 44, 10); >> >> } >> for (i=[1:numberofspokes]){ >> rotate([0,0,rotation * (i+2.25)]) >> color ("blue") >> bentCubeAntiClockwise(10, 4, 44, -10); >> } >> wheel_hub(); >> } >> //Cube to remove half the flywheel >> translate([0,0,-10]) >> cube ([wheeldiameter+40,wheeldiameter+40,20],center=true); >> //5mm Alignment pin holes >> rotate ([0,0,0]) >> translate([-98,0,0]) >> cylinder(h=10,d=5,center = true); >> rotate ([0,0,0]) >> translate([98,0,0]) >> cylinder(h=10,d=5,center = true); >> } >> >> ************************************************************************** >> >> -- >> Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html >> ---------------------------------------- >> A baby can be defined as an ego with a noise at one end and a smell at the other. >> Our job as parents is to teach them to control all three. >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >
K
Ken
Thu, Nov 10, 2022 4:41 AM

Many thanks for your efforts and the code Sanjeev, I have taken a look
at the files, but it is going to take me some time to figure them out.
The python is not so bad, but the juypiter notebook is completely new to
me, and with everything else that is going on in my world at the moment
(mainly the training involved with running my first-ever marathon in
January at age 74) it will be mid-January before I can take a proper
look at that.

On 2022-11-09 04:06, Sanjeev Prabhakar wrote:

I wrote a small code, if it is of some interest to you

also attached the file it generates
its a fairly smooth fillet

On Tue, 8 Nov 2022 at 04:34, Ken bats059@gmail.com wrote:

 I've drawn up what will be a pattern for casting a curved-spoke
 flywheel for an old style miniature stationary engine. I need to
 put a small (2mm) fillet at both ends of the spokes to help
 prevent fatigue cracking when the engine is running, but am at a
 complete loss as to how to do it. It is complicated somewhat by
 the need to have a small taper on both inner and outer hubs, to
 enable the pattern to be withdrawn from the mold.

 Below is the code for one half of the flywheel- if anyone has any
 ideas for how to put the fillets on, I would be most grateful!

 ***********************************************************

 $fn = 128;

 //Set up the dimensions
 hubdiameter = 52;
 shaftdiameter = 8;
 wheeldiameter = 208;
 rimthickness = 30;
 spokethickness = 20;
 numberofspokes = 5;
 //Don't change the next 3 lines
 wheelrimthickness = (wheeldiameter - rimthickness);
 spokelength = (wheeldiameter-hubdiameter+5);
 rotation = 360/(numberofspokes);

 //Wheel hub module
 module wheel_hub(){
 difference(){
   color ("green")
 cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true);
   color ("navy")
 cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true);
 }
 }
 //Round spoke modules
 module bentCubeClockwise(width, height, length, dh)
 {
 // calculate radius and angle
 r = (length*length + 4*dh*dh)/(8*dh);
 a = 2*asin(length/(2*r));
 translate([-r,35,0]) rotate([0,0,-a/2])
 rotate_extrude(angle = a+8) translate([r, 0, 0])
 scale([2,1.4])circle(5);
 }
 module bentCubeAntiClockwise(width, height, length, dh)
 {
 // calculate radius and angle
 r = (length*length + 4*dh*dh)/(8*dh);
 a = 2*asin(length/(2*r));
 translate([-r,78,0]) rotate([0,0,-a/2.5])
 rotate_extrude(angle = a-5) translate([r, 0, 0])
 scale([2,1.4])circle(5);
 }

 //Create half-thickness wheel for casting
 difference()
 {
 //Wheel rim
 union()
 {
 difference(){
     color ("violet")
  cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true);
      color ("blue")
 cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true);

 }
 //spokes for wheel
   for (i=[1:numberofspokes]){
     rotate([0,0,rotation * i])
     color ("red")
 bentCubeClockwise(10, 4, 44, 10);

 }
  for (i=[1:numberofspokes]){
     rotate([0,0,rotation * (i+2.25)])
     color ("blue")
 bentCubeAntiClockwise(10, 4, 44, -10);
 }
 wheel_hub();
 }
 //Cube to remove half the flywheel
 translate([0,0,-10])
 cube ([wheeldiameter+40,wheeldiameter+40,20],center=true);
 //5mm Alignment pin holes
 rotate ([0,0,0])
 translate([-98,0,0])
 cylinder(h=10,d=5,center = true);
 rotate ([0,0,0])
 translate([98,0,0])
 cylinder(h=10,d=5,center = true);
 }

 **************************************************************************

 -- 
 Cheers, Ken
 bats059@gmail.com
 https://vk7krj.com/running.html
 https://sstv.vk7krj.com/all_bands.html
 ----------------------------------------
 A baby can be defined as an ego with a noise at one end and a smell at the other.
 Our job as parents is to teach them to control all three.

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

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

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com/running.html
https://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.

Many thanks for your efforts and the code Sanjeev, I have taken a look at the files, but it is going to take me some time to figure them out. The python is not so bad, but the juypiter notebook is completely new to me, and with everything else that is going on in my world at the moment (mainly the training involved with running my first-ever marathon in January at age 74) it will be mid-January before I can take a proper look at that. On 2022-11-09 04:06, Sanjeev Prabhakar wrote: > I wrote a small code, if it is of some interest to you > > also attached the file it generates > its a fairly smooth fillet > > On Tue, 8 Nov 2022 at 04:34, Ken <bats059@gmail.com> wrote: > > I've drawn up what will be a pattern for casting a curved-spoke > flywheel for an old style miniature stationary engine. I need to > put a small (2mm) fillet at both ends of the spokes to help > prevent fatigue cracking when the engine is running, but am at a > complete loss as to how to do it. It is complicated somewhat by > the need to have a small taper on both inner and outer hubs, to > enable the pattern to be withdrawn from the mold. > > Below is the code for one half of the flywheel- if anyone has any > ideas for how to put the fillets on, I would be most grateful! > > *********************************************************** > > $fn = 128; > > //Set up the dimensions > hubdiameter = 52; > shaftdiameter = 8; > wheeldiameter = 208; > rimthickness = 30; > spokethickness = 20; > numberofspokes = 5; > //Don't change the next 3 lines > wheelrimthickness = (wheeldiameter - rimthickness); > spokelength = (wheeldiameter-hubdiameter+5); > rotation = 360/(numberofspokes); > > //Wheel hub module > module wheel_hub(){ > difference(){ >   color ("green") > cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true); >   color ("navy") > cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true); > } > } > //Round spoke modules > module bentCubeClockwise(width, height, length, dh) > { > // calculate radius and angle > r = (length*length + 4*dh*dh)/(8*dh); > a = 2*asin(length/(2*r)); > translate([-r,35,0]) rotate([0,0,-a/2]) > rotate_extrude(angle = a+8) translate([r, 0, 0]) > scale([2,1.4])circle(5); > } > module bentCubeAntiClockwise(width, height, length, dh) > { > // calculate radius and angle > r = (length*length + 4*dh*dh)/(8*dh); > a = 2*asin(length/(2*r)); > translate([-r,78,0]) rotate([0,0,-a/2.5]) > rotate_extrude(angle = a-5) translate([r, 0, 0]) > scale([2,1.4])circle(5); > } > > //Create half-thickness wheel for casting > difference() > { > //Wheel rim > union() > { > difference(){ >     color ("violet") >  cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true); >      color ("blue") > cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true); > > } > //spokes for wheel >   for (i=[1:numberofspokes]){ >     rotate([0,0,rotation * i]) >     color ("red") > bentCubeClockwise(10, 4, 44, 10); > > } >  for (i=[1:numberofspokes]){ >     rotate([0,0,rotation * (i+2.25)]) >     color ("blue") > bentCubeAntiClockwise(10, 4, 44, -10); > } > wheel_hub(); > } > //Cube to remove half the flywheel > translate([0,0,-10]) > cube ([wheeldiameter+40,wheeldiameter+40,20],center=true); > //5mm Alignment pin holes > rotate ([0,0,0]) > translate([-98,0,0]) > cylinder(h=10,d=5,center = true); > rotate ([0,0,0]) > translate([98,0,0]) > cylinder(h=10,d=5,center = true); > } > > ************************************************************************** > > -- > Cheers, Ken > bats059@gmail.com > https://vk7krj.com/running.html > https://sstv.vk7krj.com/all_bands.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Our job as parents is to teach them to control all three. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org -- Cheers, Ken bats059@gmail.com https://vk7krj.com/running.html https://sstv.vk7krj.com/all_bands.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Our job as parents is to teach them to control all three.
SP
Sanjeev Prabhakar
Thu, Nov 10, 2022 5:27 AM

All the best Sir for your Marathon!

It's just fun and not too much of efforts for me to write codes like this,
so please don't worry and take your time.

Regards

On Thu, 10 Nov, 2022, 10:12 am Ken, bats059@gmail.com wrote:

Many thanks for your efforts and the code Sanjeev, I have taken a look at
the files, but it is going to take me some time to figure them out. The
python is not so bad, but the juypiter notebook is completely new to me,
and with everything else that is going on in my world at the moment (mainly
the training involved with running my first-ever marathon in January at age
74) it will be mid-January before I can take a proper look at that.

On 2022-11-09 04:06, Sanjeev Prabhakar wrote:

I wrote a small code, if it is of some interest to you

also attached the file it generates
its a fairly smooth fillet

On Tue, 8 Nov 2022 at 04:34, Ken bats059@gmail.com wrote:

I've drawn up what will be a pattern for casting a curved-spoke flywheel
for an old style miniature stationary engine. I need to put a small (2mm)
fillet at both ends of the spokes to help prevent fatigue cracking when the
engine is running, but am at a complete loss as to how to do it. It is
complicated somewhat by the need to have a small taper on both inner and
outer hubs, to enable the pattern to be withdrawn from the mold.

Below is the code for one half of the flywheel- if anyone has any ideas
for how to put the fillets on, I would be most grateful!


$fn = 128;

//Set up the dimensions
hubdiameter = 52;
shaftdiameter = 8;
wheeldiameter = 208;
rimthickness = 30;
spokethickness = 20;
numberofspokes = 5;
//Don't change the next 3 lines
wheelrimthickness = (wheeldiameter - rimthickness);
spokelength = (wheeldiameter-hubdiameter+5);
rotation = 360/(numberofspokes);

//Wheel hub module
module wheel_hub(){
difference(){
color ("green")
cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true);
color ("navy")
cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true);
}
}
//Round spoke modules
module bentCubeClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,35,0]) rotate([0,0,-a/2])
rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5);
}
module bentCubeAntiClockwise(width, height, length, dh)
{
// calculate radius and angle
r = (lengthlength + 4dhdh)/(8dh);
a = 2asin(length/(2r));
translate([-r,78,0]) rotate([0,0,-a/2.5])
rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5);
}

//Create half-thickness wheel for casting
difference()
{
//Wheel rim
union()
{
difference(){
color ("violet")
cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true);
color ("blue")
cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true);

}
//spokes for wheel
for (i=[1:numberofspokes]){
rotate([0,0,rotation * i])
color ("red")
bentCubeClockwise(10, 4, 44, 10);

}
for (i=[1:numberofspokes]){
rotate([0,0,rotation * (i+2.25)])
color ("blue")
bentCubeAntiClockwise(10, 4, 44, -10);
}
wheel_hub();
}
//Cube to remove half the flywheel
translate([0,0,-10])
cube ([wheeldiameter+40,wheeldiameter+40,20],center=true);
//5mm Alignment pin holes
rotate ([0,0,0])
translate([-98,0,0])
cylinder(h=10,d=5,center = true);
rotate ([0,0,0])
translate([98,0,0])
cylinder(h=10,d=5,center = true);
}


--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.


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


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

--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.


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

All the best Sir for your Marathon! It's just fun and not too much of efforts for me to write codes like this, so please don't worry and take your time. Regards On Thu, 10 Nov, 2022, 10:12 am Ken, <bats059@gmail.com> wrote: > Many thanks for your efforts and the code Sanjeev, I have taken a look at > the files, but it is going to take me some time to figure them out. The > python is not so bad, but the juypiter notebook is completely new to me, > and with everything else that is going on in my world at the moment (mainly > the training involved with running my first-ever marathon in January at age > 74) it will be mid-January before I can take a proper look at that. > > > On 2022-11-09 04:06, Sanjeev Prabhakar wrote: > > I wrote a small code, if it is of some interest to you > > also attached the file it generates > its a fairly smooth fillet > > On Tue, 8 Nov 2022 at 04:34, Ken <bats059@gmail.com> wrote: > >> I've drawn up what will be a pattern for casting a curved-spoke flywheel >> for an old style miniature stationary engine. I need to put a small (2mm) >> fillet at both ends of the spokes to help prevent fatigue cracking when the >> engine is running, but am at a complete loss as to how to do it. It is >> complicated somewhat by the need to have a small taper on both inner and >> outer hubs, to enable the pattern to be withdrawn from the mold. >> >> Below is the code for one half of the flywheel- if anyone has any ideas >> for how to put the fillets on, I would be most grateful! >> >> *********************************************************** >> >> $fn = 128; >> >> //Set up the dimensions >> hubdiameter = 52; >> shaftdiameter = 8; >> wheeldiameter = 208; >> rimthickness = 30; >> spokethickness = 20; >> numberofspokes = 5; >> //Don't change the next 3 lines >> wheelrimthickness = (wheeldiameter - rimthickness); >> spokelength = (wheeldiameter-hubdiameter+5); >> rotation = 360/(numberofspokes); >> >> //Wheel hub module >> module wheel_hub(){ >> difference(){ >> color ("green") >> cylinder(h=18,d1=hubdiameter+8,d2=hubdiameter,center=true); >> color ("navy") >> cylinder(h=36,d1=shaftdiameter+8,d2=shaftdiameter,center=true); >> } >> } >> //Round spoke modules >> module bentCubeClockwise(width, height, length, dh) >> { >> // calculate radius and angle >> r = (length*length + 4*dh*dh)/(8*dh); >> a = 2*asin(length/(2*r)); >> translate([-r,35,0]) rotate([0,0,-a/2]) >> rotate_extrude(angle = a+8) translate([r, 0, 0]) scale([2,1.4])circle(5); >> } >> module bentCubeAntiClockwise(width, height, length, dh) >> { >> // calculate radius and angle >> r = (length*length + 4*dh*dh)/(8*dh); >> a = 2*asin(length/(2*r)); >> translate([-r,78,0]) rotate([0,0,-a/2.5]) >> rotate_extrude(angle = a-5) translate([r, 0, 0]) scale([2,1.4])circle(5); >> } >> >> //Create half-thickness wheel for casting >> difference() >> { >> //Wheel rim >> union() >> { >> difference(){ >> color ("violet") >> cylinder(h=30,d1=wheeldiameter+34,d2=wheeldiameter+30,center=true); >> color ("blue") >> cylinder(h=32,d1=wheelrimthickness-4,d2=wheelrimthickness,center=true); >> >> } >> //spokes for wheel >> for (i=[1:numberofspokes]){ >> rotate([0,0,rotation * i]) >> color ("red") >> bentCubeClockwise(10, 4, 44, 10); >> >> } >> for (i=[1:numberofspokes]){ >> rotate([0,0,rotation * (i+2.25)]) >> color ("blue") >> bentCubeAntiClockwise(10, 4, 44, -10); >> } >> wheel_hub(); >> } >> //Cube to remove half the flywheel >> translate([0,0,-10]) >> cube ([wheeldiameter+40,wheeldiameter+40,20],center=true); >> //5mm Alignment pin holes >> rotate ([0,0,0]) >> translate([-98,0,0]) >> cylinder(h=10,d=5,center = true); >> rotate ([0,0,0]) >> translate([98,0,0]) >> cylinder(h=10,d=5,center = true); >> } >> >> ************************************************************************** >> >> -- >> Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html >> ---------------------------------------- >> A baby can be defined as an ego with a noise at one end and a smell at the other. >> Our job as parents is to teach them to control all three. >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > -- > Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Our job as parents is to teach them to control all three. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >