Skip to content

Latest commit

 

History

History
320 lines (184 loc) · 12.4 KB

README.md

File metadata and controls

320 lines (184 loc) · 12.4 KB

FreeCAD Assembly 4 Tutorial 1

A quick start guide

This tutorial will walk you through building the following assembly:

  • The axis is designed in FreeCAD with the PartDesign workbench
  • The bearings are imported from a STEP file

This tutorial is also available as a video:

YouTube

Prerequisites

It is assumed you have read the Assembly4 instructions, and the Assembly4 workbench is already installed. It is also assumed you have basic knowledge of FreeCAD, especially the Sketcher and PartDesign workbenches.

Download the STEP file bearing_20x37x9.stp (direct link to bearing_20x37x9.stp, right-click and save the file) to your local hard drive.

Toolbar and Menu

Buttons in the toolbar are activated with relevant selection. If a button you want to use is inactive, try to change the selection (with the mouse).

These functions are also accessible with the Assembly menu:

Create the documents

We start with an empty FreeCAD.

  • Create 3 new documents: File > New (or ctrl-n)
  • In one document, create a new Model: Menu > Assembly > New Model (or ctrl+m)
    • this is going to be the assembly
    • save this file as asm_tuto1.fcstd
  • In the second document, create a PartDesign::Body: Menu > Assembly > New Body
    • call it Axis
    • this is where we'll design the axis
    • save this file as axis.fcstd
  • In the third document, create an App::Part: Menu > Assembly > New Part
    • call it Bearing
    • this is where we'll import the bearing from the STEP file
    • save this file as bearing.fcstd
  • Close all 3 documents (you don't need to close FreeCAD)
  • Re-open all 3 documents

Result: These documents are now ready to be used by Assembly4.

Document "axis"

Switch to document "axis" (by clicking on its tab).

Body

  • Make the body active (right-click on Body then choose Toggle active body from the context menu). Result: This will switch to the PartDesign workbench.

  • Create a new Sketch (should be in the active body). In the Task view, select XY_Plane

  • Draw the following sketch:

  • Make a revolution of the Sketch:

LCS_1

  • Switch to Assembly4 workbench

  • Select the body Axis (remember it's a PartDesign::Body)

  • Create a new Local Coordinate System (LCS) (Menu > Assembly > New Coordinate System). Call it LCS_1 . This can also be done by right-clicking on the Axis body in the tree, then choosing Create > New Coordinate System from the contextual menu

  • Edit its MapMode in the Placement in its Property View (see inlay in screenshot below on how to activate it)

  • Choose the circle as shown:

  • Select the option Concentric

  • Click OK

  • In order to make our life easier later, we'll change the basic color of the Body by right-clicking on the Body in the Model tree, and choose Appearance . In the Display Properties dialog change the Shape color to something fancy.

  • Save

Result: The part axis is now ready for assembly

Document "bearing"

Switch to document "bearing" (by clicking on its tab).

If you haven't done so already, download the STEP file bearing_20x37x9.stp to the same local directory as the 3 previous documents: axis.fcstd, bearing.fcstd, and asm_tuto1.fcstd.

STEP import

  • Import (File > Import) the previously mentioned STEP file bearing_20x37x9.stp

Result: This will create a bunch of solids in the bearing document, but not in the part Bearing . This is a documented limitation of App::Part and must be dealt-with manually.

  • Select all the imported solids within the model tree, and drag them over the Part Bearing (in the tree). Note how the cursor changes to a small hand and an arrow appears close to the cursor, meaning that the solids are moved:

  • You can check that the solids have indeed been moved by collapsing the model tree (with the small triangle). Note: If it didn't work, fix it. If necessary, delete the file bearing.fcstd and begin again.

LCS

  • In order to place this bearing in the assembly, we will need 2 new Local Coordinate Systems; each in the center, but each on 1 side. LCS_0 looks like it is in the center, but one can never trust a STEP import so we don't use that. Instead, we create the 2 new Local Coordinate Systems and place them in the center of the geometry.
    • Select the Model in the tree view
    • Create a new Local Coordinate System (LCS) (Assembly > New Coordinate System), leave the default name LCS_1, click OK.
    • Create a new Local Coordinate System (LCS) (Assembly > New Coordinate System), leave the default name LCS_2, click OK.

Placing Local Coordinate Systems

  • Now place LCS_1 by:

    • Right click LCS_1 in the tree
    • Choose Edit datum
    • Select the edge as shown in the screenshot below
    • Choose the Concentric option:

  • Click OK

  • Now place LCS_2 using the same process, but selecting the edge on the opposite side of the bearing as shown in the screenshot below:

  • Click OK

  • Save

Result: The part bearing is now ready for assembly

Document "asm_tuto1"

  • Switch to document asm_tuto1 by selecting its tab in the main window

Insert axis

  • Select Menu > Assembly > Link a Part , or in the toolbar click on :

  • This will bring up the following dialog in the Task panel:

  • Select axis#Axis

  • Enter a name, for example axis

  • Click OK, this will insert the part into the assembly.

  • Now the inserted Part needs to be placed in its correct location: since the just-inserted part is still selected, click on Menu > Assembly > Edit Placement of a Part:

it will bring up the Place linked Part dialog:

Note: the Part that is being placed is transparent during this operation

  • Make the same selections as in the screenshot above
    • in the left panel Select LCS in Part choose LCS_0
    • in the drop-down combo-box Select part to attach to choose Parent Assembly
    • in the right panel Select LCS in Parent choose LCS_Origin

Note: If you click Ignore in the Place Link dialog, then the linked part will still be in the assembly but without any Placement: in this case we have created a raw App::Link interface to the part axis. This link can be moved in the assembly by the built-in FreeCAD dragger (Right Click > Transform)

  • A new axis instance appears in the tree inside asm_tuto1. This new instance has a Assembly property section with the following properties:

    • AssemblyType : notes which assembly solver should be applied (Asm4EE here)
    • AttachedBy : notes by what coordinate system in the linked part this instance is attached to the assembly, preceded by a #
    • AttachedTo : notes to which parent, and inside that parent to which coordinate system, separated by a #, the instance is attached
    • AttachmentOffset : is an App::Placement property that applies an offset between the attachment LCS in the linked part and the target LCS in the assembly.
  • Click OK

  • Result: the axis part is now in the asm_tuto1 document, including the tree, with all its sub-objects.

Insert bearing 1

  • Select Assembly > Link a Part, select bearing#Bearing

  • Change the proposed name bearing to bearing_1 (we will have 3 bearings)

  • Click OK

  • This will insert a link to the _Bearing_part.

  • Bring up the Place linked Part dialog:

    • in the left panel Select LCS in Part choose LCS_1
    • in the drop-down combo-box Select part to attach to choose part axis
    • in the right panel Select LCS in Parent choose LCS_0

Result: As you can see, this has placed the bearing but in an awkward orientation. This is normal, and it's due to the different orientations of the LCS during their mapping.

This is easy to correct:

  • Click on the Rot X and Rot Y and Rot Z buttons until the bearing is in its correct position and orientation. You can either spend time thinking about which axis (X-Y-Z) to rotate, or try everything until it fits. The result will be the same:

  • In this case 1 Rot Y was needed.

  • Click OK

Note: Now we can see why it was useful to change the axis color.

Insert bearing 2

  • Select Assembly > Link a Part, select bearing#Bearing

  • Change the proposed name to bearing_2

  • Click OK

  • Bring up the Place Link dialog:

    • in the left panel Select LCS in Part choose LCS_1
    • in the drop-down combo-box Select part to attach to choose part bearing_1
    • in the right panel Select LCS in Parent choose LCS_2 Note: When an LCS has been renamed (as we did in the bearing part) this is how it appears.

  • Result: This time the orientation is correct.

  • Click OK

Insert bearing 3

  • This time, we'll save some time: select in the Model tree one of the previously inserted bearing_1 or bearing_2, and click on Menu > Assembly > Link a Part : the tool will recognise the linked file, and will increment the previously chosen name with 1 digit and propose bearing_3

  • Click OK

  • Bring up the Place Link dialog:

    • in the left panel Select LCS in Part choose LCS_1
    • in the drop-down combo-box Select part to attach to choose part axis
    • in the right panel Select LCS in Parent choose LCS_1
    • Orient bearing_3 with the buttons Rot X and Rot Y and Rot Z until it is in its correct position

  • Click OK

We are nearly done.

Offset bearing 3

In real-life, this would be a lead screw with a standard 3-bearing mount, where the 2 bearings facing each other are diagonal contact bearings that can also take thrust, and the 3rd lone bearing is a deep groove ball bearing. In order to not over-constrain the axis, the 3rd bearing mustn't touch the flange of the axis, there must be some room to allow for temperature dilatation compensation AKA thermal expansion.

This is where the AttachmentOffset property of the instance comes in play. In addition to store the rotations used to orient the inserted part, it can also apply a translation of the inserted part relative to the target LCS:

  • Select the instance bearing_3 in the Model tree

  • Open the MapMode of the AttachmentOffset property

  • In the Z field type: 2mm

  • Click Apply

  • Click OK

  • Save

  • Click Yes

Result: Now your first Assembly4 assembly is finished!

Check

...but or course we want to check whether everything went according to plan, right?

  • Close all 3 documents

  • Re-open asm_tuto1.fcstd

  • Ignore the warnings: Enumeration index -1 is out of range, ignore it

  • In the Model tree, right-click on Sketch in the Revolution in the part axis and choose Edit Sketch

  • Modify the Sketch like in the image below:

  • Click Close

  • The assembly has updated, the axis is longer, and all the bearings have followed:

By right-clicking on the Body inside axis, you can Toggle active body and edit it with PartDesign, modifying and adding features, like for example a chamfer:

Should it happen that you make modifications in the assembly and some parts didn't respond, right-click on that part and choose in the contextual menu Recompute object.

Note: You can also do a Recompute object on the top level assembly Model.

Feedback

Did this tutorial help you, do you have anything to share? Please open a ticket or mention something in the dedicated FreeCAD forum thread pertaining to this tutorial. You can also make a PR with your proposed changes.

Happy Assembling!