Std: Utwórz łącze względne

From FreeCAD Documentation
Revision as of 15:29, 21 May 2023 by Kaktus (talk | contribs) (Created page with "{{Docnav |Utwórz łącze |Zastąp przez łącze |Narzędzia standardowe |IconL=Std_LinkMake.svg |IconR=Std_LinkReplace.svg |IconC=Freecad.svg }}")

Std: Utwórz łącze względne

Lokalizacja w menu
brak
Środowisko pracy
wszystkie
Domyślny skrót
brak
Wprowadzono w wersji
0.19
Zobacz także
Część, Grupa, Utwórz łącze

Opis

Std LinkMakeRelative creates an App Link (App::Link class), just like Std LinkMake, but it operates on selected subelements first, and sets the DANELink Transform to true.

Usage

With selection:

  1. 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.
  2. 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

This command creates a new App Link; its properties are described in Std LinkMake.

In particular, DANELink Transform is set to true, so DANEPlacement becomes hidden, and instead DANELink Placement controls the position of the Link with respect to the position of DANELinked Object.

Tworzenie skryptów

Informacje ogólne znajdują się na stronie Utwórz łącze.

Obiekt App Łącze jest tworzony za pomocą metody addObject() dokumentu. Aby zdefiniować łącze względne, jego metoda setLink jest używana do wybrania obiektu źródłowego i jednego lub więcej jego elementów podrzędnych. Następnie atrybut LinkTransform jest ustawiany na wartość 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()