Advanced Parametric Modeling
Parametric modeling is a powerful method for creating 3D models where the design is controlled by **parameters**. Instead of just drawing shapes, you define their relationships and dimensions using variables, formulas, and constraints. This means you can easily change the size or shape of your model by simply updating a value, and the rest of the design will automatically adjust.
FreeCAD Tutorial: Using Parameters
This tutorial will guide you through creating a simple, parametric box in FreeCAD. You'll learn how to use the Spreadsheet Workbench to manage your parameters and link them to your model's dimensions.
Step 1: Set Up the Spreadsheet
- Open FreeCAD and create a new document.
- Switch to the Spreadsheet Workbench.
- Click the "Create new spreadsheet" icon.
- In the spreadsheet, enter labels in column A (`length`, `width`, `height`) and their corresponding values in column B (`100 mm`, `50 mm`, `20 mm`).
- To make these values easy to reference, right-click on each cell in the B column, select "Properties...", and go to the "Alias" tab. Give each cell a descriptive alias (e.g., `box_length`, `box_width`, `box_height`).
Step 2: Create a Parametric Sketch
- Switch to the Part Design Workbench.
- Create a new body and a new sketch on the XY-Plane.
- Use the "Rectangle" tool to draw a rectangle.
- Use the constraint tools to set the dimensions. In the dialog box, instead of typing a number, type `=` and then the alias you created (e.g., `=Spreadsheet.box_length`).
- Close the sketch. Your sketch's dimensions are now linked to the spreadsheet values!
Step 3: Extrude the Model
- Select the sketch in the Model Tree.
- Click the "Pad" tool to extrude it.
- In the "Length" field for the extrusion, enter the alias for the height: `=Spreadsheet.box_height`.
- Click "OK."
Step 4: Test Your Parametric Model
- Now, go back to the Spreadsheet Workbench.
- Change one of the values (e.g., the `box_length` alias to `150 mm`).
- Switch back to the 3D view. You will see your box has automatically updated to the new length! You can now easily change any of the dimensions from this single spreadsheet.
FreeCAD Tutorial: Creating an Animation
This tutorial shows you how to use the Animation Workbench to create a simple animation of your parametric model.
Step 1: Install and Use the Animation Workbench
- If not already installed, go to Tools > Addon Manager and search for "Animation". Install the workbench.
- Switch to the Animation Workbench from the dropdown menu.
- Click on the "Create new animation" tool. An animation object will be created in your document.
Step 2: Create a Keyframe
- In the animation object's properties, set the number of frames for your animation (e.g., 100).
- Select the model part you want to animate.
- Right-click the part and select "Add Keyframe". In the dialog, set the frame number (e.g., 0 for the start).
- Move or rotate the part to its starting position and click "OK".
Step 3: Create a Second Keyframe and Play the Animation
- Move your model part to its final position (e.g., rotated or moved along an axis).
- Right-click the part and select "Add Keyframe" again. Set the frame number to your last frame (e.g., 100) and click "OK".
- Now, select the animation object and use the "Play" button in the toolbar to see your animation in action. FreeCAD will automatically interpolate the movement between your keyframes.
FreeCAD Tutorial: Using the Assembly Workbench
The Assembly Workbench allows you to combine multiple individual parts into a single, functional assembly. This tutorial will guide you through the process of bringing parts together and defining their relationships.
Step 1: Install and Use the Assembly3 Workbench
- If not already installed, go to Tools > Addon Manager and search for "Assembly3". Install the workbench.
- Switch to the Assembly3 Workbench from the dropdown menu.
- Click on the "Create new assembly" tool to create an empty assembly container.
Step 2: Add Parts to the Assembly
- To add parts, simply drag and drop existing parts from your document's tree view into the new assembly object.
- The first part you add will be your base part. It's good practice to "lock" this part in place so it doesn't move. Right-click on it and select "Lock move".
Step 3: Define Constraints
- Constraints are rules that define the relationship between parts. For example, a "Coincident" constraint makes two selected faces touch.
- To use a constraint, select two faces or edges on the parts you want to connect.
- Click the "Coincident" or other constraint button in the toolbar. The parts will snap together according to the constraint, creating a functional assembly.