A key from an extrusion and path sweeps and subtraction


To begin the key create a polygon to extrude that forms the key stock. This may be done in one pass with the polyCurve() function, or in multiple steps by joining together polygons of different types. And make a circle for the hole.
The key stock may be created by making a region from the outline of the key and the circle and extruding that, or extruding the the outer outline and the circle separately then subtracting the hole from the key stock, or by making a region from the outline, making a region from the circle, subtracting the hole region from the outer region and extruding that. This is the easy part. The cut outs that run along the lengths of the key (they are green) can also be made in a variety of ways. Method one: Assuming the key stock was create with the UCS y axis pointing up the key length, rotate it about the y axis. Make sections from which to extrude the cut outs out of the current UCS plane, and extrude them. Method two: Rotate the UCS about the x axis 90 degrees and make four rectangular sections to sweep out the cut outs. Then make the sweep paths in the plane described in method one. as a long strait line with a bend towards the end, out of the key stock. The round bend may be made with a fillet. Now use the general path sweep function to sweep the rectangular sections along the paths.
Everything is now done with the exception of subtracting the cut outs from the key stock. Do this... next try making a lock. By the way, the key fits in the writer's mail box.