SolidWorks Tutorial 1b: Design of an Electronic Box, Continued
Introduction
This tutorial is the second in a series teaching basic SolidWorks sketching and modeling tools.
In the previous tutorial, we designed a simple hollow box. In this tutorial we will add the features that will give it its function: A sample electronics enclosure that could be made on a 3D printer.
In this page we will explore more aspects of sketching, especially those that add features to the surfaces of an simpler model.
The pace of this tutorial will be somewhat faster than the previous one because knowledge of tools already presented will be assumed.
Adding Mounting Lugs
In this section we will cover adding new features to an existing part, and we will introduce the method for adding parametric constraints to the sketched features.
The box from Tutorial 1a has several planar faces on it. Any of these faces can be used for making a new sketch.
Rotate the image to reveal the bottom of the box. (Click down on the MIDDLE mouse wheel and drag. If this is unfamiliar, please review the SolidWorks user interface introduction. )
Click the LEFT mouse button on the bottom face to select it. It should highlight in blue.
With this face highlighted, open the "Sketch" tab and click on the "Sketch" button in the upper-left corner of the window. This will open a new sketch.
The first thing to do is a little bit counter-intuitive. Sketch two rectangles that will become the lugs, but don't attach them to anything. Leave them floating off to the sides of the box, very roughly here they are supposed to go, and don't bother to dimension them yet.
We will use the "Constraints" tool of SolidWorks to position these rectangles. This tool allows you to relate sketched features to each other and enforce a particular geometric property.
The first step is to select the two features that need to be related. We want to center the left-hand rectangle on the side of the box. To do this, you need to select two points: The center point of one of the vertical sides of the rectangle and the origin point.
To select the center-point of a rectangle edge, hover the cursor over the edge near the center of the line. The center-point should appear as a small box in the line. Click there.
Next, press down on the -CTRL- ket on the keyboard. This is a standard Windows method for selecting multiple objects, and SolidWorks uses the same convention. With the -CTRL- key depressed, select the origin point in the center of the box. This is the same point that you selected when you sketched the first rectangle in Tutorial 1a.
With both of these points selected, SolidWorks will open a "Properties" dialog in the left margin. Some options are given for constraints to be added. Select "Horizontal" to coerce the rectangle side so it is centered with respect to the origin.
Perform this same operation with the center point of the rectangle on the other side of the box.
Both of these rectangles will be seen to move on center, flanking the box.
Next we constrain the rectangle edges to lie along the edges of the box. To do this, you select the EDGE of the rectangle (not its center point) and the leftmost edge of the box, while depressing the -CTRL- key.
Another "Properties" dialog will open with different constraints options, appropriate to lines. Select "Collinear" from the list. The rectangle will be seen to merge with the edge of the box.
Perform the analogous operation with the rectangle on the right side.
This procedure has the advantage where if you change the dimensions of the box, the mounting lugs will remain attached and centered in their new locations.
Next, dimension the lugs and add fillets to the outside corners as shown below







