Variant Link: Difference between revisions

From FreeCAD Documentation
Line 30: Line 30:
| M12 || 12 || 20.78 || 10.8
| M12 || 12 || 20.78 || 10.8
|}
|}

'''TODO:''' Add tutorial for how to do this, and upload example FreeCAD document.

Revision as of 01:16, 12 October 2022

Introduction

With the release of FreeCAD 20, in particular configuration tables, a powerful new pattern, so called "variant links" become possible.

"Variant links" build upon Link to vary sets of parameters for a given object at runtime.

Prior to this, you could parameterize objects with techniques such as spreadsheets, but multiple varied instances of that object couldn't coexist at the same time unless you resorted to techniques like copying files or objects which creates maintenance issues.

"Variant links" make the maintenance of such variants, and ability to toggle between them easy and maintainable.

Example

To gain a better idea of "variant links", consider the following example.

Imagine a simple hexagonal nut with a "major" diameter of 10mm (M10). We can reuse the same design, create a link, and then vary certain parameters to create an M12 hexagonal nut.

For our example, we can describe the differences between these two variants with 3 parameters:

  1. diameter of the center hole
  2. width across the corners
  3. and thickness.

The particular parameter values for our variants are described in the below table.

Variant Diameter WidthAcrossCorners Thickness
M10 10 18.48 8.4
M12 12 20.78 10.8

TODO: Add tutorial for how to do this, and upload example FreeCAD document.