Steam Engine
Work in Progress
I've generally worked projects to a more-or-less-complete state before working on these notes, but I want to get started on them earlier than usual so I can be sure to deal with the issues encountered along the way. It's a complex project (for me).
This project is using a lot of black filament. There are several separate parts which need to fit together. Getting all the parts to fit has meant printing test versions, and I didn't trust doing half size versions in case that messed up the fit. Ultimately, I may actually want to print this whole thing at half scale. Right now, it is turning out to be a 36mm gauge steam engine. Gauge is the distance between the wheels/tracks. I had no intent to match this engine with anybody else's similar work. That might be a later effort. This is one of my "learning exercises".
I began working with the cabin of the steam engine. Logically, I probably should have started with the gauge itself, but I do not always work logically. I'm more organic than industrial, I guess.
The roof of the cabin "needed" to be curved, so that's where I began, of course. The rest of the cabin elements are simple cube()s.
Look at the first section of code from cabin.scad. The curved roof actually didn't require too much fancy work, just doing a difference between two squashed (scaled) cylinders, making them wider than normal, giving the cabin roof a shallow curve instead of a simple round curve. The front of the engine cabin is included for visual context. Comment out that code to get a better sense of how the roof works all alone. Examine the file directly to see how the rest of the cabin box goes together.
// roof
difference(){
scale([1,2,1])
cylinder(50,10,10);
translate([-3,0,2])
// inner scale determined after fiddling a bit
scale([1.2,2.1,1])
cylinder(50,10,10);
}
// front of engine cabin
translate([-40,-20,0])
cube([40,40,2]);
The cabin looked good, to me. I was on a roll, so the boiler tube was my next step. I added it "in place" to ensure it looked as I hoped it would. Ultimately, the parts were divided for printing. The tube and cabin cannot be easily printed together because of the flat surfaces involved. The "in place" boiler is also below the print surface as are the eventual other parts like the undercarriage and large drive wheels. The image shows vertically how the mockup design looks in OpenSCAD. While I don't think it is possible to use the mouse to rotate around the Y axis, it is possible to use the $vpr special variable at the top of your code to get you started. $vpr=[76,90,0]; and a view distance around 500 ($vpd=500;) yield a nice horizontal view of the vertically-built mockup.
Getting a "working" steam engine means wheels. It's still just a plastic model at this point with no ability to move on its own, but I wanted the wheels to be able to roll, not just be glued to the undercarriage. That meant getting wheels the right size and in places where they would not bump into each other. Each wheel set is a cylinder with a shaft matched with a second wheel with just a hole in it. The shaft will slide through a hole in the engine undercarriage so the offside wheel can be glued to the shaft on the other side.
Before the wheels themselves, we need the undercarriage. It is a pretty basic thing, two blocks to hold the boiler and cabin, but because the boiler is round, a cylinder gets deleted from the longer cube using the difference()command. In order to make assembly a bit easier, a slot also gets cut out of the larger cube for the alignment tab on the boiler made earlier. (for my own sanity, I printed a version number which will be hidden under the cabin. The number keeps me from getting confused with the other versions still lying around from earlier attempts. At some point, while adjusting wheel shaft placement, I wised up and printed thin test version of the undercarriage taking only minutes to print and evaluate instead of the couple of hours devoted to a full-size undercarriage.
In the event that this project goes far enough, it may become necessary to modify the slab to allow the cabin wheels to swivel to accomodate a curved track. Over time the cabin drive truck will need to be modified significantly. Stay tuned. ("Truck" is the term for the wheelset and its attachment to the engine itself.)
The initial wheels were not fancy at all, just simple cylinders, but "big ideas" demand better solutions, so the wheels got a more accurate design with a "lip" on the inner edge to keep the engine on its tracks. The SCAD and STL files contain all four wheelsets. Let's look at the details of the larger drive wheel.
// drive wheel with shaft
module wheel(){
rotate([0,0,0])
cylinder(5,20,20);
translate([0,0,3])
cylinder(1
,20,22);
translate([0,0,4])
cylinder(1,22,22);
cylinder(40,2,2);
}
// slot
module slot(){
hull() {
translate([10,10,0])
cylinder(5,5,5);
translate([5,5,0])
cylinder(5,2,2);
}
}
// drive wheel #1
difference(){
wheel();
for(x=[-15:60:4*60]){
rotate([0,0,x])
slot();
translate([12,-8,0])
cylinder(3,2.9,3.3);
}
}
The "cool factor" here is the removal of slots around the wheel to make the wheels lighter. In plastic, the weight doesn't really matter, of course, but the real drive wheels of a steam engine were actually lightened by casting the wheels with some iron removed in this way. I originally made one more slot, but decided I would try to add a drive shaft to connect between the two wheels, so I made a hole for that instead. The "offside" version of the wheel has a cylinder slightly larger than the shaft diameter removed from the center of the wheel. Even with care, the hole needed a bit of reaming and sanding of the shaft's end to get a good fit.
I decided to add a smokestack and a cowcatcher, of course. (There may be more details to come, too.) The smokestack is just a few cylinders, but the widened section got a rounding by making a torus of the right size using the rotate_extrude() of a circle primitive command. for stability, I designed the stack upside down.
The cowcatcher presented a neat option to use the for() loop which was also used in the removal of the drive wheel slots. The solid tetrahedron was a hull around four spheres. I orignally attempted to do an official polyhedron(), but it didn't work for me. Doing the hull was something I understood, and a rounded look to the cowcatcher looks good, anyway. Removing the slots used the for loop shown here. The value of variable k steps from front to back of the tetrahedron cutting out a cube (which is actually much larger than needed most of the time, but that doesn't really matter for the removal). Each step also makes the cube get taller while staying inside the current height of the tetrahedron. Try the same code without the use of difference().
The color() command can also make it easier to illustrate things.
difference(){
translate([0,0,1]) // to set to Z platform level
hull(){
// tetrahedron (triangular solid)
translate([0,30,0]) sphere(1);
translate([30,30,0]) sphere(1);
translate([15,30,30]) sphere(1);
translate([15,0,0]) sphere(1);
}
// slot removal
for(k=[3:4:30]){ translate([0,k,2]) cube([40,3,k-1]);}
}
///// end of normal version
// version to show blocks removed
// uncomment to run
// translate([0,0,1])
// color("yellow", 1.0){
// {
// hull(){
// translate([0,30,0]) sphere(1);
// translate([30,30,0]) sphere(1);
// translate([15,30,30]) sphere(1);
// translate([15,0,0]) sphere(1);
// }
// }
//}
// color( "slateblue" , 1.0){
//for(k=[3:4:30]){ translate([0,k,2]) cube([40,3,k-1]);}
//}
I think I've described all the parts you'll need to put this project together, but even though it isn't strictly part of the steam engine, a set of railroad tracks makes a perfect display surface to put the engine on. The files you'll need are here, but describing them will be done in a separate web page: straight-tracks.html to keep this file under control.
Available Files:
engine-mockup.scad - early design without much detail for "in place" views (no STL needed)
cabin.scad - cabin.stl - print version of engine cabin
boilertube01.scad - boilertube01.stl - print version of boiler
undercarriage.scad - undercarriage.stl - holding it all together
stack.scad - stack.stl - gotta let the smoke out!
wheels03.scad - wheels03.stl - all the wheels in one go
cowcatcher02.scad - cowcatcher02.stl - print version of cowcatcher
track01.scad - track01.stl - track on which to display the engine
GPL3 License