|
|
| Menu location |
|---|
| None |
| Workbenches |
| All |
| Default shortcut |
| None |
| Introduced in version |
| 0.19 |
| See also |
| Std Part, Std Group, Std LinkMake |
Description
Std LinkMakeRelative creates an App Link, just like
Std LinkMake, but it operates on selected subelements first, and sets the DataLink Transform property to
true.
Usage
With selection:
- Select a subelement in the 3D View, this means a vertex, edge, or face, or any combination of these. These subelements must belong to a single object.
- Press the
Make Sub-Link button. The produced object has the same icon as the original object, but has two arrow overlays indicating it is a relative Link.
Without selection:
- If no object is selected, this command does nothing.
- If an object is selected in the Tree View only, but no subelement is selected in the 3D View, the command does nothing either.
Original body, and three Links created from the subelements of it, including edges and faces.
Properties
See Std LinkMake.
In particular, DataLink Transform is set to true, so DataPlacement becomes hidden, and instead DataLink Placement controls the position of the Link with respect to the position of DataLinked 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()
This page is retrieved from https://wiki.freecad.org/Std_LinkMakeRelative