App Link: Difference between revisions

From FreeCAD Documentation
(Move the image to the introduction; remove the properties, as these are included in the Std_LinkMake page)
No edit summary
 
(13 intermediate revisions by 3 users not shown)
Line 5: Line 5:
== Introduction == <!--T:1-->
== Introduction == <!--T:1-->


<!--T:31-->
[[File:Link.svg|32px]]
[[File:Link.svg|32px]]


<!--T:2-->
<!--T:2-->
An [[App_Link|App Link]], or formally an {{incode|App::Link}}, is a type of object that references or links to another object, in the same document, or in another document. It is especially designed to efficiently duplicate a single object multiple times, which helps with the creation of complex [[assembly|assemblies]] from smaller subassemblies, and from multiple reusable components like screws, nuts, and similar fasteners.
An [[App_Link|App Link]], or formally an {{incode|App::Link}}, is a type of object that references or links to another object, in the same document, or in another document. It is especially designed to efficiently duplicate a single object multiple times, which helps with the creation of complex [[assembly|assemblies]] from smaller subassemblies, and from multiple reusable components like screws, nuts, and similar fasteners.

<!--T:3-->
When a regular copy of an object is created, for example, with {{Button|[[File:Part_SimpleCopy.svg|16px]] [[Part_SimpleCopy‎|Part SimpleCopy‎]]}}, an entire new object with its [[Part_TopoShape|Part TopoShape]] is duplicated, which consumes a lot of memory and may slow down the responsiveness of the software. [[App_Link|App Link]] is intended to re-use existing data from existing objects, so creating copies in this way is more efficient.


<!--T:27-->
<!--T:27-->
Line 17: Line 15:


<!--T:28-->
<!--T:28-->
{{Caption|Simplified diagram of the relationships between the core objects in the program. The {{incode|App::Link}} object is a core component of the system, it does not depend on any workbench, but it can be used with most objects created in all workbenches.}}
{{Caption|Simplified diagram of the relationships between the core objects in FreeCAD}}


== Usage == <!--T:4-->
== Usage == <!--T:4-->

<!--T:5-->
* App Links can be created by pressing {{Button|[[Image:Std_LinkMake.svg|16px]] [[Std_LinkMake|LinkMake]]}}.


<!--T:6-->
<!--T:6-->
See [[Std_LinkMake#Usage|Std LinkMake]].
{{Emphasis|Note:}} An [[App_Link|App Link]] is an internal object, so it is mostly intended to be used by developers when developing assembly workbenches. For example, the [[Assembly3_Workbench|Assembly3]] and [[Assembly4_Workbench|Assembly4]] workbenches make use of this object.


== Scripting == <!--T:17-->
== Properties == <!--T:32-->


<!--T:18-->
<!--T:11-->
See [[Std_LinkMake#Properties|Std LinkMake]].
{{Emphasis|See also:}} [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]], and [[scripted objects|scripted objects]].


<!--T:19-->
See [[Part_Feature|Part Feature]] for the general information.


<!--T:20-->
An App Link is created with the {{incode|addObject()}} method of the document.
</translate>
</translate>
{{Std_Base_navi{{#translation:}}}}
{{Code|code=
{{Document_objects_navi{{#translation:}}}}
import FreeCAD as App

doc = App.newDocument()
obj = App.ActiveDocument.addObject("App::Link", "Name")
obj.Label = "Custom label"
}}
<translate>

== Further reading == <!--T:21-->

<!--T:22-->
The App Link object was introduced after 2 years of development and prototyping. This component was thought and developed almost single-handedly by user {{Emphasis|realthunder}}. The motivations and design implementations behind this project are described in his GitHub page, [https://github.com/realthunder/FreeCAD_assembly3/wiki/Link Link]. In order to accomplish this feature, several core changes to FreeCAD were made; these were also extensively documented in [https://github.com/realthunder/FreeCAD_assembly3/wiki/Core-Changes Core-Changes].

<!--T:23-->
The App Link project started after the redesign of the [[PartDesign Workbench|PartDesign Workbench]] was complete in v0.17. The history of App Link can be traced to some essential forum threads:
* [https://forum.freecadweb.org/viewtopic.php?f=19&t=21505 Why an object can only be inside one App::Part?] (March 2017)
* [https://forum.freecadweb.org/viewtopic.php?f=10&t=21586 Introducing App::Link/XLink] (March 2017)
* [https://forum.freecadweb.org/viewtopic.php?f=20&t=22216 Links] (May 2017)
* [https://forum.freecadweb.org/viewtopic.php?f=20&t=23015 Realthunder Link implementation: Architecture discussion] (June 2017)
* [https://forum.freecadweb.org/viewtopic.php?f=17&t=23419 PR #876: Link, stage one, context aware selection] (July 2017)
* [https://forum.freecadweb.org/viewtopic.php?f=17&t=23626 Preview: Link, stage two, API groundwork] (July 2017)
* [https://forum.freecadweb.org/viewtopic.php?f=20&t=25712 Assembly3 preview] (December 2017)
* [https://forum.freecadweb.org/viewtopic.php?f=10&t=29542 Merging of my Link branch] (June 2018)

<!--T:24-->
Finally, the pull request and merge happened:
* [https://forum.freecadweb.org/viewtopic.php?f=27&t=38621 App::Link: the big merge], old thread (July 2019), [https://github.com/FreeCAD/FreeCAD/pull/2350 pull request #2350] (the BIG merge), [https://github.com/realthunder/FreeCAD/tree/LinkMerge LinkMerge branch].
* [https://forum.freecadweb.org/viewtopic.php?f=8&t=37757 App::Link: the big merge], main thread (July 2019)
* [https://forum.freecadweb.org/viewtopic.php?p=329054#p329054 A simple path description of Link, 019, Link stage, Asm3, merge?] (August 2019)
* [https://forum.freecadweb.org/viewtopic.php?f=17&t=39672 PR#2559: expose link and navigation actions], an introduction to the Link feature in 0.19 (September 2019).

</translate>

{{Std Base{{#translation:}}}}

{{Document objects navi{{#translation:}}}}

{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 07:42, 22 February 2022

Introduction

An App Link, or formally an App::Link, is a type of object that references or links to another object, in the same document, or in another document. It is especially designed to efficiently duplicate a single object multiple times, which helps with the creation of complex assemblies from smaller subassemblies, and from multiple reusable components like screws, nuts, and similar fasteners.

Simplified diagram of the relationships between the core objects in FreeCAD

Usage

See Std LinkMake.

Properties

See Std LinkMake.