Jan 16

Indulge Your Sweet Tooth ~ Part1

Tag: Featured Articles,Lead Article,PartsAlex R. Ruiz @ 4:45 pm

For the first tutorial of 2010, we are going to create this image of a stack of peppermints using SolidWorks and the new features of PhotoView 360. A few weeks ago I came across an image much like this one on IStockPhoto.com and I thought it would be a fun project to do. After creating the image I shared it on Twitter and a number of people suggested that it would be a great tutorial.

Over the next few days we are going to recreate this image. First, we will create the model for one of the mints. Then in an assembly, we will create the stack of mints. After that, we will use the assembly to create image in PhotoView 360. By the end of the series you will learn some tricks in PhotoView 360 that you can then use to create your own stunning images.

The Candy Body

The base feature of the candy is just a simple revolved sketch. You could just extrude a sketch of a circle to create the feature but it would look too sharp and flat. A revolved feature allows us to capture the rounded look a real peppermint. That little extra attention to detail will only make the final rendering look even more realistic. The following steps will describe the process for creating the sketch that we will use for the revolve:

1. Create a new part file in SolidWorks and name it something that makes sense to you.

2. Press S on your keyboard to access the Shortcut bar. Click the downward point arrow next to the Extruded Boss/Base button. In the flyout, click the Revolved Boss/Bass button.

3. In the Graphics Area, select the Front Plane. If the planes are not shown in the Graphics Area, you might be able to show them simply by clicking the View Planes button in the Hide/Show Items flyout in the Heads-up View Toolbar.

4. On the Front Plane, sketch a rectangle beginning at the sketch origin. This rectangle will be used as a guide when creating the profile to be revolved. After sketching the rectangle and applying the dimensions shown in the image below, change the sketch segments to construction lines.

5. Next sketch an Arc as shown below. Ensure that the Arc is tangent to the vertical line of the rectangle and that the endpoints of the arc also have a Vertical relation added. At this point we are not going to add a dimension or fully define the position of the endpoints.

6. With the Arc tool still active, sketch an arc at the top and bottom of the sketch. The start of the arcs must begin at the corresponding corner of the rectangle and end at the endpoint of the arc sketched in the previous step. Next make the arcs tangent with the horizontal lines of the rectangle then add the Equal relation to both arcs.

7.  All that is left to do for the sketch is to define the radii. Using the Smart Dimension tool, make top arc R15.00 and the side arc R.275. If the sketch is not fully defined, go back to the previous steps and see if you missed something.

8. Exit the sketch and when asked if you wish to automatically close the sketch, click Yes. If you started the sketch by clicking the Revolved Boss/Base button, the Revolve PropertyManager will be shown and all that is need is to select the Axis Of Revolution. Select the horizontal line that begins at the sketch origin. The preview in the Graphics Area should look like what is seen in the image below. Click the green check mark in the PropertyManager to create the revolved feature.

9. You now have a big block of cheese. Using the Fillet tool, add a R.050 fillet to the top and bottom edge of the body.

Adding Stripes to the Candy

Now that we have created the body of the candy we can now add the stripes. There are a couple of different ways to create the stripes and my way may not necessarily be the best way but I felt that by splitting the body into separate bodies it would be easier to add the materials. To do this I used the Split command. The following steps will describe the process I used to create the stripes using the split command.

1. Create a new sketch on the Top Plane.

2. Sketch a vertical construction line beginning at the sketch origin.

3. Using the Spline tool, create a spline the originates at the sketch origin and has two points, one on each side of the first guideline. Do worry about the exact locations since the stripes in the real candy are far from perfect.

4. Sketch another spline with the start point at the sketch origin and two points again as seen in the image below.

5. In the Sketch tab of the CommandManager, select the Circular Sketch Pattern button in the flyout after clicking the downward pointing arrow next the the Linear Sketch Pattern button.

6. With the Circular Pattern PropertyManager active, select the splines that you just sketched. Then specify that the number of instances  to be 13. Click the green check mark to create the pattern that will be used to create the stripes.

7. Click the Extruded Surface button on the Surfaces tab of the CommandManager.

8. With the Surface Extrude PropertyManager active, drag the handle beyond the part. We are not concerned with the depth of extrusion, only that the surfaces go completely through the part. Click the green check mark to create the surfaces.

9. In the Menu Bar, click Insert -> Features -> Split.

10. With the Split PropertyManager active, select the surfaces.

11. In the Trim Tools section of the PropertyManager, click the Cut Part button.

12. In the Resulting Bodies section of the PropertyManager, click the box next to each body listed  to add a check mark. Click the green check mark to create the solid bodies.

13.  Now that the bodies have been created, all that is left to do is hide the surfaces. Expand the Surface Bodies folder in the FeatureManager. Select all of the surfaces in the folder and select Hide in the Context Toolbar.

Ready to Create the Scene

The single peppermint candy is now complete. Make sure that you save your changes. Next we will be creating the scene that will be used for the rendering by placing the candy into an assembly. Be sure to check back in the next couple of days for that post.

  • http://www.gabijack.com GabiJack

    Hi Alex,

    That's an interesting method to make the stripes in the candy! I Thanks for showing an alternative way I hadn't thought about! What I would've done, I think, is simply split all five faces of the candy using the sketch you made and the Split Line command, just because it's easy, simple and requires only three operations… and I follow the law of minimum effort. LOL However, I see your point. The model would've remained as one body, instead of several, and perhaps adding appearances would've required a little more time and effort in selecting all those faces? Although I think I could've added appearances directly from SolidWorks, ctrl+selecting all faces that share the same appearance and applying it to all of them at once, and later, once in PhotoView, change their appearance for a nicer PV appearance or a different color, by using the selection filter “Appearance” available in PV. That would've made the process of adding appearances in my one-body model a bit easier, perhaps? This is a nice tutorial and I'm really glad to see you're blogging again! See you in Ahaheim in a few days! :-)

  • http://www.theswgeek.com TheSWGeek

    Hi Gabi,

    I used this approach just to save time when applying the appearances. I felt like it was easier to select 14 solid bodies instead of 70 faces. I debated for a while on what approach to use and my laziness won out. :)

    Thanks for the kind words. I can wait to see all my friends again at SWW.

  • Todd Velasquez

    Sweet Tutorial Alex!

  • Robert

    Hi Alex, great first piece, just one thing I did differently in making the surfaces, namely creating the surface extrude only from the two first splines and not doing the circular pattern, then using circular pattern feature to create the extra surfaces. That way, you have control over the surfaces after you've created them, since using the circular pattern in the sketch as you did deletes all relations to the original two splines. With this tweak you can change the shapes of the splines and therefore cuts if you didn't like them at the end result.

  • Stephen

    Thanks for taking the time to this! I really appreciate it!

  • Aaron

    good tutorial man, i do this in computer class at Harlem High School in Georgia. Im a sophomre

  • Robburrell33

    Another reason not to use the split line feature is that you can only change the colors of the surfaces. If you use the surface extrude to make bodies, the entire body receives the coloring… You could make a cut to make it look like a broken piece of candy, and it would have the correct coloring inside. :)