App Link
Introduction
Un App Link, ou formellement un App::Link
, est un élément qui renvoie une référence à un autre objet du document ou à un document externe. Cet objet a été introduit dans la version 0.19 afin de réutiliser des objets créés précédemment, ce qui est très utile pour créer des assemblages.
Lorsqu'une copie normale d'un objet est créée (par exemple avec Part Copie simple), un nouvel objet complet avec sa forme topologique est dupliqué, ce qui consomme beaucoup de mémoire. App Link est utilisé pour réutiliser les données existantes d'un objet existant, il n'est donc pas nécessaire de créer un nouvel objet entier. Cela améliore la gestion des copies, en particulier dans le contexte d'assemblage mécanique où de nombreux doublons peuvent être nécessaires, ou lorsqu'il est nécessaire d'importer des assemblages plus petits dans des assemblages plus grands.
Utilisation
- Les App Links peuvent être créés en appuyant sur LinkMake.
Un App Link est un objet interne. Il est donc principalement destiné à être utilisé par les développeurs lors du développement d'établissements d'assemblage. Par exemple, les établis Assembly3 et Assembly4 utilisent cet objet. Voir Ateliers externes.
Propriétés
Voir Propriétés pour tous les types de propriétés que les objets scriptés peuvent avoir.
Un objet App::Link
n'est pas dérivé d'un Part Feature, cependant, si le lien fait référence à un objet externe, il affichera les propriétés de ce dernier.
Ce sont les propriétés disponibles dans l'Éditeur de propriétés pour un App::Link
vide.
Données
Link
- DonnéesLinked Object:
- DonnéesLink Transform:
- DonnéesPlacement:
- DonnéesShow Element:
- DonnéesElement Count:
- DonnéesScale:
Base
- DonnéesLabel:
Vue
Link
- VueDraw Style:
- VueLine Width:
- VueOverride Material:
- VuePoint Size:
- VueSelectable:
- VueShape Material:
Base
- VueOn Top When Selected:
- VueSelection Style:
- VueShow In Tree:
- VueVisibility:
Création de scripts
Voir aussi: Débuter avec les scripts et Objets créés par script.
Voir Part Feature pour plus d'informations.
An App Link is created with the addObject()
method of the document.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("App::Link", "Name")
obj.Label = "Custom label"
Lecture complémentaire
The App Link object was introduced after 2 years of development and prototyping. This component was thought and developed almost single-handedly by user realthunder. The motivations and design implementations behind this project are described in his GitHub page, Link. In order to accomplish this feature, several core changes to FreeCAD were made; these were also extensively documented in Core-Changes.
The App Link project started after the redesign of the PartDesign Workbench was complete in v0.17. The history of App Link can be traced to some essential forum threads:
- Why an object can only be inside one App::Part? (March 2017)
- Introducing App::Link/XLink (March 2017)
- Links (May 2017)
- Realthunder Link implementation: Architecture discussion (June 2017)
- PR #876: Link, stage one, context aware selection (July 2017)
- Preview: Link, stage two, API groundwork (July 2017)
- Assembly3 preview (December 2017)
- Merging of my Link branch (June 2018)
Finally, the pull request and merge happened:
- App::Link: the big merge, old thread (July 2019), pull request #2350 (the BIG merge), LinkMerge branch.
- App::Link: the big merge, main thread (July 2019)
- A simple path description of Link, 019, Link stage, Asm3, merge? (August 2019)
- PR#2559: expose link and navigation actions, an introduction to the Link feature in 0.19 (September 2019).
- 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
- Démarrer avec FreeCAD
- Installation : Téléchargements, Windows, Linux, Mac, Logiciels supplémentaires, Docker, AppImage, Ubuntu Snap
- Bases : À propos de FreeCAD, Interface, Navigation par la souris, Méthodes de sélection, Objet name, Préférences, Ateliers, Structure du document, Propriétés, Contribuer à FreeCAD, Faire un don
- Aide : Tutoriels, Tutoriels vidéo
- Ateliers : Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test