Std LinkMake/de

Beschreibung
erstellt ein App-Link-Objekt ( class), das auf ein anderes Objekt innerhalb desselben Dokuments oder in einem anderen Dokument verweist oder eine Verknüpfung zu ihm erzeugt. Es ist speziell dafür entwickelt worden einzelne Objekte effizient zu vervielfältigen, was bei der Erstellung komplexer Baugruppen aus kleineren Unterbaugruppen und vielen Wiederholteilen wie Schrauben, Muttern und ähnlichen Befestigungselementen hilft.

Das App-Link-Object wurde mit der Version 0.19 neu eingeführt; in der Vergangenheit wurde das einfache Duplizieren von Objekten durch erreicht, aber das ist eine weniger effiziente Lösung, da sie entsprechend ihrer Implementierung zwingend eine Kopie der internen Form des Quellobjekts erzeugt. Dagegen referenziert ein App-Link direkt auf die originale Form und ist dadurch speichereffizienter.

Das App-Link-Objekt allein kann schon wie ein Array genutzt werden um das Basisobjekt zu vervielfältigen; das kann erreicht werden, durch das Ändern der auf  oder größer. Dieses "Link-Array"-Object kann auch mit den verschiedenen Array-Werkzeugen des Draft-Arbeitsbereichs erzeugt werden, z.B., , and.

Im PartDesign Arbeitsbereich sind Verknüpfungen zur Verwendung mit  vorgesehen. Es empfiehlt sich daher auf   zu setzen, um Eigenschaften des gesamten Körpers und nicht einzelner Eigenschaften auszuwählen. Um Muster interner PartDesign Formelemente zu erstellen, verwendet man, , and

ist nicht für einen speziellen Arbeitsbereich vorgesehen, sondern für das grundlegende System. Deshalb kann es aus der verwendet werden, die in allen Arbeitsbereichen enthalten ist. Das Verknüpfungsobjekt (link object) zusammen mit zur Gruppierung verschiedener Objekte, stellt die Grundlage der  Arbeitsbereich Assembly3 und  Arbeitsbereich Assembly4 Arbeitsbereiche dar.

Anwendung
Mit Auswahl:
 * 1) Ein Objekt in der Baumansicht oder der 3D-Ansicht auswählen, für das eine Verknüpfung erstellt werden soll.
 * 2) Die Schaltfläche  drücken. Das erzeugte Objekt hat dasselbe Symbol wie das Originalobjekt, ist jedoch mit einem Pfeil überlagert, der darauf hinweist, dass es sich um eine Verknüpfung handelt.

Ohne Auswahl:
 * 1) Wenn kein Objekt ausgewählt wurde, wird durch das Drücken der Schaltfläche  eine leere Link.svg Verknüpfung erstellt.
 * 2) Zum Eigenschafteneditor wechseln, dann auf die  klicken, um den Dialog Link zu öffnen (siehe Auswahlmethoden) und ein Objekt auszuwählen, anschließend  drücken.
 * 3) Anstatt ein komplettes Objekt in der Baumansicht auszuwählen, kann man auch Unterelemente (Knoten, Kanten oder Flächen) eines einzigen Objekts in der 3D-Ansicht auswählen. In diesem Falle dupliziert die Verknüpfung nur diese Unterelemente und der überlagerte Pfeil sieht anders aus. Dies kann auch mit  erreicht werden.





Verwendung externer Dokumente

 * 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.

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.



A Link to a will keep the visibility of the objects synchronized with the original Part; so if you hide one object in a Link, it will be hidden in all Links and in the original object. On the other hand a Link to a will allow independent control of the visibilities.



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 Array
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.

Visibility
When is  and individual elements are listed in the tree view in a Link Array, each Link can be shown or hidden by pressing the  bar in the keyboard.

Another way to hide the individual elements is using the menu.
 * 1) Select the array, open the  menu (right click).
 * 2) In the 3D view, pick any subelement from any Link in the array.
 * 3) Press . An icon of an eye Invisible.svg should appear, indicating that this element has been hidden from the 3D view. The object will temporarily show itself when the cursor hovers over the Invisible.svg icon.
 * 4) You can click  to confirm the operation and close the dialog. The Link will remain hidden even if it is shown as visible in the tree view.



If you wish to restore the visibility of this array element, enter the dialog once more, pick the eye icon, then click on to remove the hidden status, and click  to confirm and close the dialog. The element will be visible in the 3D view again.

When the Link is for a or a, the  menu works in similar way as with arrays; it allows controlling the face color, entire object color, and visibility of the objects in the group.



Eigenschaften
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.

Daten

 * : it indicates the source object of the App Link; this can be an entire object, or a subelement of it (vertex, edge, or face).
 * : it defaults to, in which case the Link will override the 's own placement. If it is set to , the Link will be placed in the same position as the , and its placement will be relative to the 's placement. This can also be achieved with.
 * : the placement of the Link in absolute coordinates.
 * : it is an offset applied on top of the of the . This property is normally hidden but appears if  is set to ; in this case,  now becomes hidden.
 * : it defaults to, in which case the tree view will show the individual Link copies, as long as is  or larger.
 * : it defaults to . If it is or larger, the App Link will behave like an array, and will duplicate the same  many times. If  is, each element in the array will be displayed in the tree view, and each can have its own  modified. Each Link copy will have a name based on the Link's Name, augmented by , where  is a number starting from . For example, with a single , the copies will be named , , , etc.
 * : name of the execute function that will run for this particular Link object. It defaults to . Set it to to disable it.
 * : list of Link elements that have had their color overriden.
 * : it defaults to . It is a factor for uniform scaling in each direction, , and . For example, a cube of x  x , that is scaled by , will result in a shape with dimensions  x  x.
 * : the scale factor for each component for all Link elements when  is  or larger. If  is other than, this same value will be used in the three components.
 * : the scale factor for each Link element.
 * : the visibility state of each Link element, either  or.
 * : the placement for each Link element.
 * : the list of Link elements.


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

The App Link object will additionally show the properties of the original, so the property editor may have groups of properties like , , , etc.

Ansicht

 * : it defaults to ; it can be, , , ; defines the style of the edges in the 3D view.
 * : a float that determines the width in pixels of the edges in the 3D view. It defaults to.
 * : it defaults to ; if set to it will override the 's material, and it will display the colors defined in.
 * : similar to, defines the size of the vertices.
 * : if it is, the object can be picked with the pointer in the 3D view. Otherwise, the object cannot be selected until this option is set to.


 * : 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.

It will additionally show the view properties of the 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.