{"id":19974352,"url":"https://github.com/gbroques/freecad-dynamic-linked-object","last_synced_at":"2025-06-30T11:03:16.893Z","repository":{"id":62736588,"uuid":"353539369","full_name":"gbroques/freecad-dynamic-linked-object","owner":"gbroques","description":"Example of using a dynamic linked object in an assembly.","archived":false,"fork":false,"pushed_at":"2022-11-05T22:05:46.000Z","size":351,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-30T11:03:14.283Z","etag":null,"topics":["assembly","freecad","link"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gbroques.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-01T01:40:31.000Z","updated_at":"2022-11-05T20:57:04.000Z","dependencies_parsed_at":"2022-11-05T11:46:27.008Z","dependency_job_id":null,"html_url":"https://github.com/gbroques/freecad-dynamic-linked-object","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gbroques/freecad-dynamic-linked-object","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-dynamic-linked-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-dynamic-linked-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-dynamic-linked-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-dynamic-linked-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbroques","download_url":"https://codeload.github.com/gbroques/freecad-dynamic-linked-object/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-dynamic-linked-object/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262762436,"owners_count":23360326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assembly","freecad","link"],"created_at":"2024-11-13T03:14:45.675Z","updated_at":"2025-06-30T11:03:16.825Z","avatar_url":"https://github.com/gbroques.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# FreeCAD Example: Dynamic Linked Object\n\nLink (internally `App::Link`) is an important new feature introduced in FreeCAD 0.19 assemblies.\n\nThis repository aims to layout one pattern for complex assemblies involving *dynamic linked objects* which aims to reduce duplication of assembly related logic such as orientation, positioning, or number of instances.\n\n## Example\nTo illustrate the dynamic linked object concept, consider a table with four legs.\n\nEach leg has two different variants:\n\n* Round\n* and Square\n\nThe variants can be controlled by a parameter in a spreadsheet.\n\nFor our table model, we'll create **five** separate documents:\n\n1. `TableTop.FCStd` - containing the top of the table.\n2. `RoundTableLeg.FCStd` - containing a ''round'' table leg.\n3. `SquareTableLeg.FCStd` - containing a ''square'' table leg.\n4. `Table.FCStd` - containing the assembly of the table top and legs.\n5. `Spreadsheet.FCStd` - containing a spreadsheet to drive the model.\n\nOur simple table model will define the following parameters in `Spreadsheet.FCStd`:\n\n1. `TableTopSize` - Dimension of the **square** table top.\n2. `TableTopThickness` - Thickness of the table top.\n3. `TableLegSize` - Size of each table leg. For Square leg, this is the dimension. For Round leg, this is the diameter.\n4. `TableLegHeight` - Height of each table leg.\n5. `TableLegVariant` - Controls the style of table leg. Possible values include \"`Square`\" and \"`Round`\".\n\n`Table.FCStd` is where the dynamic linked object concept is illustrated.\n\nThe goal is to *not* duplicate the following assembly logic for each table leg variant:\n* Each table leg must appear **four** times underneath each corner of the table top.\n\nHow this is accomplished:\n* The `TableTop` and one of the TableLeg objects (Round or Square) are linked into the `Table` document.\n* The TableLeg link is renamed to `TableLeg` and the \"Linked Object\" property is changed to the following conditional expression:\n  * `\u003c\u003cSpreadsheet\u003e\u003e#Spreadsheet.TableLegVariant == \u003c\u003cSquare\u003e\u003e ? \u003c\u003cSquareTableLeg\u003e\u003e#\u003c\u003cSquareTableLeg\u003e\u003e._self : \u003c\u003cRoundTableLeg\u003e\u003e#\u003c\u003cRoundTableLeg\u003e\u003e._self`\n* Each table leg must appear **four** times underneath each corner of the table top so an [orthogonal array](https://wiki.freecadweb.org/Draft_OrthoArray) is created using the parametric `TableLeg` link as a base object.\n\n![Dynamic Table Leg](dynamic-table-leg.gif)\n\n## See Also\nhttps://wiki.freecadweb.org/Dynamic_linked_object\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbroques%2Ffreecad-dynamic-linked-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbroques%2Ffreecad-dynamic-linked-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbroques%2Ffreecad-dynamic-linked-object/lists"}