Std LinkMake/fr

Description
crée un App Link ( class), type d'objet qui fait référence à un autre objet dans le même document ou dans un autre document. Il est destiné à être utilisé dans des ensembles mécaniques dans lesquels un même objet peut apparaître plusieurs fois, par exemple des vis et des boulons, mais également d'autres sous-ensembles complexes.

Pour une duplication simple des objets, voir Draft Clone, Draft Matrice et Draft Série de copies. Les outils Draft LinkArray et Draft PathLinkArray créent des liens au lieu de simples copies.

Les liens sont destinés à être utilisés avec des corps entiers. Pour créer des tableaux de caractéristiques dans le même PartDesign Corps, utilisez PartDesign Répétition linéaire, PartDesign Répétition circulaire et PartDesign Transformation multiple.

When used with the PartDesign Workbench, Links are intended to be used with, so it is recommended to set  to  to select the features of the entire Body, and not the individual features. To create arrays of the internal PartDesign Features, use, , and.

The tool is not defined by a particular workbench, but by the base system, thus it is found in the  that is available in all workbenches. The Link object, used in conjunction with to group various objects, forms the basis of the  Assembly3 and  Assembly4 Workbenches.

Utilisation

 * 1) Sélectionnez un objet pour lequel vous souhaitez créer un lien.
 * 2) Appuyez sur le bouton . Si aucun objet n'est sélectionné, un lien vide sera créé.

Without selection:
 * 1) If no object is selected, press the  button to create an empty Link.svg Link.
 * 2) Go to the property editor, then click on the  property to open the Link selection dialog to choose an object, then press.
 * 3) Instead of choosing an entire object in the tree view, you can also pick subelements (vertices, edges, or faces) of a single object in the 3D view. In this case, the Link will duplicate only these subelements, and the arrow overlay will be different. This can also be done with.



Usage: external documents

 * 1) Start with a document that has at least one object which will be the source of the Link.
 * 2) Open a new document or an existing document. For easier handling, use  to show both documents in the tree view. Before you proceed, save both documents. The Link won't be able to find its source and target unless both documents are saved on disk.
 * 3) In the first document, select the object that you wish to link; then switch tabs in the main view area to switch to the second document.
 * 4) Press . The produced object has the same icon as the original object, but has an additional arrow overlay indicating it is a Link coming from an external document.


 * When saving the document with the Link, it will also ask to save the source document which contains the original object.
 * To include the original object in the document with the Link, use or.
 * can be used on an existing Link object, in order to create a Link to a Link which ultimately resolves to the original object in the source document. This can be used with to pick only certain subelements as well.



Dragging and dropping
Instead of switching document tabs, you can create Links by performing a drag and drop operation in the tree view: select the source object from the first document, drag it, then drop it into the second document's name while holding the key in the keyboard.

Dragging and dropping results in different actions depending on the modifier key that is held.
 * Without modifier key it simply moves the object from one document to the other; an inclined arrow is shown in the cursor.
 * Holding the key copies the object; a plus sign is shown in the cursor.
 * Holding the key creates a Link; a pair of chain links is shown in the cursor.

For the and  modifiers, dragging and dropping can also be done with a single document. That is, dragging an object and dropping it into the same document's name can be used to create multiple copies or multiple Links to it.

Usage: groups
can be used on in order to quickly duplicate groups of objects positioned in space, that is, assemblies.



A regular does not possess a  property, so it cannot control the position of the objects inside of it. However, when is used with, the resulting Link behaves essentially like a , and can also be moved in space.



Overriding appearance
When a Link is created, by default the is, so the Link will have the same appearance as the original.

When is set to, the  property will now control the appearance of the Link.

Regardless of the state of, it is possible to individually set the appearance of the subelements (vertices, edges, faces) of a Link.
 * 1) Select the Link in the tree view. Open the context menu (right-click), and pick.
 * 2) Now pick the individual subelements that you want in the 3D view, press, and change the properties including transparency.
 * 3) To remove the custom attributes, select the elements in the list, and press.
 * 4) When you are satisfied with the result, press  to close the dialog.

as of v0.19, the coloring of the subelements is subject to the topological naming problem so it should be done as the last modelling step, when the model is not subject to change any more.



Link Arrays
Draft OrthoArray.

When a Link is created, by default its is, so only a single Link object will be visible in the tree view.

Given that is  by default, when  is set to  or more, automatically more Links will be created below the first one; each new Link can be placed in the desired position by changing its own  property.

In similar way, each element of the array can have its own appearance changed, either by the and  properties, or by using the  menu on the entire array and then selecting individual faces; this is described in Overriding appearance.



Once you are satisfied with the placement and properties of the Link elements in the array, you may change to  in order hide the individual Links in the tree view; this has the benefit of making the system more responsive, particularly if you have many objects in the document.

When creating this type of Link array, you must place each of the elements manually; however, if you would like to use specific patterns to place the copies, you may use the array tools of the Draft Workbench, like, , and ; these commands can create normal copies or Link copies depending on the options at creation time.

Propriétés
An App Link ( class) is derived from the basic App DocumentObject ( class), therefore it has the latter's basic properties like and.

The following are the specific properties available in the property editor. Hidden properties can be shown by using the command in the context menu of the property editor.

Données



 * : a custom class associated with this object. This only exists for the Python version. See Scripting.

De plus, il affichera les propriétés de l'original.

Vues



 * : this property includes sub-properties that describe the appearance of the object.
 * , it defaults to, which is displayed as on base 255, light blue.
 * , it defaults to, which is displayed as on base 255, dark gray.
 * , it defaults to, which is displayed as on base 255, black.
 * , it defaults to, which is displayed as on base 255, black.
 * , it defaults to
 * , it defaults to.


 * : if individual materials have been added, they will be listed here.
 * : if the individual faces or edges of the link have been overridden they will be listed here.
 * : if the individual materials of the link have been overridden they will be listed here.
 * : if the individual materials of the link have been overridden they will be listed here.


 * : or.
 * : see the information in App FeaturePython.
 * : see the information in App FeaturePython.


 * : see the information in App FeaturePython.
 * : see the information in App FeaturePython.

Il montrera en outre les propriétés de vue de l'original.

Inheritance
An App Link is formally an instance of the class, whose parent is the basic App DocumentObject ( class). It is a very low level object, which can be used with most other document objects.



Scripting
FreeCAD Scripting Basics, and scripted objects.

See Part Feature for the general information.

An App Link is created with the method of the document. It can define its by overriding its  attribute, or by using its  method.

The basic doesn't have a Proxy object so it can't be fully used for sub-classing.

Therefore, for Python subclassing, you should create the object.