Skip to content

Latest commit

 

History

History
313 lines (179 loc) · 12.1 KB

TUTORIAL1.md

File metadata and controls

313 lines (179 loc) · 12.1 KB

FreeCAD Assembly 4 Tutorial 1

A quick starter guide

This tutorial will walk you through to build the following assembly:

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

Prerequisites

It is assumed that you have read the Assembly4 instructions and that the Assembly4 workbench has been previously installed. It is also assumed that you have basic knowledge of FreeCAD, especially the PartDesign workbench.

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 each document, create a new Model: Assembly > Create a new Model (or ctrl+m)
  • Save each document in the same directory and name them:
    • asm_tuto1.fcstd
    • axis.fcstd
    • 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

  • Create a new Body

  • Make body active (right-click on Body and in the contextual menu choose Toggle active body).
    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 root Model (remember it's an App::Prt)

  • Create a new LCS (Assembly > New LCS). This can also be done by right-clicking on the Model in the tree, and in the contextual menu Create > Create a new LCS

  • 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

  • Note: ignore the warning:

    PartDesign::CoordinateSystem / LCS_1: Links go out of the allowed scope

  • 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 then 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 Model. This is a documented limitation of App::Part and must be dealt-with manually.

  • Select within the Model tree, all the imported solids and drag them over the Model (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) and hoovering over the Model in the tree with the mouse.
    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 LCS; 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 will create 2 new LCS and place them in the center of the geometry.
    • Select the Model in the tree view
    • Create a new LCS and leave the default name LCS_1
    • Create a new LCS and leave the default name LCS_1
    • This has created LCS_1001, because an object name must be unique in a document, FreeCAD has renamed automagically LCS_1 to LCS_1001
    • To summarize: 2 LCS have been created, LCS_1 and LCS_1001
    • Now rename LCS_1001 to LCS_2 (right-click and choose Rename)

Placing LCS

  • Now place LCS_1 by selecting LCS_1 in the tree, toggle its MapMode, select an edge as shown in the screenshot below, and choose the Concentric option:

  • Click OK

  • Now place LCS_2 by selecting LCS_2 in the tree, toggle its MapMode, select an edge as shown in the screenshot below, and choose the Concentric option:

  • 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 Eternal Part , or in the toolbar click on :

  • This will bring up the following dialog:

  • Select axis#Model

  • Leave the proposed default name axis

  • Click Insert part, it will bring up the Place Link dialog:

  • 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_0
  • Note: If you click Cancel in the Place Link dialog before clicking Show or OK, 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)

  • Click Show

  • This has filled the Expression Engine field and a new section Position has appeared in the Properties of axis instance 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

  • Click on Insert External part, select bearing#Model

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

  • Click Insert

  • This will 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_0
    • Click Show

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

  • Click on Insert External part, select bearing#Model

  • Change the proposed name bearing to bearing_2

  • Click Insert

  • This will 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(LCS_1001)
      Note: When an LCS has been renamed (as we did in the bearing part) this is how it appears.
    • Click Show

  • Result: This time the orientation is correct.

  • Click OK

Insert bearing 3

  • Click on Insert External part, select bearing#Model

  • Change the proposed name bearing to bearing_3

  • Click Insert

  • This will 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
    • Click Show
    • 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-bearings 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 Body 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!