Draft Text/ru: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(48 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{docnav|[[Draft_Rectangle|Rectangle]]|[[Draft_Dimension|Dimension]]|[[Draft_Module|Draft_Module]]}} |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
{{Docnav/ru |
|||
|[[Draft_ShapeString/ru|Фигура из текста]] |
|||
|[[Draft_Dimension/ru|Размер]] |
|||
|[[Draft_Workbench/ru|Верстак "Draft"]] |
|||
|IconL=Draft_ShapeString.svg |
|||
|IconR=Draft_Dimension.svg |
|||
|IconC=Workbench_Draft.svg |
|||
}} |
|||
</div> |
|||
{{GuiCommand/ru |
{{GuiCommand/ru |
||
|Name=Draft Text |
|||
|Name/ru=Текст |
|Name/ru=Текст |
||
|Name=Draft_Text |
|||
|Workbenches=[[Draft Module/ru|Черчение]], [[Arch Module/ru|Архитектура]] |
|||
|MenuLocation= |
|MenuLocation=Annotation → Текст |
||
|Workbenches=[[Draft_Workbench/ru|Draft]], [[Arch_Workbench/ru|Arch]] |
|||
|Shortcut=T E |
|||
|Shortcut={{KEY|T}} {{KEY|E}} |
|||
|Version=0.7 |
|||
|SeeAlso=[[Draft_Label/ru|Метка]], [[Draft_ShapeString/ru|Фигура из текста]] |
|||
}} |
}} |
||
<span id="Description"></span> |
|||
==Описание== |
|||
<div class="mw-translate-fuzzy"> |
|||
Инструмент {{Button|[[Image:Draft_Text.svg|16px]] [[Draft_Text|Текст]]}} позволяет добавить в документ многострочную текстовую область в указанную точку. Он использует предварительно выбранный [[Draft_Linestyle/ru|Draft Linestyle]], установленный в [[Draft_Tray/ru|Draft Tray]]. |
|||
</div> |
</div> |
||
To create a text element with an arrow use the [[Draft_Label|Draft Label]] command instead. |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
[[Image:Draft_Text_example.png|400px]] |
|||
==Описание== |
|||
{{Caption|Для размещения текстового поля требуется одна точка}} |
|||
Инструмент Текст позволяет добавить в документ текстовую область в указанную точку. Инструмент использует предварительно выбранный [[Draft Linestyle/ru|размер и цвет текста]] во вкладке Задачи. |
|||
</div> |
</div> |
||
<span id="Usage"></span> |
|||
To create a text label with a leader and an arrow use [[Draft Label]]. To create solid text or 3D letters use [[Draft ShapeString]] with [[Part Extrude]]. |
|||
==Применение== |
|||
See also: [[Draft_Tray|Draft Tray]] and [[Draft_Snap|Draft Snap]]. |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
# Нажмите кнопку {{Button|[[Image:Draft_Text.svg|16px]] [[Draft Text/ru|Текст]]}}, или нажмите клавишу {{KEY|T}}, а затем{{KEY|E}} |
|||
[[Image:Draft_Text_example.jpg|400px]] |
|||
# Укажите точку на трёхмерном виде или задайте координаты и нажмите кнопку {{Button|[[Image:Draft_AddPoint.svg|16px]] add point}}. |
|||
# Введите желаемый текст нажимая {{KEY|Enter}} между каждыми строками |
|||
# Дважды нажмите {{KEY|Enter}} для завершения. |
|||
</div> |
</div> |
||
<span id="Options"></span> |
|||
==Опции== |
|||
The single character keyboard shortcuts available in the task panel can be changed. See [[Draft_Preferences|Draft Preferences]]. The shortcuts mentioned here are the default shortcuts (for version 0.22). |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
* Для указания координат вручную, введите число и нажимайте {{KEY|ENTER}} для перехода между координатами X, Y и Z. Вы можете нажать кнопку {{Button|[[Image:Draft_AddPoint.svg|16px]] добавить точку}}, когда у вас есть нужные значения для вставки точки. |
|||
==Использование== |
|||
* Удерживайте {{KEY|Ctrl}} при размещении текста, чтобы принудительно установить [[Draft_Snap/ru|привязку]] вашей точки в ближайшее место привязки, независимо от расстояния. |
|||
# Нажмите кнопку {{KEY|[[Image:Draft Text.png|16px]] [[Draft Text/ru|Текст]]}}, или нажмите клавишу {{KEY|T}}, а затем{{KEY|E}} |
|||
* Нажмите {{KEY|Enter}} или {{KEY|↓ Стрелка вниз}}, чтобы ввести новую строку текста. |
|||
# Укажите точку на трёхмерном виде или задайте [[Draft_Coordinates/ru|координаты]] |
|||
* Нажмите {{KEY|↑ Стрелка вверх}}, чтобы отредактировать предыдущую строку текста. |
|||
# Введите желаемый текст нажимая {{KEY|ENTER}} между каждыми строками |
|||
* Дважды нажмите {{KEY|Enter}} или {{KEY|↓ Стрелка вниз}}, чтобы завершить редактирование текста. |
|||
* Нажмите {{KEY|Esc}} или кнопку {{Button|Close}}, чтобы прервать выполнение текущей команды. |
|||
</div> |
</div> |
||
<span id="Notes"></span> |
|||
==Параметры== |
|||
==Примечания== |
|||
* A Draft Text can be edited by double-clicking it in the [[Tree_view|Tree view]]. {{Version|0.20}} |
|||
* Draft Texts created or saved with [[Release_notes_0.21|FreeCAD version 0.21]] are not backward compatible. |
|||
<span id="Properties"></span> |
|||
==Свойства== |
|||
See also: [[Property_editor|Property editor]]. |
|||
A Draft Text object is derived from an [[App_FeaturePython|App FeaturePython]] object and inherits all its properties. The following properties are additional unless otherwise stated. |
|||
<span id="Data"></span> |
|||
=== Данные === |
|||
{{TitleProperty|Основные}} |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
* {{PropertyData|Положение}}: указывает базовую точку первой линии текстового блока. |
|||
* {{KEY|CTRL}} будет [[Draft_Snap/ru|привязывать]] точку по возможным привязкам. |
|||
* {{PropertyData|Текст}}: указывает содержимое текстового блока как список строк, каждый элемент списка, разделённый запятыми, показывает новую строку |
|||
* Для указания координат вручную, введите число и нажимайте {{KEY|ENTER}} для перехода между координатами X, Y и Z. |
|||
* {{KEY|ESC}} приведёт к отмене операции. |
|||
* При редактировании текста, нажатие {{KEY|ENTER}} или {{KEY|DOWN ARROW}} позволяет ввести или изменить следующую строку текста. |
|||
* {{KEY|UP ARROW}} позволяет редактировать предыдущую строку текста. |
|||
* '''Двойное''' нажатие {{KEY|ENTER}} (т.е. оставить последнюю строку пустой) добавляет текст в документ и закрывает редактор текста. |
|||
</div> |
</div> |
||
<span id="View"></span> |
|||
=== Вид === |
|||
{{TitleProperty|Annotation}} |
|||
* {{PropertyView|Annotation Style|Enumeration}}: specifies the annotation style applied to the text. See [[Draft_AnnotationStyleEditor|Draft AnnotationStyleEditor]]. |
|||
* {{PropertyView|Scale Multiplier|Float}}: specifies the general scaling factor applied to the text. |
|||
{{TitleProperty|Display Options}} |
|||
* {{PropertyView|Display Mode|Enumeration}}: specifies how the text is displayed. If it is {{value|World}} the text will be displayed on a plane defined by its {{PropertyData|Placement}}. If it is {{value|Screen}} the text will always face the screen. This is an inherited property. The mentioned options are the renamed options ({{Version|0.21}}). |
|||
{{TitleProperty|Graphics}} |
|||
* {{PropertyView|Line Color|Color}}: not used. |
|||
* {{PropertyView|Line Width|Float}}: not used. |
|||
{{TitleProperty|Text}} |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
* {{PropertyView|Режим отображения}}: если это «3D текст», текст будет выровнен по осям сцены, изначально лежащим в плоскости XY; если это «2D-текст», текст всегда будет смотреть в камеру. |
|||
==Свойства== |
|||
* {{PropertyView|Шрифт}}: указывает шрифт для отображения текста. Может быть название шрифта, например "Arial", название стиля, например, "sans", "serif" или "mono", название семейства, например, "Arial,Helvetica,sans", или название со стилем, например "Arial:Bold". Если указанный шрифт не найден в системе, то будет использован основной. |
|||
* {{PropertyData|Положение}}: базовая точка текстового блока. |
|||
* {{PropertyView|Размер шрифта}}: указывает размер символов текста. Если текстовый объект создается в древе проекта, но текст не отображается, увеличивайте размер текста, пока он не станет видим. |
|||
* {{PropertyData|Текст}}: содержимое текстового блока. |
|||
* {{PropertyView| |
* {{PropertyView|Выравнивание}}: указывает выравнивание текста налево, направо или по центру от базовой точки. |
||
* {{PropertyView| |
* {{PropertyView|Межстрочное расстояние}}: указывает расстояние между строк текста. |
||
* {{PropertyView|Выравнивание}}: выравнивание текста налево, направо или по центру от базовой точки. |
|||
* {{PropertyView|Межстрочное расстояние}}: расстояние между строк текста. |
|||
* {{PropertyView|Поворот}}: поворот текста. |
|||
* {{PropertyView|Ось поворота}}: используемая для поворота ось. |
|||
* {{PropertyView|Шрифт}}: шрифт для отображения текста, может быть название шрифта, например "Arial", название стиля, например, "sans", "serif" или "mono", название семейства, например, "Arial,Helvetica,sans", или название со стилем, например "Arial:Bold". Если указанный шрифт не найден в системе, то будет использован основной. |
|||
</div> |
</div> |
||
<span id="Scripting"></span> |
|||
=== Data === |
|||
==Программирование== |
|||
* {{PropertyData|Text}}: specifies the contents of the text block as a list of strings; each element on the list, separated by a comma, indicates a new line. |
|||
* {{PropertyData|Position}}: specifies the base point of the first line of the text block. |
|||
* {{PropertyData|Angle}}: specifies the rotation of the baseline of the first line of the text block. |
|||
* {{PropertyData|Axis}}: specifies the axis to use for the rotation. |
|||
{{Emphasis|См. так же:}} [[Draft API/ru|Draft API]] и [[FreeCAD Scripting Basics|Основы составления скриптов FreeCAD]]. |
|||
=== View === |
|||
* {{PropertyView|Display 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. |
|||
* {{PropertyView|Font Name}}: 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. |
|||
* {{PropertyView|Font Size}}: specifies the size of the letters. If the text object is created in the tree view but no text is visible, increase the size of the text until it is visible. |
|||
* {{PropertyView|Justification}}: specifies if the text aligns to the left, right or at the center of the base point. |
|||
* {{PropertyView|Line Spacing}}: specifies the space between lines of text. |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
Инструмент Текст может быть использован в [[macros/ru|макросах]] и из консоли [[Python/ru|Python]] следующими функциями: |
|||
==Сценарии== |
|||
Инструмент Текст может быть использован в [[macros/ru|макросах]] и из консоли Python следующими функциями: |
|||
</div> |
</div> |
||
The Text tool can be used in [[macros]] and from the [[Python]] console by using the following function: |
|||
{{Code|code= |
{{Code|code= |
||
text = make_text(string, placement=None, screen=False) |
|||
}} |
}} |
||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
* Создать объект {{incode|Text}} в {{incode|point}}, определённой как {{incode|FreeCAD.Vector}}. |
|||
* Создать текстовый объект в указанной точке, если задан вектор, содержащий строку или строки заданные в виде списка. |
|||
* {{incode|stringlist}} это строка, или список строк, если это список, каждый элемент показывается в отдельной строке. |
|||
* Используется текущий цвет, высота и шрифт текста из настроек. |
|||
* Если |
* Если {{incode|screen}} равен {{incode|True}}, текст всегда ориентируется в направлении просмотра камеры, иначе выравнивается по осям сцены и лежит в плоскости XY. |
||
* Возвращает новый созданный объект. |
|||
</div> |
</div> |
||
The |
The view properties of {{incode|text}} can be changed by overwriting its attributes; for example, overwrite {{incode|ViewObject.FontSize}} with the new size in millimeters. |
||
The view properties of {{incode|Text}} can be changed by overwriting its attributes; for example, overwrite {{incode|ViewObject.FontSize}} with the new size in millimeters. |
|||
Пример: |
Пример: |
||
{{Code|code= |
{{Code|code= |
||
import FreeCAD |
import FreeCAD as App |
||
import Draft |
|||
doc = App.newDocument() |
|||
p1 = FreeCAD.Vector(0, 0, 0) |
|||
t1 = "This is a sample text" |
t1 = "This is a sample text" |
||
p1 = App.Vector(0, 0, 0) |
|||
p2 = FreeCAD.Vector(1000, 1000, 0) |
|||
t2 = ["First line", "second line"] |
t2 = ["First line", "second line"] |
||
p2 = App.Vector(1000, 1000, 0) |
|||
text1 = Draft.make_text(t1, p1) |
|||
text2 = Draft.make_text(t2, p2) |
|||
text1.ViewObject.FontSize = 200 |
|||
text2.ViewObject.FontSize = 200 |
|||
zaxis = App.Vector(0, 0, 1) |
|||
p3 = FreeCAD.Vector(-1000, -500, 0) |
|||
t3 = ["Upside", "down"] |
t3 = ["Upside", "down"] |
||
p3 = App.Vector(-1000, -500, 0) |
|||
place3 = App.Placement(p3, App.Rotation(zaxis, 180)) |
|||
text3 = Draft.make_text(t3, place3) |
|||
text3.ViewObject.FontSize = 200 |
|||
doc.recompute() |
|||
Text3 = Draft.makeText(t3, point=p3) |
|||
}} |
|||
Text3.ViewObject.FontSize = 200 |
|||
ZAxis = FreeCAD.Vector(0, 0, 1) |
|||
place3 = FreeCAD.Placement(p3, FreeCAD.Rotation(ZAxis, 175)) |
|||
Text3.Placement = place3 |
|||
<div class="mw-translate-fuzzy"> |
|||
Text4 = Draft.makeText(t3, point=p3) |
|||
{{Docnav/ru |
|||
Text4.ViewObject.FontSize = 200 |
|||
|[[Draft_ShapeString/ru|Фигура из текста]] |
|||
Text4.Placement.Rotation = FreeCAD.Rotation(ZAxis, -30) |
|||
|[[Draft_Dimension/ru|Размер]] |
|||
|[[Draft_Workbench/ru|Верстак "Draft"]] |
|||
|IconL=Draft_ShapeString.svg |
|||
|IconR=Draft_Dimension.svg |
|||
|IconC=Workbench_Draft.svg |
|||
}} |
}} |
||
</div> |
|||
{{Draft Tools navi{{#translation:}}}} |
|||
{{docnav|[[Draft_Rectangle|Rectangle]]|[[Draft_Dimension|Dimension]]|[[Draft_Module|Draft_Module]]}} |
|||
{{Userdocnavi{{#translation:}}}} |
|||
{{Draft Tools navi}} |
|||
{{Userdocnavi}} |
|||
{{clear}} |
Latest revision as of 05:03, 9 January 2024
Текст |
Системное название |
---|
Draft_Text |
Расположение в меню |
Annotation → Текст |
Верстаки |
Draft, Arch |
Быстрые клавиши |
T E |
Представлено в версии |
0.7 |
См. также |
Метка, Фигура из текста |
Описание
Инструмент Текст позволяет добавить в документ многострочную текстовую область в указанную точку. Он использует предварительно выбранный Draft Linestyle, установленный в Draft Tray.
To create a text element with an arrow use the Draft Label command instead.
Применение
See also: Draft Tray and Draft Snap.
- Нажмите кнопку Текст, или нажмите клавишу T, а затемE
- Укажите точку на трёхмерном виде или задайте координаты и нажмите кнопку add point.
- Введите желаемый текст нажимая Enter между каждыми строками
- Дважды нажмите Enter для завершения.
Опции
The single character keyboard shortcuts available in the task panel can be changed. See Draft Preferences. The shortcuts mentioned here are the default shortcuts (for version 0.22).
- Для указания координат вручную, введите число и нажимайте ENTER для перехода между координатами X, Y и Z. Вы можете нажать кнопку добавить точку, когда у вас есть нужные значения для вставки точки.
- Удерживайте Ctrl при размещении текста, чтобы принудительно установить привязку вашей точки в ближайшее место привязки, независимо от расстояния.
- Нажмите Enter или ↓ Стрелка вниз, чтобы ввести новую строку текста.
- Нажмите ↑ Стрелка вверх, чтобы отредактировать предыдущую строку текста.
- Дважды нажмите Enter или ↓ Стрелка вниз, чтобы завершить редактирование текста.
- Нажмите Esc или кнопку Close, чтобы прервать выполнение текущей команды.
Примечания
- A Draft Text can be edited by double-clicking it in the Tree view. introduced in version 0.20
- Draft Texts created or saved with FreeCAD version 0.21 are not backward compatible.
Свойства
See also: Property editor.
A Draft Text object is derived from an App FeaturePython object and inherits all its properties. The following properties are additional unless otherwise stated.
Данные
Основные
- ДанныеПоложение: указывает базовую точку первой линии текстового блока.
- ДанныеТекст: указывает содержимое текстового блока как список строк, каждый элемент списка, разделённый запятыми, показывает новую строку
Вид
Annotation
- ВидAnnotation Style (
Enumeration
): specifies the annotation style applied to the text. See Draft AnnotationStyleEditor. - ВидScale Multiplier (
Float
): specifies the general scaling factor applied to the text.
Display Options
- ВидDisplay Mode (
Enumeration
): specifies how the text is displayed. If it isWorld
the text will be displayed on a plane defined by its ДанныеPlacement. If it isScreen
the text will always face the screen. This is an inherited property. The mentioned options are the renamed options (introduced in version 0.21).
Graphics
- ВидLine Color (
Color
): not used. - ВидLine Width (
Float
): not used.
Text
- ВидРежим отображения: если это «3D текст», текст будет выровнен по осям сцены, изначально лежащим в плоскости XY; если это «2D-текст», текст всегда будет смотреть в камеру.
- ВидШрифт: указывает шрифт для отображения текста. Может быть название шрифта, например "Arial", название стиля, например, "sans", "serif" или "mono", название семейства, например, "Arial,Helvetica,sans", или название со стилем, например "Arial:Bold". Если указанный шрифт не найден в системе, то будет использован основной.
- ВидРазмер шрифта: указывает размер символов текста. Если текстовый объект создается в древе проекта, но текст не отображается, увеличивайте размер текста, пока он не станет видим.
- ВидВыравнивание: указывает выравнивание текста налево, направо или по центру от базовой точки.
- ВидМежстрочное расстояние: указывает расстояние между строк текста.
Программирование
См. так же: Draft API и Основы составления скриптов FreeCAD.
text = make_text(string, placement=None, screen=False)
- Создать объект
Text
вpoint
, определённой какFreeCAD.Vector
. stringlist
это строка, или список строк, если это список, каждый элемент показывается в отдельной строке.- Если
screen
равенTrue
, текст всегда ориентируется в направлении просмотра камеры, иначе выравнивается по осям сцены и лежит в плоскости XY.
The view properties of text
can be changed by overwriting its attributes; for example, overwrite ViewObject.FontSize
with the new size in millimeters.
Пример:
import FreeCAD as App
import Draft
doc = App.newDocument()
t1 = "This is a sample text"
p1 = App.Vector(0, 0, 0)
t2 = ["First line", "second line"]
p2 = App.Vector(1000, 1000, 0)
text1 = Draft.make_text(t1, p1)
text2 = Draft.make_text(t2, p2)
text1.ViewObject.FontSize = 200
text2.ViewObject.FontSize = 200
zaxis = App.Vector(0, 0, 1)
t3 = ["Upside", "down"]
p3 = App.Vector(-1000, -500, 0)
place3 = App.Placement(p3, App.Rotation(zaxis, 180))
text3 = Draft.make_text(t3, place3)
text3.ViewObject.FontSize = 200
doc.recompute()
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- Начинающим
- Установка: Загрузка, Windows, Linux, Mac, Дополнительных компонентов, Docker, AppImage, Ubuntu Snap
- Базовая: О FreeCAD, Интерфейс, Навигация мыши, Методы выделения, Имя объекта, Настройки, Верстаки, Структура документа, Свойства, Помоги FreeCAD, Пожертвования
- Помощь: Учебники, Видео учебники
- Верстаки: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework