Sandbox:PartDesign Bearingholder Tutorial I

The purpose of this tutorial is to introduce you to two different work flows for creating a cast part with drafts and fillets. Depending on what other CAD programs you have been using, one or the other might be familiar to you. As a working example we will be modeling a simple bearing holder.

This is the first part of the tutorial. It will use what might be called the single body work flow, using the (simpler) top part of the holder as an example.

Bearing Holder Tutorial - Finished bearing holder (top)

Prerequisites

 * Having completed the following tutorials:
 * Creating a simple part with PartDesign
 * Basic Part Design Tutorial 017
 * A minimum proficiency with the Sketcher Workbench.

Design data
The holder should be able to hold a 90mm diameter bearing with a width of up to 33mm (e.g. DIN 630 type 2308). The bearing requires a shoulder height of at least 4.5mm in the holder (and on the shaft). The top part of the holder will be bolted to the bottom with two 12mm bolts. There should be a groove on both sides of the bearing able to hold a standard shaft sealing ring DIN 3760: 38x55x7 or 40x55x7 on one side, 50x68x8 on the other side.

The holder will be a sand cast with a minimum wall thickness of 5mm, a draft angle of 2 degrees, and a minimum fillet radius of 3mm.

Starting the model
Create a new document, then switch to the PartDesign Workbench. Alternatively, from the StartPage you can click on "Part Design" under "Start a new project"; this will automatically create a new document and switch to the PartDesign workbench.

Next, click on Create body in the Tasks panel or on the icon in the toolbar.

Note: the body is a new object introduced in FreeCAD 0.17. It is a container that holds all the sketches, datum (reference) geometry and features for a single contiguous part. It is an object exclusive to PartDesign.

Setting up the skeleton geometry
The idea of skeleton geometry is to capture the basic design dimensions in a single datum (reference) feature (e.g. a plane or an axis). When a design dimension needs to be changed, all that needs to be done is to change the skeleton feature. If the model is well built, then all its features will recompute to reflect the design change. This reduces the danger that in a complex model, where the basic design dimensions are used in multiple places, you forget to change it somewhere.

The alternative to skeleton geometry is to have a table of the basic design dimensions that assign a symbolic name to each dimension, and then use the symbolic name wherever the dimensions is required to build the model. In such a case, the Spreadsheet Workbench could be used along with Expressions.

For the case of the bearing holder, the two most important design dimensions are the distance between the bolts (which limits the size of the bearing that can be used) and the height of the bolt heads. The dimensions chosen are
 * Distance between bolts: Radius of bearing (45) + wall thickness (5) plus radius of hole for bolt (7) = 57mm, so the vertical plane will be 57mm offset from the YZ-plane.
 * Height of bolt heads: This was chosen as an offset of 28mm from the XY-plane
 * Two further datum planes can be created to reflect the amount of material that must be cut away from the sides of the bearing holder. They are offset +22 and -22 from the XZ-plane.

Bearing holder with the two most important skeleton planes.

It is advisable to give clear names to the skeleton geometry. Most of the time, you will want to turn off visibility for datum planes because they clutter up the screen, and if the planes have self-explanatory names you can just pick them by name in the Model tree instead of from the 3D view.


 * 1) In the Model tree, click on the arrow in front of Body to reveal its content; select Origin and make it visible by pressing the spacebar. You can also click on the arrow besides it in the Model tree to reveal its content (X/Y/Z_Axis and XY/XZ/YZ_Plane).
 * 2) Let's start with the first datum plane to define the bolt distance. Click on [[Image:PartDesign_Plane.png|24px]] Create a new datum plane. In the Tasks panel, the Plane parameters is shown with the first button labeled "Selecting...", which indicates it is waiting for a selection. In the 3D view or in the Model tree, select the YZ_Plane. In the Plane parameters, the first button is now labeled "Plane", and the selected plane is shown in the input field besides it. Just above in green is shown Attached with mode Plane face.
 * 3) Next we set the 57mm offset. This is done in the Extra placement section of the Plane parameters. The X/Y/Z directions are not referenced to the global coordinate system, but to the coordinate system of the YZ_Plane. Therefore, the offset value should be entered in the Z field. Click OK.
 * 4) In the Model tree, a new "DatumPlane" object is created underneath the Body. Rename it Plane_BoltAxis.
 * 5) Next create a new datum plane attached to XY_Plane with a Z offset of 28mm. Rename it Plane_BoltHead.
 * 6) Create a third datum plane attached to XZ_Plane with a Z offset of 22mm. Rename it Plane_FrontSide.
 * 7) Finally create a fourth datum plane attached to XZ_Plane with a Z offset of -22mm. Rename it Plane_BackSide.

The Body's standard planes and all datum planes.

Creating the main shape
Sketch for the first pad

Now it's time to start creating some real geometry. But first, hide all the datum planes but Plane_BoltAxis, we will want to use it as external geometry in our first sketch. Then we will pad this sketch.


 * 1) Create a Sketcher NewSketch.png new sketch and attach it to the XZ_Plane with attachment mode Plane face.
 * 2) Use the Sketcher External.png Sketcher external geometry tool to copy the Plane_BoltAxis datum plane that is shown as a yellow vertical line to the right of the sketch. A vertical magenta line will be created. You can switch to the Model tab and hide Plane_BoltAxis.
 * 3) Add geometry as shown on the image above, for example using the Sketcher CreatePolyline.png Sketcher Polyline tool along with the key to toggle between line and arc modes. There are just four dimensions:
 * 4) *The inner radius (22.5mm);
 * 5) *The machining allowance (3mm) at the base as an offset to the horizontal sketch axis;
 * 6) *The distance from the datum plane representing the bolt axis (7mm);
 * 7) *The 2 degree angle constraint for the short vertical lines. This means that if you later move the datum plane, the pad will automatically adjust its outer radius. Remember that before you can use the datum plane for dimensioning, you need to introduce it as external geometry to the sketcher. You are probably wondering why there is a small straight segment at the bottom of each arc. This segment ensures that there will be a draft angle of 2 degrees on the arcs. This might look like a lot of work for a very small benefit, but many CAD programs (and maybe FreeCAD one day) have tools that highlight a solid model in different colours and immediately show you all faces where the draft angle is not correct. You don't want that to happen to your model, especially after putting on a lot of fillets!
 * 8) When you have done the sketch, close it, and with the sketch still selected, create a PartDesign Pad.png PartDesign Pad feature symmetric to plane with a length of 62mm (34mm for the bearing, 2x 9mm for the sealing rings, 2x 5mm for the wall thickness).

Cutting the main shape
Next we want to cut away some material where the sealing rings are, because their outer diameter is much less than the bearing's. The easiest way to create the sketches is to select the sketch of the pad and then choose "Duplicate selection" from the edit menu. You can then remap the sketch to the side of the pad, and modify it as shown in the picture.

The only two important dimensions in the sketch are 3mm of machining allowance at the bottom, and a inner diameter of 78mm: 68mm for the outer diameter of the sealing ring + 2x 5mm wall thickness. Since the sealing ring on the other side will only have a diameter of 55mm, the cut-out can be 65mm here.

After you have created the sketch, pocket it up to the datum plane marking the bearing side plus 5mm wall thickness. If you ever want to modify the holder to be able to hold wider bearings, all you have to do is to change the dimension of these datum planes, and the cut-out depth will follow along.

To reduce the amount of machining required, we also want to cut away some material inside the holder. Again, duplicating the sketch of the first pad is convenient. It doesn't even have to be remapped. Again, the only important dimensions are the machining allowance (3mm) and the outer diameters: 84mm for the place where the bearing will be (90mm - 2x machining allowance), 49mm for the smaller sealing ring (55mm - 2x 3mm) and 62mm for the larger sealing ring.

After creating the sketches, pocket them: Symetrically 28mm for the bearing cut-out (34mm - 2x machining allowance) and one-sided 23mm for the cut-outs for the sealing rings: 34mm / 2 for half the bearing width + 9mm for the sealing rings - 3mm machining allowance.

Your part should now look like the picture on the right. Note how the different cut-aways combine to create an almost uniform wall thickness, which will make the casting easier and less liable to have pores.

Now all that remains is to create some material for the bolts to go through. You might be tempted to sketch these as a circle and then pad them, but this will head you for trouble when you try to put the draft onto them later (I assume that is a weakness of OpenCascade). So to circumvent the problems, it is better to create a sketch with the draft angle included and then rotate it through 360 degrees.

Here again the skeleton planes come in useful. You will need the bolt axis plane and the bolt head plane as external geometry. Then, create a straight line for the rotation axis and make sure it is constrained to the bolt axis plane reference. Toggle it to be construction geometry. Then, sketch the rest of the contour. The important dimensions are the machining allowance at the top and bottom and the radius of 12mm: 7mm for the hole radius + 5mm wall thickness.

Create a revolution feature from the sketch and then mirror it on the YZ-plane. This is all the solid geometry we need to model. The rest is draft and fillets.

Applying draft to the side faces
The next step is to apply drafts on all faces. Its important to consider the location of the neutral plane, that is, the plane which the face is "rotated" around. If we choose as neutral plane the bottom of the holder, then we will have a problem with the wall thickness in the top part of the holder. Therefore, we create a datum plane at an offset of 40mm from the XZ plane as a compromise between the top of the holder becoming to thin and the bottom becoming to wide.

To put draft on a face, select this face and create the draft feature. You can then select more faces to apply the draft on. If you have a large part, it is advisable to draft only one face at a time. This means that if you change the geometry and a draft fails, only this one feature will fail, whereas if you put all faces in one draft feature, then the whole feature might fail because of one face failing. For a small part like the bearing holder, its sufficient to create two draft features: One for the four outside faces, and one for the inside faces.

The dialog will force you to select a neutral plane before completing. You can leave the pull direction empty, in this case it will be normal to the neutral plane. Don't forget to set the draft angle to 2 degrees.

Filleting the holder
We can now fillet the part. The picture shows the first set of fillets. Start with the small circular fillets and make them 4mm radius. Even though 3mm would be enough as per specification of the part, a radius of 4mm means that after machining 1mm of the fillet is left, reducing the sharp edge produced by the machining. The large fillets are 6mm radius to help spread the force from the bolts into the rest of the part. It would be nice to make this radius even larger, but unfortunately OpenCascade can't handle overlapping fillets yet.

As with drafts, in a complex part you should fillet only one edge at a time to avoid unnecessary failures if the base geometry changes.

The rest of the fillets are simply 3mm radius. Looking at the picture on the right, the two highlighted fillets could actually be filleted with 5mm to achieve a more uniform wall thickness for the casting. After machining, the minimum wall thickness of 5mm would still be maintained. But again the fact that OpenCascade can't handle overlapping fillets prevents us from doing this for the inner of the two highlighted fillets.

Filleting the inside of the part presents us with a difficulty that cannot be solved with the current tools in the PartDesign workbench. The highlighted edge cannot be filleted at all, again because the rounds would overlap. This could be worked around by creating a sweep instead of a fillet, except that sweeps are not implemented in PartDesign yet. For the time being, we are forced to leave the edge as it is.

The picture on the right shows the finished part in the state it will be before machining (except for the one edge that is impossible to fillet). You will notice that one edge that runs around the whole part has been left unfilleted on purpose. This is the edge where the bottom and the top of the mould meet. Here, no fillet is possible (and none is required anyway).

Machining
Now we can cut away the material that will be machined off the raw cast part. This is very easy with the skeleton geometry defined. The idea is to create all machining features (Pockets and Grooves) using datum features only. This means they will be totally independent of the solid geometry of the bearing holder, which gives us some big advantages:
 * No matter how you change the solid geometry, the features for the machining can never fail.
 * You can create the machining geometry before finalizing the solid, which gives you useful visual feedback.
 * If you move the skeleton datum planes, then both the solid geometry and the machining will adapt automatically.
 * If you make a mistake in your solid geometry, the machining will still be in the correct position, and very likely the mistake will become glaringly obvious (e.g. a wall thickness becoming 2mm instead of 5mm). Whereas if you reference the machining to the solid geometry, it will adapt to the error in the solid and e.g. maintain the 5mm wall thickness, just in the same wrong location as the solid is.

Before starting on the machining geometry, I like to place a datum point in the tree and name it something like "Machining_starts_here". This is useful if you want to switch between the raw and the machined state of the part because you can see at a glance where to move the insert point to get the raw state.

To machine the bottom of the holder, just sketch a large rectangle on the XZ plane and pocket it. For the top, sketch a circle on the datum plane defining the bolt head location, and then mirror the pocket on the YZ plane. In the same way, create a pocket for the hole which the bolt will go through and mirror it. To machine the inside of the holder, create a sketch on the YZ plane and groove it.

Once you have done the machining, you can have a nice visual effect by colouring all the machined faces so that you can see at one glance which parts are raw casting and which are machined after casting.

Final notes
We have modelled the bearing holder top with the dimensions it will have after casting. To create the casting mould, you need to apply shrinkage to your part because after casting, when the hot metal cools down, it will shrink by a few percent (depending on the material). Usually it is best to leave the application of shrinkage to the foundry making the part because they have the required special knowledge. They should also tell you if your part has problematic areas, e.g. very thick walls suddenly joining to very thin sections without a properly tapered section between them.

Part Two
PartDesign Bearingholder Tutorial II