Std LinkMake: Difference between revisions

From FreeCAD Documentation
(More information of the view properties)
(Marked this version for translation)
Line 19: Line 19:
The [[App_Link|App Link]] object was newly introduced in v0.19; in the past, simple duplication of objects could be achieved with {{Button|[[File:Draft_Clone.svg|16px]] [[Draft_Clone|Draft Clone]]}}, but this is a less efficient solution due to its implementation which essentially creates a copy of the internal [[Part_TopoShape|Shape]] of the source object. On the other hand, a Link references directly the original Shape, so it is more memory efficient.
The [[App_Link|App Link]] object was newly introduced in v0.19; in the past, simple duplication of objects could be achieved with {{Button|[[File:Draft_Clone.svg|16px]] [[Draft_Clone|Draft Clone]]}}, but this is a less efficient solution due to its implementation which essentially creates a copy of the internal [[Part_TopoShape|Shape]] of the source object. On the other hand, a Link references directly the original Shape, so it is more memory efficient.


By itself the [[App_Link|Link]] object can behave like an array, duplicating its base object many times; this can be done by setting its {{PropertyData|Element Count}} property to {{Value|1}} or larger. This "Link array" object can also be created with the different array tools of the [[File:Workbench_Draft.svg|24px]] [[Draft_Module|Draft Workbench]], for example, {{Button|[[File:Draft_OrthoArray.svg|16px]] [[Draft_OrthoArray|Draft OrthoArray]]}}, {{Button|[[File:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|Draft PolarArray]]}}, and {{Button|[[File:Draft_CircularArray.svg|16px]] [[Draft_CircularArray|Draft CircularArray]]}}.
<!--T:5-->
<!--T:5-->
By itself the [[App_Link|Link]] object can behave like an array, duplicating its base object many times; this can be done by setting its {{PropertyData|Element Count}} property to {{Value|1}} or larger. This "Link array" object can also be created with the different array tools of the [[File:Workbench_Draft.svg|24px]] [[Draft_Module|Draft Workbench]], for example, {{Button|[[File:Draft_OrthoArray.svg|16px]] [[Draft_OrthoArray|Draft OrthoArray]]}}, {{Button|[[File:Draft_PolarArray.svg|16px]] [[Draft_PolarArray|Draft PolarArray]]}}, and {{Button|[[File:Draft_CircularArray.svg|16px]] [[Draft_CircularArray|Draft CircularArray]]}}.
When used with the [[File:Workbench_PartDesign.svg|24px]] [[PartDesign_Workbench|PartDesign Workbench]], Links are intended to be used with full {{Button|[[File:PartDesign_Body.svg|16px]] [[PartDesign_Body|PartDesign Bodies]]}}; to create arrays of [[PartDesign_Feature|features]], use {{Button|[[File:PartDesign_LinearPattern.svg|16px]] [[PartDesign_LinearPattern|PartDesign LinearPattern]]}}, {{Button|[[File:PartDesign_PolarPattern.svg|16px]] [[PartDesign_PolarPattern|PartDesign PolarPattern]]}}, and {{Button|[[File:PartDesign_MultiTransform.svg|16px]] [[PartDesign_MultiTransform|PartDesign MultiTransform]]}}.
When used with the [[File:Workbench_PartDesign.svg|24px]] [[PartDesign_Workbench|PartDesign Workbench]], Links are intended to be used with full {{Button|[[File:PartDesign_Body.svg|16px]] [[PartDesign_Body|PartDesign Bodies]]}}; to create arrays of [[PartDesign_Feature|features]], use {{Button|[[File:PartDesign_LinearPattern.svg|16px]] [[PartDesign_LinearPattern|PartDesign LinearPattern]]}}, {{Button|[[File:PartDesign_PolarPattern.svg|16px]] [[PartDesign_PolarPattern|PartDesign PolarPattern]]}}, and {{Button|[[File:PartDesign_MultiTransform.svg|16px]] [[PartDesign_MultiTransform|PartDesign MultiTransform]]}}.


<!--T:18-->
The {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake|Std LinkMake]]}} tool is not defined by a particular workbench, but by the base system, thus it is found in the {{MenuCommand|structure toolbar}} that is available in all [[Workbenches|workbenches]]. The Link object, used in conjunction with {{Button|[[File:Std_Part.svg|16px]] [[Std_Part|Std Part]]}} to group various objects, forms the basis of the [[File:Assembly3_workbench_icon.svg|24px]] [[Assembly3_Workbench|Assembly3]] and [[File:Assembly4_workbench_icon.svg|24px]] [[Assembly4_Workbench|Assembly4 Workbenches]].
The {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake|Std LinkMake]]}} tool is not defined by a particular workbench, but by the base system, thus it is found in the {{MenuCommand|structure toolbar}} that is available in all [[Workbenches|workbenches]]. The Link object, used in conjunction with {{Button|[[File:Std_Part.svg|16px]] [[Std_Part|Std Part]]}} to group various objects, forms the basis of the [[File:Assembly3_workbench_icon.svg|24px]] [[Assembly3_Workbench|Assembly3]] and [[File:Assembly4_workbench_icon.svg|24px]] [[Assembly4_Workbench|Assembly4 Workbenches]].


Line 33: Line 33:
# Press the {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake|Std LinkMake]]}} button. The produced object has the same icon as the original object, but has an arrow overlay indicating it is a Link.
# Press the {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake|Std LinkMake]]}} button. The produced object has the same icon as the original object, but has an arrow overlay indicating it is a Link.


<!--T:19-->
Without selection:
Without selection:
# If no object is selected, press the {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake|Std LinkMake]]}} button to create an empty [[File:Link.svg|24px]] Link.
# If no object is selected, press the {{Button|[[File:Std_LinkMake.svg|16px]] [[Std_LinkMake|Std LinkMake]]}} button to create an empty [[File:Link.svg|24px]] Link.
Line 40: Line 41:
==Properties== <!--T:8-->
==Properties== <!--T:8-->


<!--T:20-->
An [[App_Link|App Link]] ({{incode|App::Link}} class) is derived from the basic [[App_DocumentObject|App DocumentObject]] ({{incode|App::DocumentObject}} class), therefore it has the latter's basic properties like {{PropertyData|Label}} and {{PropertyData|Label2}}.
An [[App_Link|App Link]] ({{incode|App::Link}} class) is derived from the basic [[App_DocumentObject|App DocumentObject]] ({{incode|App::DocumentObject}} class), therefore it has the latter's basic properties like {{PropertyData|Label}} and {{PropertyData|Label2}}.


<!--T:21-->
The following are the specific properties available in the [[property editor|property editor]]. Hidden properties can be shown by using the {{MenuCommand|Show all}} command in the context menu of the [[property editor|property editor]].
The following are the specific properties available in the [[property editor|property editor]]. Hidden properties can be shown by using the {{MenuCommand|Show all}} command in the context menu of the [[property editor|property editor]].


=== Data === <!--T:9-->
=== Data === <!--T:9-->


<!--T:22-->
{{TitleProperty| Link}}
{{TitleProperty| Link}}


Line 59: Line 63:
* {{PropertyData|Scale List|VectorList}}: the scale factor for each Link element.
* {{PropertyData|Scale List|VectorList}}: the scale factor for each Link element.


==== Hidden Data properties ====
==== Hidden Data properties ==== <!--T:23-->


<!--T:24-->
* {{PropertyData|Colored Elements|LinkSubHidden|Hidden}}: list of Link elements that have had their color overriden.
* {{PropertyData|Colored Elements|LinkSubHidden|Hidden}}: list of Link elements that have had their color overriden.
* {{PropertyData|Scale Vector|Vector|Hidden}}: the scale factor for each component {{incode|(X, Y, Z)}} for all Link elements when {{PropertyData|Element Count}} is {{Value|1}} or larger. If {{PropertyData|Scale}} is other than {{Value|1.0}}, this same value will be used in the three components.
* {{PropertyData|Scale Vector|Vector|Hidden}}: the scale factor for each component {{incode|(X, Y, Z)}} for all Link elements when {{PropertyData|Element Count}} is {{Value|1}} or larger. If {{PropertyData|Scale}} is other than {{Value|1.0}}, this same value will be used in the three components.
Line 74: Line 79:
=== View === <!--T:12-->
=== View === <!--T:12-->


<!--T:25-->
{{TitleProperty| Link}}
{{TitleProperty| Link}}


Line 84: Line 90:
* {{PropertyView|Shape Material|Material}}: this property includes sub-properties that describe the {{PropertyView|Diffuse Color}}, {{PropertyView|Ambient Color}}, {{PropertyView|Specular Color}}, {{PropertyView|Emissive Color}}, {{PropertyView|Shininess}}, and {{PropertyView|Transparency}}.
* {{PropertyView|Shape Material|Material}}: this property includes sub-properties that describe the {{PropertyView|Diffuse Color}}, {{PropertyView|Ambient Color}}, {{PropertyView|Specular Color}}, {{PropertyView|Emissive Color}}, {{PropertyView|Shininess}}, and {{PropertyView|Transparency}}.


<!--T:26-->
{{TitleProperty|Base}}
{{TitleProperty|Base}}


<!--T:27-->
* {{PropertyView|Child View Provider|PersistentObject|Hidden}}:
* {{PropertyView|Child View Provider|PersistentObject|Hidden}}:
* {{PropertyView|Material List|MaterialList|Hidden}}:
* {{PropertyView|Material List|MaterialList|Hidden}}:
Line 91: Line 99:
* {{PropertyView|Override Material List|BoolList|Hidden}}:
* {{PropertyView|Override Material List|BoolList|Hidden}}:


<!--T:28-->
{{TitleProperty|Display Options}}
{{TitleProperty|Display Options}}


<!--T:29-->
* {{PropertyView|Display Mode|Enumeration}}: {{Value|Link}} or {{Value|ChildView}}.
* {{PropertyView|Display Mode|Enumeration}}: {{Value|Link}} or {{Value|ChildView}}.



Revision as of 19:06, 10 September 2020

Std LinkMake

Menu location
None
Workbenches
All
Default shortcut
None
Introduced in version
0.19
See also
Std Part, Std Group, PartDesign Body

Description

Std LinkMake creates an App Link (App::Link class), 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.

The App Link object was newly introduced in v0.19; in the past, simple duplication of objects could be achieved with Draft Clone, but this is a less efficient solution due to its implementation which essentially creates a copy of the internal Shape of the source object. On the other hand, a Link references directly the original Shape, so it is more memory efficient.

By itself the Link object can behave like an array, duplicating its base object many times; this can be done by setting its DataElement Count property to 1 or larger. This "Link array" object can also be created with the different array tools of the Draft Workbench, for example, Draft OrthoArray, Draft PolarArray, and Draft CircularArray. When used with the PartDesign Workbench, Links are intended to be used with full PartDesign Bodies; to create arrays of features, use PartDesign LinearPattern, PartDesign PolarPattern, and PartDesign MultiTransform.

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

Usage

With selection:

  1. Select an object in the tree view or 3D view for which you wish to create a Link.
  2. Press the Std LinkMake button. The produced object has the same icon as the original object, but has an arrow overlay indicating it is a Link.

Without selection:

  1. If no object is selected, press the Std LinkMake button to create an empty Link.
  2. Go to the property editor, then click on the DataLinked Object property to open the Link selection dialog to choose an object, then press OK.
  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.

Properties

An App Link (App::Link class) is derived from the basic App DocumentObject (App::DocumentObject class), therefore it has the latter's basic properties like DataLabel and DataLabel2.

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

Data

Link

  • DataLinked Object (XLink): it indicates the source object of the App Link; this can be an entire object, or a subelement of it (vertex, edge, or face).
  • DataLink Transform (Bool): it defaults to false, in which case the Link will override the DataLinked Object's own placement. If it is set to true, the Link will be placed in the same position as the DataLinkedObject.
  • DataPlacement (Placement): the placement of the Link.
This property will change to DataLink Placement if DataLink Transform is set to true; in this case, the DataLink Placement constitutes an offset applied on top of the DataPlacement of the DataLinked Object.
  • DataShow Element (Bool): it defaults to true, in which case the tree view will show the individual Link copies, as long as DataElement Count is 1 or larger.
  • DataElement Count (IntegerConstraint): it defaults to 0. If it is 1 or larger, the App Link will behave like an array, and will duplicate the same DataLinked Object many times. If DataShow Elements is true, each element in the array will be displayed in the tree view, and each can have its own DataPlacement modified. Each Link copy will have a name based on the Link's Name, augmented by _iN, where N is a number starting from 0. For example, with a single Link, the copies will be named Link_i0, Link_i1, Link_i2, etc.
  • DataLink Execute (String): name of the execute function that will run for this particular Link object. It defaults to 'appLinkExecute'. Set it to 'None' to disable it.
  • DataScale (Float): it defaults to 1.0. It is a factor for uniform scaling in each direction X, Y, and Z. For example, a cube of 2 mm x 2 mm x 2 mm, that is scaled by 2.0, will result in a shape with dimensions 4 mm x 4 mm x 4 mm.
  • DataScale List (VectorList): the scale factor for each Link element.

Hidden Data properties

  • Data (Hidden)Colored Elements (LinkSubHidden): list of Link elements that have had their color overriden.
  • Data (Hidden)Scale Vector (Vector): the scale factor for each component (X, Y, Z) for all Link elements when DataElement Count is 1 or larger. If DataScale is other than 1.0, this same value will be used in the three components.
  • Data (Hidden)Visibility List (BoolList): (read-only) the visibility state of each Link element, either true or false.
  • Data (Hidden)Placement List (PlacementList): (read-only) the placement for each Link element.
  • Data (Hidden)Element List (LinkList): the list of Link elements.
  • Data (Hidden)_LinkTouched (Bool):
  • Data (Hidden)_ChildCache (LinkList):

The App Link object will additionally show the properties of the original DataLinked Object, so the property editor may have groups of properties like Attachment, Base, Box, Draft, etc.

View

Link

  • ViewDraw Style (Enumeration): it defaults to None; it can be Solid, Dashed, Dotted, Dashdot.
  • ViewLine Width (FloatConstraint):
  • ViewOverride Material (Bool): it defaults to false; if set to true it will override the DataLinked Object's material.
  • ViewPoint Size (FloatConstraint):
  • ViewSelectable (Bool):
  • ViewShape Material (Material): this property includes sub-properties that describe the ViewDiffuse Color, ViewAmbient Color, ViewSpecular Color, ViewEmissive Color, ViewShininess, and ViewTransparency.

Base

  • View (Hidden)Child View Provider (PersistentObject):
  • View (Hidden)Material List (MaterialList):
  • View (Hidden)Override Color List (ColorList):
  • View (Hidden)Override Material List (BoolList):

Display Options

  • ViewDisplay Mode (Enumeration): Link or ChildView.

It will additionally show the view properties of the original DataLinked Object.

Information