Std LinkMakeRelative/fr: Difference between revisions

From FreeCAD Documentation
(Created page with "== Propriétés ==")
(Created page with "Cette commande crée un nouveau App Link. Ses propriétés sont décrites dans {{Button|16px Std Créer un lien}}.")
Line 30: Line 30:
== Propriétés ==
== Propriétés ==


This command creates a new [[App_Link|App Link]]; its properties are described in {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake|Std LinkMake]]}}.
Cette commande crée un nouveau [[App_Link/fr|App Link]]. Ses propriétés sont décrites dans {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake/fr|Std Créer un lien]]}}.


In particular, {{PropertyData|Link Transform}} is set to {{TRUE}}, so {{PropertyData|Placement}} becomes hidden, and instead {{PropertyData|Link Placement}} controls the position of the Link with respect to the position of {{PropertyData|Linked Object}}.
In particular, {{PropertyData|Link Transform}} is set to {{TRUE}}, so {{PropertyData|Placement}} becomes hidden, and instead {{PropertyData|Link Placement}} controls the position of the Link with respect to the position of {{PropertyData|Linked Object}}.

Revision as of 14:36, 22 September 2020

Std Créer un sous-lien

Emplacement du menu
Aucun
Ateliers
Tous
Raccourci par défaut
Aucun
Introduit dans la version
0.19
Voir aussi
Std Part, Std Groupe, Std Créer un lien

Description

Std Créer un sous-lien crée un App Link (classe App::Link), tout comme Std Créer un lien mais il fonctionne d'abord sur les sous-éléments sélectionnés et définit DonnéesLink Transform sur true.

Utilisation

Avec sélection:

  1. Sélectionnez un sous-élément dans la Vue 3D, cela signifie un sommet, une arête ou une face, ou toute combinaison de ceux-ci. Ces sous-éléments doivent appartenir à un seul objet.
  2. Appuyez sur le bouton Std Créer un sous-lien. L'objet crée a la même icône que l'objet d'origine mais a deux flèches superposées indiquant qu'il s'agit d'un lien relatif.

Sans sélection:

  • Si aucun objet n'est sélectionné, cette commande ne fait rien.
  • Si un objet est sélectionné uniquement dans la Vue en arborescence, mais qu'aucun sous-élément n'est sélectionné dans la Vue 3D, la commande ne fait rien non plus.

Corps d'origine et trois liens créés à partir de ses sous-éléments, y compris les arêtes et les faces.

Propriétés

Cette commande crée un nouveau App Link. Ses propriétés sont décrites dans Std Créer un lien.

In particular, DonnéesLink Transform is set to true, so DonnéesPlacement becomes hidden, and instead DonnéesLink Placement controls the position of the Link with respect to the position of DonnéesLinked Object.

Scripting

See Std LinkMake for the general information.

An App Link is created with the addObject() method of the document. To define a relative link, its setLink method is used to pick the source object, and one or more of its subelements. Then the LinkTransform attribute is set to True.

import FreeCAD as App

doc = App.newDocument()
body = App.ActiveDocument.addObject("Part::Box", "Box")

obj = App.ActiveDocument.addObject("App::Link", "Link")
obj.setLink(body, '', ['Edge1', 'Edge6', 'Edge7', 'Edge10', 'Face2', 'Face3'])
obj.LinkTransform = True
obj.LinkPlacement.Base = App.Vector(20, 20, 0)
App.ActiveDocument.recompute()