FreeCAD Logo FreeCAD 1.0
  • Английский Африкаанс Арабский Белорусский Каталанский Чешский Немецкий Греческий Испанский Испанский Баскский Финский Филиппинский Французский Галисийский Хорватский Венгерский Индонезийский Итальянский Японский Кабильский Корейский Литовский Нидерландский Норвежская букмол Польский Португальский Португальский Румынский Русский Словацкий Словенский Сербский Шведский Турецкий Украинский Валенсианский Вьетнамский Китайский Китайский
  • Возможности
  • Скачать
  • Блог
  • Документация
    Индекс документации Приступая к работе Пользовательская документация Руководство по FreeCAD Документация верстаков Документация по кодированию на Python Документация по коду C++ Уроки Часто задаваемые вопросы Политика конфиденциальности О программе FreeCAD
  • Внести вклад
    Как помочь Sponsor Сообщить об ошибке Сделать запрос Задачи и финансирование Руководство по участию в разработке Руководство для разработчиков Переводы
  • Сообщество
    Кодекс поведения Форум The FPA GitHub GitLab Codeberg Mastodon Matrix IRC IRC via Webchat Gitter Discord Reddit Twitter Facebook LinkedIn Календарь
  • ♥ Donate

Donate

$
Информация о SEPA
Пожалуйста, настройте банковский перевод SEPA:
Beneficiary: The FreeCAD project association
IBAN: BE04 0019 2896 4531
BIC/SWIFT: GEBABEBBXXX
Банковское агентство: BNP Paribas Fortis
Адрес: Rue de la Station 64, 1360 Perwez, Belgium

While Stripe doesn't support monthly donations, you can still become a sponsor! Simply make a one-time donation equivalent to 12 months of support, and you'll gain access to the corresponding sponsoring tier. It's an easy and flexible way to contribute.

If you are not sure or not able to commit to a regular donation, but still want to help the project, you can do a one-time donation, of any amount.

Choose freely the amount you wish to donate one time only.

You can support FreeCAD by sponsoring it as an individual or organization through various platforms. Sponsorship provides a steady income for developers, allowing the FPA to plan ahead and enabling greater investment in FreeCAD. To encourage sponsorship, we offer different tiers, and unless you choose to remain anonymous, your name or company logo will be featured on our website accordingly.

from 1 USD / 1 EUR per month. You will not have your name displayed here, but you will have helped the project a lot anyway. Together, normal sponsors maintain the project on its feet as much as the bigger sponsors.

from 25 USD / 25 EUR per month. Your name or company name is displayed on this page.

from 100 USD / 100 EUR per month. Your name or company name is displayed on this page, with a link to your website, and a one-line description text.

from 200 USD / 200 EUR per month. Your name or company name and logo displayed on this page, with a link to your website and a custom description text. Companies that have helped FreeCAD early on also appear under Gold sponsors.

Instead of donating each month, you might find it more comfortable to make a one-time donation that, when divided by twelve, would give you right to enter a sponsoring tier. Don't hesitate to do so!

Choose freely the amount you wish to donate each month.

Please inform your forum name or twitter handle as a notein your transfer, or reach to us, so we can give you proper credits!

Dimension
AnnotationStyleEditor
Draft

Draft Label

Menu location
Draft → Label
Workbenches
Draft, Arch
Default shortcut
D L
Introduced in version
-
See also
None

Описание

Этот инструмент вставляет ярлык, который представляет собой фрагмент текста с 2-сегментной линией и стрелкой в активном документе. Если при запуске команды выбран объект или подэлемент (лицо, ребро или вершина), можно создать ярлык для автоматического отображения определенного атрибута выбранного элемента.

If an object or a sub-element (face, edge or vertex) is selected when starting the command, the text can be made to display one or two attributes of the selected element, including position, length, area, volume and material. The text will then be linked to the attributes and will update if their values change.

To insert a text element without an arrow use the Draft Text command instead.

Использование

See also: Draft Tray, Draft Snap and Draft Constrain.

  1. Optionally select an object or a sub-element (vertex, edge or face) that you want to display attributes of.
  2. There are several ways to invoke the command:
    • Press the Label button.
    • Select the Annotation → Label option from the menu.
    • Use the keyboard shortcut: D then L.
  3. The Label task panel opens. See Options for more information.
  4. If you have selected an element: select an option from the Label Type dropdown list. See Label types below.
  5. Pick the first point in the 3D View, or type coordinates and press the Enter Point button. This point indicates the target (arrow head). This can be anywhere, it does not have to be on an element.
  6. Pick the second point in the 3D View, or type coordinates and press the Enter Point button. This point indicates the start of the horizontal or vertical segment of the leader.
  7. Pick the third point in the 3D View, or type coordinates and press the Enter Point button. This point indicates the base point of the text.

Options

The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts.

  • To manually enter coordinates enter the X, Y and Z component, and press Enter after each. Or you can press the Enter Point button when you have the desired values. It is advisable to move the pointer out of the 3D View before entering coordinates.
  • Press R or click the Relative checkbox to toggle relative mode. If relative mode is on, coordinates are relative to the last point, if available, else they are relative to the coordinate system origin.
  • Press G or click the Global checkbox to toggle global mode. If global mode is on, coordinates are relative to the global coordinate system, else they are relative to the working plane coordinate system.
  • Press S to switch Draft snapping on or off.
  • Press Esc or the Close button to abort the command.

Label types

The following label types are available:

  • Custom: displays the contents of ДанныеCustom Text.
  • Name: displays the internal name of the target object. The internal name is assigned when an object is created and remains fixed throughout the existence of the object.
  • Label: displays the label of the target object. The label of an object can be changed by the user.
  • Position: displays the coordinates of the base point of the target object or of the target vertex.
  • Length: displays the length of the target object or subelement.
  • Area: displays the area of the target object or subelement.
  • Volume: displays the volume of the target object.
  • Tag: displays the Tag attribute of the target object. Objects created with the BIM Workbench can have this attribute.
  • Material: displays the label of the material of the target object.
  • Label + Position
  • Label + Length
  • Label + Area
  • Label + Volume
  • Label + Material

Notes

  • introduced in 1.1: A Draft Label can be edited with the Draft Edit command.
  • The direction of the second segment of the leader determines the alignment of the text. If the segment is horizontal and pointing to the right the text is aligned to the left and vice versa. If the second segment goes vertically up, the text is aligned to the left. If it goes vertically down, the text is aligned to the right.
  • Draft Labels created or saved with FreeCAD version 0.21 are not backward compatible.

Properties

See also: Property View.

A Draft Label object is derived from an App FeaturePython object and inherits all its properties. The following properties are additional unless otherwise stated:

Data

Label

  • ДанныеCustom Text (StringList): specifies the contents of the text if ДанныеLabel Type is Custom. Each item in the list represents a new text line.
  • ДанныеLabel Type (Enumeration): specifies the type of information displayed by the label. See Label types.
  • ДанныеPlacement (Placement): specifies the position of the text in the 3D View and, unless ДанныеStraight Direction is Custom, also of the first leader segment, which is the segment where the text is attached. See Placement.
  • ДанныеText (StringList): (read-only) specifies the contents of the text that is actually displayed. Each item in the list represents a new text line.

Leader

  • ДанныеPoints (VectorList): specifies the points of the leader.
  • ДанныеStraight Direction (Enumeration): specifies the direction of the first leader segment: Custom, Horizontal or Vertical.
  • ДанныеStraight Distance (Distance): specifies the length of the first leader segment. Only used if ДанныеStraight Direction is Horizontal or Vertical. If the distance is positive, the leader starts from the right side of the text and the text aligns to the right. Otherwise the leader starts from the left side of the text and the text aligns to the left.

Target

  • ДанныеTarget (LinkSub): specifies the object and optional subelement the label is linked to.
  • ДанныеTarget Point (Vector): specifies the position of the tip of the leader, which is where the arrow is attached.

View

Annotation

  • ВидAnnotation Style (Enumeration): specifies the annotation style applied to the label. See Draft AnnotationStyleEditor.
  • ВидScale Multiplier (Float): specifies the general scaling factor applied to the label.

Display Options

  • ВидDisplay Mode (Enumeration): specifies how the text is displayed. If it is World the text will be displayed on a plane defined by the ДанныеPlacement of the label. If it is Screen the text will always face the screen. This is an inherited property. The mentioned options are the renamed options (introduced in 0.21).

Graphics

  • ВидArrow Size Start (Length): specifies the size of the symbol displayed at the start of the leader. introduced in 1.1
  • ВидArrow Type Start (Enumeration): specifies the type of symbol displayed at the start of the leader, which can be Dot, Circle, Arrow, Tick, Tick-2 or None. introduced in 1.1
  • ВидFrame (Enumeration): specifies what type of frame is drawn around the text. The current options are None or Rectangle.
  • ВидLine (Bool): specifies whether to display the leader line. If it is false only the arrow and the text are displayed.
  • ВидLine Color (Color): specifies the color of the leader and the arrow. This is also used for the frame.
  • ВидLine Width (Float): specifies the width of the leader. This is also used for the frame.

Text

  • ВидFont Name (Font): specifies the font used 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 default font is used instead. introduced in 0.21
  • ВидFont Size (Length): specifies the size of the letters. The text can be invisible in the 3D View if this value is very small. introduced in 0.21
  • ВидJustification (Enumeration): specifies the horizontal alignment of the text: Left, Center or Right. Only used if ДанныеStraight Direction is Custom. Otherwise the horizontal alignment is based on the sign (positive or negative) of ДанныеStraight Distance.
  • ВидLine Spacing (Float): specifies the factor applied to the default line height of the text.
  • ВидMax Chars (Integer): specifies the maximum number of characters on each line of the text.
  • ВидText Alignment (Enumeration): specifies the vertical alignment of the text: Top, Middle or Bottom.
  • ВидText Color (Color): specifies the color of the text.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

To create a Draft Label use the make_label method (introduced in 0.19) of the Draft module. This method replaces the deprecated makeLabel method.

label = make_label(target_point=App.Vector(0, 0, 0),
                   placement=App.Vector(30, 30, 0),
                   target_object=None, subelements=None,
                   label_type="Custom", custom_text="Label",
                   direction="Horizontal", distance=-10,
                   points=None)

Пример:

import FreeCAD as App
import Draft

doc = App.newDocument()

rectangle = Draft.make_rectangle(4000, 1000)
doc.recompute()

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

label1 = Draft.make_label(p1, place1, target_object=rectangle, distance=500, label_type="Label")
label1.ViewObject.FontSize= 200

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

label2 = Draft.make_label(p2, place2, target_object=rectangle, distance=500, label_type="Custom",
                          custom_text="Beware of the sharp edges")
label2.ViewObject.FontSize= 200

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

label3 = Draft.make_label(p3, place3, target_object=rectangle, distance=-500, label_type="Area")
label3.ViewObject.FontSize= 200

doc.recompute()


Dimension
AnnotationStyleEditor
Draft

Эта страница получена от https://wiki.freecad.org/Draft_Label

Свяжитесь с нами!
Forum GitHub Mastodon Matrix IRC Gitter.im Discord Reddit Twitter Facebook LinkedIn

©Команда FreeCAD. Авторы изображений (сверху вниз): ppemawm, r-frank, epileftric, regis, regis, rider_mortagnais, bejant.

Этот проект поддерживается: , KiCad Services Corp. и другие спонсоры

GitHubУлучшить эту страницу на GitHub