In some cases, it's better to use the revolve cut feature instead of a normal revolve, because in the real manufacturing process, you will start with a body of material and cut your product from it. You cant revolve a wheel in real life!
Open SolidWorks and start a new part file.
First open a sketch on the front plane by right clicking on the front plane and selecting the sketch symbol.
Now on the sketch tab that has appeared, select the center circle, or from the dropdown menu next to the circle, choose the center circle sketch option. Click the orgin of the drawing and move the mouse out and then click when you are satisfied with your circle. Click the green check when done.
Now click on the Smart Dimension button and click on the edge of your circle. move the mouse and the click to place your dimension. Once it is placed, double click on the number to change the dimension. Let's make it 33 inches which is average for small trains in America. Click the green check to confirm.
Your sketch is probably off the screen now so use the view button to bring it back into view. Now click the features tab and the Extruded Base button. The Feature will now be created and you will see your base material. Let's make the extrude 5 inches so that we have plenty of material to cut from. Click the check mark to confirm.
You now have the base part that would be cut by a machine in real life! Now we will make the cut that will lock the train wheels to the tracks. First right click the right plane because this is the plane that is perpendicular to our part. select the sketch button and zoom in on the right side of your part so you can see detail.
Now using the line sketch button, create lines roughly as shown in the picture below by clicking at a start point, then the next few points. Using the smart dimension tool, dimension the lines as shown by clicking on the endpoints of lines. We want to leave some material on the right for the "lip" of the wheel to hold it against the track and cut out the rest of the wheel so the track fits inside. This sketch is our "Profile."
Now zoom out so you can see the origin and click the Centerline button from the
Line dropdown menu. Draw a centerline in the right plane across the center of your part. This line will not be used to cut anything since it is just a reference line, but it will be used as the axis of rotation for our Profile.
Now click the Feature tab and this time click the Revolved Cut button. SolidWorks may automatically select the correct axis and profile, but you may have to select your Profile where it asks for a sketch to be selected and then select your axis of rotation by clicking on the box for the axis, and then clicking on your axis. A preview of your cut is shown. All yellow material is removed. Confirm the cut with the green check.
That's ok, but we also need a hole to put axel through. That can also be done with the same revolved cut! Maybe we could also lighten up the weight of the wheel by cutting out extra material too. Right click on your revolved cut feature on the right side and select edit sketch. Then add some more sketches like below.
Exit your sketch and you should have a great looking train wheel that was cut realistically like it would be with a milling machine.