Draft: Etichetă

From FreeCAD Documentation
Revision as of 20:05, 15 October 2020 by FuzzyBot (talk | contribs) (Updating to match new version of source page)

Draft Label

poziția meniului
Draft → Label
Ateliere
Draft, Arch
scurtătură
D L
Prezentat în versiune
-
A se vedea, de asemenea,
nici unul

Descriere

Acest instrument introduce o etichetă, care este o fragment de text cu o linie de 2 segmente și o săgeată, în documentul activ. Dacă se selectează un obiect sau un sub-element (față, muchie sau vârf) la pornirea comenzii, eticheta poate fi făcută să afișeze automat un anumit atribut al elementului selectat.

To insert a simpler text element without an arrow use Draft Text. To create solid text shapes use Draft ShapeString with Part Extrude.

How to use

  1. Opțional, selectați un obiect sau un subelement al unui obiect (Vertex, margine sau fațetă)
  2. Apăsați butonul 16px Etichetă de proiectare sau apăsați D apoi tastele L
  3. Faceți clic pe un prim punct al vizualizării 3D sau introduceți un Coordinate coordinate pentru a indica punctul țintă (poziția săgeții). Acest lucru poate fi oriunde, nu trebuie să fie exact pe elementul selectat
  4. Faceți clic pe un al doilea punct din vizualizarea 3D sau tastați un coordinate pentru a indica punctul intermediar care reprezintă începutul segmentului drept.
  5. Faceți clic pe un al treilea punct din vizualizarea 3D sau tastați un coordinate pentru a indica poziția textului.

Note: the direction of the horizontal straight segment, to the right or to the left, will automatically align the text to the opposite direction. If the leader goes vertically up, the text is aligned to the left; if it goes vertically down, it is aligned to the right.

Note 2: by pre-selecting an object, or a sub-element (vertex, edge or face), before pressing the tool button, the label will become parametric, that is, it will remember which object it is bound to, and it will be able to display a particular attribute of that object. If the attributes of the object change later on, the label will adjust the displayed information.

Opţiuni

  • Apăsând pe CTRL, snap punctul dvs. de locații disponibile snap.
  • Pentru a introduce manual coordonatele, pur și simplu introduceți numerele, apoi apăsați ENTER între fiecare componentă X, Y și Z.
  • Apăsând ESC se va anula operația.
  • Direcția segmentului drept (dreapta sau stânga) va justifica automat textul stânga sau dreapta.

Proprietăți

  • Date Tip de etichetă: tipul de informații afișate de această etichetă (vedeți mai jos)
  • Date Text personalizat: Textul care se afișează când tipul de etichetă este setat la personalizat
  • Date Placement: Indică rotația și poziția textului
  • Date Straight Distance: Lungimea segmentului drept
  • Date Direcție dreaptă: Direcția segmentului drept Orizontală sau verticală
  • Date Target Point: Punctul indicat de această etichetă
  • Vizualizare Text Size: Dimensiunea textului
  • Vizualizare Text Font: fontul folosit pentru text
  • Vizualizare Text Alignment: Alinierea verticală a textului: Sus, mijlocul sau partea de jos
  • Vizualizare Text Color: Culoarea textului
  • Vizualizare Lățime linie: Lățimea liniei
  • Vizualizare Line Color: culoarea liniei
  • Vizualizare Arrow Type: Tipul săgeții: Dot, cerc, săgeată sau bifați.
  • Vizualizare Dimensiunea săgeții: mărimea săgeții
  • Vizualizare Frame: Desenează un cadru în jurul textului

Tipuri de etichete

  • Custom: Afișează conținutul proprietății text personalizat
  • Name: Afișează numele obiectului țintă
  • Label: Afișează eticheta obiectului țintă
  • Poziția: Afișează coordonatele obiectului țintă (punctul de bază al amplasamentului) sau coordonatele vârfului țintă, dacă este cazul, sau coordonatele centrului subelementului țintă (centrul de masă)
  • Length: Afișează lungimea subelementului țintă, dacă este posibil
  • Area: Arată suprafața subelementului țintă, dacă este posibil
  • Volume: Afișează volumul obiectului țintă, dacă este posibil
  • Tag: Afișează valoarea etichetei obiectului țintă, dacă obiectul țintă are o astfel de proprietate (ceea ce este cazul tuturor obiectelor Arch)
  • Material: Afișează eticheta materialului obiectului țintă, dacă obiectul țintă are o astfel de proprietate

View

  • VizualizareText Font: specifies the font to use to draw the text. It can be a font name, such as "Arial", a default style such as "sans", "serif" or "mono", a family such as "Arial,Helvetica,sans" or a name with a style such as "Arial:Bold". If the given font is not found on the system, a generic one is used instead.
  • VizualizareText Size: specifies the size of the text. If the label object is created in the tree view but no text is visible in the 3D view, increase the size of the text until it is visible.
  • VizualizareText Alignment: specifies the vertical alignment of the baseline of the text with respect to the leader. It can be top, middle or bottom.
  • VizualizareText Color: specifies the color of the text in an RGB tuple (R, G, B).
  • VizualizareLine Width: specifies the width of the leader.
  • VizualizareLine Color: specifies the color of the leader.
  • VizualizareArrow Size: specifies the size of the symbol displayed at the tip of the leader.
  • VizualizareArrow Type: specifies the type of symbol displayed at the tip of the leader, which can be dot, circle, arrow, or tick.
  • VizualizareFrame: if it is "Rectangle" it will draw a frame around the text.
  • VizualizareLine: if it is true the leader line will be displayed; otherwise only the text and the symbol at the tip will be displayed.
  • VizualizareDisplay Mode: if it is "3D text" the text will be aligned to the scene axes, initially lying on the XY plane; if it is "2D text" the text will always face the camera.

Script-Programare

Instrumentul Text poate fi utilizat în macros și din consola python utilizând următoarea funcție:

The Label tool can be used in macros and from the Python console by using the following function:

Label = makeLabel(targetpoint=None, target=None, direction=None, distance=None, labeltype=None, placement=None)
  • Returnează obiectul nou creat.

Change the custom text by overwriting the CustomText attribute. A list of strings can be used; each element will be displayed in its own line.

The view properties of Label can be changed by overwriting its attributes; for example, overwrite ViewObject.TextSize with the new size in millimeters.

Exempluː

import FreeCAD, Draft

Rectangle = Draft.makeRectangle(4000, 1000)

p1 = FreeCAD.Vector(-200, 1000, 0)
place1 = FreeCAD.Placement(FreeCAD.Vector(-1000, 1300, 0), FreeCAD.Rotation())

Label1 = Draft.makeLabel(p1, Rectangle, "Horizontal", 500, "Label", place1)
Label1.ViewObject.TextSize = 200

p2 = FreeCAD.Vector(-200, 0, 0)
place2 = FreeCAD.Placement(FreeCAD.Vector(-1000, -300, 0), FreeCAD.Rotation())

Label2 = Draft.makeLabel(p2, Rectangle, "Horizontal", 500, "Custom", place2)
Label2.CustomText = ["Beware of the", "sharp edges"]
Label2.ViewObject.TextSize = 200
FreeCAD.ActiveDocument.recompute()

p3 = FreeCAD.Vector(1000, 1200, 0)
place3 = FreeCAD.Placement(FreeCAD.Vector(2000, 1800, 0), FreeCAD.Rotation())

Label3 = Draft.makeLabel(p3, Rectangle, "Horizontal", -500, "Area", place3)
Label3.ViewObject.TextSize = 200
FreeCAD.ActiveDocument.recompute()