From Sketches to Assembly: Model a two-stroke Engine with SolidWorks

This tutorials aims at modeling the main parts of a two-stroke engine. The modelization in itself is very simplified compared to a real engine but the different tools it involves make this tutorial relevant for beginners in SolidWorks. An interesting feature of this piece of software is that it allows one to add constraints between parts. Then one can see the parts moving with respect to each other like in a real engine.
Here are the parts we are going to model:

Want to download this tutorial?

Get this tutorial as a PDF file and download the SolidWorks source files.
Enter your mail below, you'll receive this tutorial in no time.

The piston

Create a new part by going to File > New… and selecting Part.

The piston is cylindrical. We will thereby mainly use a revolution to model it.

First, we need a sketch that will be the profile of this revolution. On the FeatureManager on the left-hand side of the screen, click on the Front Plane. A few icons should pop up. Click on the first one to create a sketch.

The sketch we are about to draw consists in horizontal and vertical lines. In order to draw a line, click on this button:

Add a horizontal line from the origin (the couple of red arrows) to the left. Using the Smart Dimension tool and by clicking on the line, set its length to 13.50 mm.

Go ahead and add the other lines. To set the distance between two lines, simply click on the first one then on the other.
Set the two vertical lines on the left as collinear, by clicking on both of them and applying a Collinear relation. In the end, the entire sketch should be black, meaning that it is fully constrained.

Exit the sketch.
In the Features tab, select the revolution tool:

As an axis, select the vertical line on the far right, starting from the origin. Then validate. Here is the result (with section view enabled):

On the front plane, add the following sketch. The dashed line is for construction purposes. You can add such a line by clicking on the little arrow next to the line icon to expand the menu. This line will not be considered as a valid profile so it won’t be taken into account when it comes to adding or cutting some volume. It will nonetheless help us to place this circle.

Exit this sketch. In the Features tab, find the Extruded Cut tool. We now want to cut the piston with a cylinder. Thus, complete the panel like so.

Save your part in the folder of your choice.

The connecting rod

This part has an interesting property: it is symmetric. That being known, we only need to model one side.

On the front plane, aligned with the origin:

Now, revolve this profile the same way as we did with the piston. This time, the axis will be the horizontal construction line.

On the front plane, start another sketch. The axis of the profile should be 45 mm away from the origin (located in the direction of the red arrow).

Revolve this sketch in a similar way as we previously did.

We will now need to join those two different cylindrical bodies. To do so, an extruded surface may help.

On the front plane, add this line:

This profile will be extruded to create a surface. Basically, a surface has no thickness, that’s why a simple line, as opposed to a closed profile, can be used to create one.

Go to Insert > Surface > Extrude… and select the sketch containing the line. Extrude in both directions. Add a new sketch on the right plane this time. First of all, by clicking on Convert Entities add the two inner circles of the cylindrical shapes on the sketch


Add two extra lines:

This profile is not valid. We must thereby trim the outer part of the circles. Find the Trim Entities tool. Hold your mouse button while dragging over the circles to trim them.

Exit the sketch.

The surface we created earlier will be the limit of the extrusion. Instead of writing a given length to this extrusion, we just specify the surface as our limit.

Extrude the profile with those parameters. Then hide or delete the surface:

The inside of the connection we created here is usually partially removed to alleviate the piece.

On the right plane, start a new sketch. Select the long face connecting the two axes of the rod. Find the Offset Entities tool. A panel should appear on the left. This tool allows us to offset the boundary of the selected surface. Enter a distance of 1.00 mm and reverse so that the offset is going inward.

Exit the sketch, and select the Extruded Cut tool. We want the outside of the rod to be cut. We are thus on the wrong plane, since the cut should come from the outside. However, the From box of the panel will help us. Set it to Surface/Face/Plane then select the long surface. The extrusion should have a distance of 1.00 mm.

On the Features panel, search for the Mirror tool and mirror the whole part with respect to the right plane.

The crankshaft

Let’s start by the following sketch on the right plane. Start by the horizontal construction line from the origin and then add the rest.

The construction line above will be the axis along which we will rotate the sketch to create volume. On the Features tab click on the Revolve tool.
Now add this rectangle in a new sketch on the right plane.

Find the Sketch Fillet tool.

Add a fillet of 2.00 mm to the two vertices at the bottom by clicking on them.
Use the sketch to cut through the model:

Then click on this face to start a new sketch:

Convert the entities of the largest circle to the sketch. Then, using the Trim tool:

Notice that I left a blank half on the disk. This is because the next step consists in symmetrizing the sketch.

Find the Mirror Entities tool in the Sketch tab. Specify the vertical construction line to be the axis and click OK.
Use this sketch to cut the part. However, you need to tell SolidWorks that you want to cut outside this profile rather than inside, or else it would yield a somewhat strange result.
To do so, check the Flip side to cut box.

On the same face, add this simple sketch.

Extrude it 9 mm outward. Add several chamfers to the model.


The crankshaft is now done!

The axis and the joint

These are two very simple cylindrical parts.

Open a new part and start a sketch on the front plane. Draw two concentric circles:

Extrude it using the Mid Plane preset with a distance set to 27 mm. You may also add chamfers to the outer edges.

The joint is very similar, but without chamfers. Simply extrude the following from 8 mm.

The crankcase (1/3)

This component will be divided into three different parts. To start with, we are going to model the easiest one.

Open a new part. On the right plane, draw this sketch:

And this is pretty much everything, revolve this sketch around the construction line and save the part!

The crankcase (2/3)

This part is more detailed than the first one. Multiple layers of cooling fins are attached to the cylinder where the piston translates, in order to speed up heat dissipation.

On the right plane, start a new sketch by adding a simple rectangle:

This rectangle is not attached to the scene in anyway. To remedy it, click on the upper edge and then the origin with Shift pressed. Choose the Midpoint relation. Continue the sketch by adding extra construction lines:

Revolve this profile using the horizontal construction line as an axis. On the right plane, add this sketch. You can definitely see the cooling fins taking shape.
I hid the relations for clarity's sake. You may however see that the sketch has just a few dimensions compared to the number of lines. This is because this sketch heavily relies on relations. All the fins are spaced equally, and so is their thickness. Furthermore, the relevant lines are aligned. You can easily add such relations to a multiple selection of entities.

Revolve this sketch along its axis. On the same plane draw this opened profile:

Use this couple of lines to cut the crankcase by using the Revolved Cut tool. This tool should automatically add thickness to your profile in order to define a volume which will be removed from the main part.

There is still something wrong here. Look at the front of your model. The cylinder and the upper part are not connected!
We can finish this part using one more profile. Start a sketch on the lower face of the revolved fins and add a circle fitting the inner circle of the existing piece:

Exit the sketch. Use it first to cut the cylinder facing the Z direction.

The sketch you used is now gone. Not really though, merely hidden. You can access it through the FeatureManager:

Use this very sketch to extrude volume this time.
Check the Thin Feature and write 3 mm. Rather than specifying a precise length of extrusion, use the Up To Surface option and select the cylinder’s surface.

Use the Section tool to check the inside:

The crankcase (3/3)

Start this part by revolving this sketch on the right plane around its axis:

On the top plane, add this circle. You need a construction line to align its center with the origin (or simply add a relation to its center point, but this is less visual).

What we are intending to do is to add a cylinder on top of the crankcase. If we were to extrude it from the current plane, this would yield unwanted volume inside the part. This is why we will offset the sketch 30 mm above and then extrude.

Click on the sketch and add the offset in the From box. Chose Up To Body as the extrusion preset. The sketch is thereby extruded until it reaches the main body. This is sometimes convenient.

Then, make a 13 mm of diameter hole in this new cylinder.

The assembly

Once all the required parts are created and saved on your computer, it is time to gather and connect them in a single file using constraints.

Go to File > New > Assembly.
Click on the Browse… button on the left panel to search for the files you want to import.

Start with the second crankcase. Once loaded, it will automatically be fixed. In the Assembly tab, click on the Insert Component tool to add the other pieces. Import the first crankcase. Then look for the Mate tool, which looks like a paperclip.

Generally speaking, a mate involves two or more parts.

Here, we want the crankcases to be concentric. That being said, select one cylindrical face for each part. Apply a Concentric Mate.

Snap the parts by selecting the relevant faces and adding a Coincident Mate. Repeat the exact same process for the third crankcase except for the coincidence.

The engine is an enclosed system. In order for you to see what happens inside and to be able to add parts to it, you can use the Section View set up with the right plane or merely hide other parts temporarily.

Add the crankshaft to the scene. Make it concentric with the rest:

Select the two highlighted faces and make them coplanar using a Coincident Mate.

You should now be able to add the mate without problem. Add the axis and the piston. Make their front plane coincident and their axis concentric. You can access their planes in the FeatureManager on the left. Add the connecting rod the same way:

The piston should translate into the crankcase. As a matter of fact, you must add a Concentric Mate between the piston and the inner cylindrical face of the crankcase.
Furthermore, align the connecting rod and the crankshaft:

Add the joint between the connecting rod and the crankshaft too.

That’s it! All the parts are forming a whole system. Try to move the parts a bit. Translate the piston or rotate the crankshaft to see the engine in action.

Obviously, this engine's model is highly simplified. This tutorial gave you the basics of SolidWorks modelization, from sketches to assembly, without worrying about too much details!

Want to download this tutorial?

Get this tutorial as a PDF file and download the SolidWorks source files.
Enter your mail below, you'll receive this tutorial in no time.

Back to top

SolidWorks Insight

The free content available on this website is under the following licence:

by-nc-sa-cc licence

This website is not affiliated to SolidWorks