With the battery box finished, I could measure how long the frame needed to be extended and how high the rack had to be. Starting at the base of the frame the first pieces were the chain stays.
(Click on images to enlarge)
I made a jig to hold all the chain stay extension pieces in alignment. Starting with a 44" long scrap piece of plywood, I drew a center line and laid out the locations of the supports with a square. Trimmed blocks (I have a pile of little pieces from other projects) at the right thickness prop the pieces up and locate them side to side and front to back, and then I put some woodworkers glue on them, pressed them in place, and left them overnight to dry. In this jig the bottom bracket fits in the blocks on the left, a long bolt substitutes for an axle in the slots on the right blocks, and the new extension tube junction is propped up in the center.
I forgot to take a picture of the pieces at this stage, so this is an out of sequence later photo to show how the frame fit in the jig.
This is what actually came out of the jig, at this point it is tack welded together using a MIG welder, anything more would burn the jig up and reduce the accuracy. I routinely work to 1/32" (0.030"), and often lean cuts in one direction or another that brings accuracy to 1/64" (0.015"). Tighter accuracy than that is problematic as the scales on standard carpenter's measuring tapes vary in size along the tape, so you have to use other methods. However within assemblies such as the chain stay extension above, it is easy to get to 0.005 - 0.010 simply by holding the pieces up and comparing or scribing them. Wooden jigs also introduce an error, because wood moves with changes in temperature and humidity. On a small jig like this for a short interval of a few days it isn't a problem, but if I were to build a series of bikes I would make a large jig where a whole frame would lay on it's side, and the jig would noticeably move. Using a composite material such as MDF helps, but still requires some adjustments on different days. (Or spend a lot more money and time to make a metal jig.) At any rate this jig is more accurate than the factory was, where the bottom bracket was 3/32" to the left side, the rear wheel tipped 5 degrees to the right, and the bend in the rear seat stays 1/4" different.
If you'd like to read a bit more about handwork and accuracy, David Pye wrote a couple of excellent books a few years back- "The Nature and Art of Workmanship", and "The Nature and Aesthetics of Design". He built a semi automatic skorp to explore the interaction of humans and machines in guiding tools, and made some beautiful carved dishes to illustrate his thesis.
I lined up the template center line with a line drawn on the (level and flat) floor, and then lined up the front frame section and forks with the floor line. This lines up the bottom, and to keep the top straight at this stage I used a level on the downtubes, (watch out for tubes of different sizes), and a string from inside the rear dropouts to the head tube. There isn't much frame at this stage to measure, but it will save a lot of trouble later on if you get this part right.
I use a very fine string. In another life when I was doing woodworking, Japan Woodworker was selling ink string lines that had a very fine line, (in contrast to the usual carpenter chalk line), and I started using that line with chalk. Braided fishing line is an acceptable substitute, and for applications like this where I'm measuring and not putting down a line, I've dyed the line a bright color to make it more visible.
Both sides of the seat tube should have the same distance to the strings. For safety I should mention here that if you cut up your old tape measures for use as high visibility rulers, YOU MUST NIP THE CORNERS OF THE PIECES! to blunt them. They are VERY sharp, and will eventually give you a very nasty cut.
The frame needs some triangulation to make it rigid. Unfortunately the battery box is in the way, so I was able to put only one tube under the box to reduce vertical flexing. I propped up the pieces and marked out a tube location with some clearance to the front edge of the battery box.
This tube ties the seat tube and the new chain stay junction together to stop upward movement of the new chain stay extensions. If this tube were all there was I would not be happy- I think eventually heavy loads on the cargo bike would bend the seat tube. However the rack and a few other stays further back will share the load to help increase strength, and should make the bike stiff enough to handle decently.
Propping the bike up next to the battery box again, I measured for supports for the battery box, and cut out tabs to put on the brace tube.
Across the top of the tabs is a heavier piece of sheet metal, so that the weight of the battery doesn't deform the floor of the thinner battery box. After welding this piece on, I was able to finally set the battery box in the frame, check clearances, and mark out holes for the mounting screws. The two screw mounts in the frame tube are actually bottle holder mounts from when the tube was previously a down tube. I put them to the side for possible use in mounting a chain guard, or maybe an idler sprocket if the chain droop turns out to be too large.