Tutorial: How to generate a coil around a rectangular object in Solidworks
So, in the next 30 steps you will generate a 50x20x40 iron core with a 1 mm copper wire coiled around it. Here's how;
Open a new file and start a sketch on the top plane
Draw a rectangle (for this example, I used a 20x50 mm center rectangle)
Extrude it (I extruded it 40 mm for this example)
Click O.K. and start a sketch on the top of the rectangle (You'll see in one of the next steps that you can also do one on the bottom face of the rectangle)
Draw a circle, dimensions don't really matter that much, the closer you are to the edges, the better
Go to features tab --> go to curves --> select "helix and spiral"
Change the view a bit so that you can see where the spring/coil is headed. Click on reverse direction (you see now why I said it's also possible to sketch on the bottom surface of the rectangle).
Your pitch will be the same value as the thickness of your wire. Seeing as I'll use a 1mm copper winding, I changed the pitch to 1.
The number of revolutions should be the height of your rectangle (40 mm) divided by the pitch (thickness of your wire).
Click O.K. and start a new sketch on the top face of the rectangle
Draw a line that exceeds the boundaries of the rectangle, similar to this one. The reason for this will get clearer in the next few steps
Change your view a bit so you can see the coil. Then, select one of the points on the sketched line and control-select the coil. There should be a dialogue screen that gives you the "pierced" option. If you moved the cursor, you can still find this option in the bottom left part of your screen. Select it, your line should now interfere with the spiral
Now, go to "insert" --> "surface" --> select "sweep".
You will now sweep the line around the spiral
Select the line as your profile and the spiral as your path
It should now look something like this
Hide the swept surface so that you can add some features to your rectangle.
I like to soften the corners with a 2mm fillet. It's important to do this before the next steps.
Go back to showing the swept surface
Start a 3D sketch. This is a crucial step because you will now control-select the outside faces of the rectangle. The swept surface will make it a tad harder for you but it should be easy enough.
Also, don't forget to select the added features like the fillets i added.
Once you've control-selected these surfaces, proceed to next step
Still holding down the control button, select the swept surface. Make sure you click on the surface, not on the lines!
Having selected all the surfaces, now go to "tools" --> "sketch tools" and select "intersection curve". Don't freak out, your screen will hang for a moment
After a few seconds your sketch should look like this. You've now created a path for a sweep.
You can now hide the swept surface. We don't need it anymore.
So, I like to create a plane on the starting point of the helix, but it's possible to do it on an existing plane. As long as the soon-to-be-swept sketch is coincident to the helix, and it's better to make that sketch tangent to the surface. You'll see this in the next steps.
Note that my starting point is on one of the fillets, so for this example I will create a plane on the next point.
Exit your 3D-sketch mode and go to the features tab. Click on reference geometry and select plane
Select the point I discussed earlier and a plane or surface so that you get this result. Please note that as long as you create a sketch that's coincident with the helix you can achieve the same thing. I prefer to do it like this.
So, having done this, select the plane you've just created and start a sketch on it.
Draw a circle, I give it a 1mm diameter because I want a 1mm coil wire and I selected the 1mm pitch earlier on.
Select the circle and control-select the previously mentioned point. Make them coincident
select the circle again and control select the edge of the rectangular surface. Select "make tangent". This sketch is now finished.
Adjust your view a bit and select "swept boss/base" from the features tab
Select the circle as profile and the helix as path. This, again, might take some time. Make sure you deselect "merge result", you don't want a single solid here. Click O.K. as soon as it's finished calculating. Be patient, there's a lot of work here for your poor little CPU
Now you can change materials. I like a dark grey iron core and a nice copper wire.
Thank you for following my first tutorial, I hope this has been helpful for you and that I may share more knowledge as soon as I acquire it in the near future!