App Link: Difference between revisions
(Inheritance section. "File:FreeCAD_core_objects.svg". Simplified diagram of the relationships between the core objects in the program. The App::Link object is a core component of the system, it does not depend on any workbench,) |
No edit summary |
||
(27 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{TOCright}} |
|||
<translate> |
<translate> |
||
== Introduction == <!--T:1--> |
== Introduction == <!--T:1--> |
||
<!--T:31--> |
|||
</translate> |
|||
[[File:Link.svg|32px]] |
[[File:Link.svg|32px]] |
||
<translate> |
|||
<!--T:2--> |
<!--T:2--> |
||
An [[App_Link|App Link]], or formally an {{incode|App::Link}}, is |
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: |
<!--T:27--> |
||
[[File:FreeCAD_core_objects.svg|800px]] |
|||
When a regular copy of an object is created (for example, with [[Part SimpleCopy|Part SimpleCopy]]), an entire new object with its topological shape is duplicated, which consumes a lot of memory. App Link is used to re-use existing data of an existing object, so an entire new object doesn't need to be created; this improves the handling of copies, particularly in the context of mechanical assembly where many duplicates may be needed, or where importing smaller assemblies into bigger assemblies is required. |
|||
<!--T:28--> |
|||
{{Caption|Simplified diagram of the relationships between the core objects in FreeCAD}} |
|||
<!--T: |
== Usage == <!--T:4--> |
||
* App Links can be created by pressing {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake|LinkMake]]}}. |
|||
<!--T:6--> |
<!--T:6--> |
||
See [[Std_LinkMake#Usage|Std LinkMake]]. |
|||
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 and Assembly4 workbenches make use of this object. See [[External workbenches|External workbenches]]. |
|||
==Properties== <!--T:7--> |
|||
<!--T:8--> |
|||
See [[Property|Property]] for all property types that scripted objects can have. |
|||
<!--T:9--> |
|||
An {{incode|App::Link}} object is not derived from a [[Part_Feature|Part Feature]], however, if the Link has a reference to an external object, it will show the properties of the latter object. |
|||
<!--T:10--> |
|||
These are the properties available in the [[property editor|property editor]] for an empty {{incode|App::Link}}. |
|||
=== Data === <!--T:11--> |
|||
<!--T:12--> |
|||
{{TitleProperty|Link}} |
|||
* {{PropertyData|Linked Object}}: |
|||
* {{PropertyData|Link Transform}}: |
|||
* {{PropertyData|Placement}}: |
|||
* {{PropertyData|Show Element}}: |
|||
* {{PropertyData|Element Count}}: |
|||
* {{PropertyData|Scale}}: |
|||
<!--T:13--> |
|||
{{TitleProperty|Base}} |
|||
* {{PropertyData|Label}}: |
|||
=== View === <!--T:14--> |
|||
<!--T:15--> |
|||
{{TitleProperty|Link}} |
|||
* {{PropertyView|Draw Style}}: |
|||
* {{PropertyView|Line Width}}: |
|||
* {{PropertyView|Override Material}}: |
|||
* {{PropertyView|Point Size}}: |
|||
* {{PropertyView|Selectable}}: |
|||
* {{PropertyView|Shape Material}}: |
|||
<!--T:16--> |
|||
{{TitleProperty|Base}} |
|||
* {{PropertyView|On Top When Selected}}: |
|||
* {{PropertyView|Selection Style}}: |
|||
* {{PropertyView|Show In Tree}}: |
|||
* {{PropertyView|Visibility}}: |
|||
== Inheritance == |
|||
[[File:FreeCAD_core_objects.svg|800px]] |
|||
{{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.}} |
|||
== Scripting == <!--T:17--> |
|||
<!--T:18--> |
|||
{{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> |
|||
{{Code|code= |
|||
import FreeCAD as App |
|||
doc = App.newDocument() |
|||
obj = App.ActiveDocument.addObject("App::Link", "Name") |
|||
obj.Label = "Custom label" |
|||
}} |
|||
<translate> |
|||
== Further reading == <!--T:21--> |
|||
<!--T: |
== Properties == <!--T:32--> |
||
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: |
<!--T:11--> |
||
See [[Std_LinkMake#Properties|Std LinkMake]]. |
|||
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). |
|||
<!--T:25--> |
|||
{{Std Base}} |
|||
{{Userdocnavi}} |
|||
</translate> |
</translate> |
||
{{Std_Base_navi{{#translation:}}}} |
|||
{{Document_objects_navi{{#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.
Std Base
- File: New, Open, Close, Close All, Save, Save As, Save a Copy, Save All, Revert, Import, Export,Merge project, Project information, Print, Print preview, Export PDF, Recent files, Exit
- Edit: Undo, Redo, Cut, Copy, Paste, Duplicate selection, Refresh, Box selection, Box element selection, Select All, Delete, Send to Python Console, Placement, Transform, Alignment, Toggle Edit mode, Edit mode, Preferences
- View:
- Miscellaneous: Create new view, Orthographic view, Perspective view, Fullscreen, Bounding box, Toggle axis cross, Clipping plane, Texture mapping, Toggle navigation/Edit mode, Appearance, Random color, Workbench, Status bar
- Standard views: Fit all, Fit selection, Isometric, Dimetric, Trimetric, Home, Front, Top, Right, Rear, Bottom, Left, Rotate Left, Rotate Right
- Freeze display: Save views, Load views, Freeze view, Clear views
- Draw style: As is, Points, Wireframe, Hidden line, No shading, Shaded, Flat lines
- Stereo: Stereo red/cyan, Stereo quad buffer, Stereo Interleaved Rows, Stereo Interleaved Columns, Stereo Off, Issue camera position
- Zoom: Zoom In, Zoom Out, Box zoom
- Document window: Docked, Undocked, Fullscreen
- Visibility: Toggle visibility, Show selection, Hide selection, Select visible objects, Toggle all objects, Show all objects, Hide all objects, Toggle selectability, Toggle measurement, Clear measurement
- Toolbars: File, Edit, Clipboard, Workbench, Macro, View, Structure, Help
- Panels: Tree view, Property view, Selection view, Tasks, Python console, DAG view, Model, Report view
- Link navigation: Go to linked object, Go to the deepest linked object, Select all links
- Tree view actions: Sync view, Sync selection, Sync placement, Pre-selection, Record selection, Single document, Multi document, Collapse/Expand, Initiate dragging, Go to selection, Selection Back, Selection Forward
- Tools: Edit parameters, Save image, Load image, Scene inspector, Dependency graph, Project utility, Measure distance, Add text document, View turntable, Units calculator, Customize, Addon manager
- Macro: Macro recording, Macros, Recent macros, Execute macro, Attach to remote debugger, Debug macro, Stop debugging, Step over, Step into, Toggle breakpoint
- Help: Help, FreeCAD Website, Donate, Users documentation, Python scripting documentation, Automatic Python modules documentation, FreeCAD Forum, FreeCAD FAQ, Report a bug, About FreeCAD, What's This
Document objects
- Core: App DocumentObject
- Basic: App FeaturePython, App GeoFeature, Part Feature, Mesh Feature, Fem FemMeshObject
- Internal shapes: Part TopoShape, Mesh MeshObject, Fem FemMesh
- Structure: App DocumentObjectGroup (Std Group), App Part (Std Part), App Link (Std LinkMake)
- Derived: Part Part2DObject, Sketcher SketchObject, PartDesign Body, PartDesign Feature
User documentation
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub