Draft Text/ru: Difference between revisions
No edit summary |
(Updating to match new version of source page) |
||
(40 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{Docnav |
|||
<div class="mw-translate-fuzzy"> |
|||
|[[Draft_Rectangle|Rectangle]] |
|||
{{Docnav/ru |
|||
|[[Draft_Dimension|Dimension]] |
|||
|[[Draft_ShapeString/ru|Фигура из текста]] |
|||
|[[Draft_Module|Draft]] |
|||
|[[Draft_Dimension/ru|Размер]] |
|||
|IconL=Draft_Rectangle.svg |
|||
|[[Draft_Workbench/ru|Верстак "Draft"]] |
|||
|IconL=Draft_ShapeString.svg |
|||
|IconR=Draft_Dimension.svg |
|IconR=Draft_Dimension.svg |
||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
}} |
}} |
||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
{{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|Фигура из текста]] |
|||
}} |
}} |
||
</div> |
|||
= |
<span id="Description"></span> |
||
==Описание== |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
Инструмент {{Button|[[Image:Draft_Text.svg|16px]] [[Draft_Text|Текст]]}} позволяет добавить в документ многострочную текстовую область в указанную точку. Он использует предварительно выбранный [[Draft_Linestyle/ru|Draft Linestyle]], установленный в [[Draft_Tray/ru|Draft Tray]]. |
|||
==Описание== |
|||
Инструмент Текст позволяет добавить в документ текстовую область в указанную точку. Инструмент использует предварительно выбранный [[Draft Linestyle/ru|размер и цвет текста]] во вкладке Задачи. |
|||
</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. |
[[Image:Draft_Text_example.png|400px]] |
||
{{Caption|Для размещения текстового поля требуется одна точка}} |
|||
</div> |
</div> |
||
<span id="Usage"></span> |
|||
'''Warning:''' The texts created with [[Release notes 0.18 |version 0.18]] are not backward compatible, so backup your work if you try to open files created with 0.18 with older versions. |
|||
==Применение== |
|||
See also: [[Draft_Tray|Draft Tray]] and [[Draft_Snap|Draft Snap]]. |
|||
==Usage== |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
# Нажмите кнопку {{Button|[[Image:Draft_Text.svg|16px]] [[Draft Text/ru|Текст]]}}, или нажмите клавишу {{KEY|T}}, а затем{{KEY|E}} |
|||
==Использование== |
|||
# Укажите точку на трёхмерном виде или задайте координаты и нажмите кнопку {{Button|[[Image:Draft_AddPoint.svg|16px]] add point}}. |
|||
# Нажмите кнопку {{KEY|[[Image:Draft Text.png|16px]] [[Draft Text/ru|Текст]]}}, или нажмите клавишу {{KEY|T}}, а затем{{KEY|E}} |
|||
# Введите желаемый текст нажимая {{KEY|Enter}} между каждыми строками |
|||
# Укажите точку на трёхмерном виде или задайте [[Draft_Coordinates/ru|координаты]] |
|||
# Дважды нажмите {{KEY|Enter}} для завершения. |
|||
# Введите желаемый текст нажимая {{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|Ctrl}} при размещении текста, чтобы принудительно установить [[Draft_Snap/ru|привязку]] вашей точки в ближайшее место привязки, независимо от расстояния. |
|||
* Для указания координат вручную, введите число и нажимайте {{KEY|ENTER}} для перехода между координатами X, Y и Z. |
|||
* Нажмите {{KEY|Enter}} или {{KEY|↓ Стрелка вниз}}, чтобы ввести новую строку текста. |
|||
* {{KEY|ESC}} приведёт к отмене операции. |
|||
* Нажмите {{KEY|↑ Стрелка вверх}}, чтобы отредактировать предыдущую строку текста. |
|||
* При редактировании текста, нажатие {{KEY|ENTER}} или {{KEY|DOWN ARROW}} позволяет ввести или изменить следующую строку текста. |
|||
* Дважды нажмите {{KEY|Enter}} или {{KEY|↓ Стрелка вниз}}, чтобы завершить редактирование текста. |
|||
* {{KEY|UP ARROW}} позволяет редактировать предыдущую строку текста. |
|||
* Нажмите {{KEY|Esc}} или кнопку {{Button|Close}}, чтобы прервать выполнение текущей команды. |
|||
* '''Двойное''' нажатие {{KEY|ENTER}} (т.е. оставить последнюю строку пустой) добавляет текст в документ и закрывает редактор текста. |
|||
</div> |
</div> |
||
<span id="Notes"></span> |
|||
<div class="mw-translate-fuzzy"> |
|||
==Примечания== |
|||
* 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> |
|||
==Свойства== |
==Свойства== |
||
* {{PropertyData|Положение}}: базовая точка текстового блока. |
|||
See also: [[Property_editor|Property editor]]. |
|||
* {{PropertyData|Текст}}: содержимое текстового блока. |
|||
* {{PropertyView|Режим отображения}}: ориентация текста по осям сцены или на камеру. |
|||
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. |
|||
* {{PropertyView|Размер шрифта}}: размер символов текста. |
|||
* {{PropertyView|Выравнивание}}: выравнивание текста налево, направо или по центру от базовой точки. |
|||
<span id="Data"></span> |
|||
* {{PropertyView|Межстрочное расстояние}}: расстояние между строк текста. |
|||
=== Данные === |
|||
* {{PropertyView|Поворот}}: поворот текста. |
|||
* {{PropertyView|Ось поворота}}: используемая для поворота ось. |
|||
{{TitleProperty|Основные}} |
|||
* {{PropertyView|Шрифт}}: шрифт для отображения текста, может быть название шрифта, например "Arial", название стиля, например, "sans", "serif" или "mono", название семейства, например, "Arial,Helvetica,sans", или название со стилем, например "Arial:Bold". Если указанный шрифт не найден в системе, то будет использован основной. |
|||
<div class="mw-translate-fuzzy"> |
|||
* {{PropertyData|Положение}}: указывает базовую точку первой линии текстового блока. |
|||
* {{PropertyData|Текст}}: указывает содержимое текстового блока как список строк, каждый элемент списка, разделённый запятыми, показывает новую строку |
|||
</div> |
</div> |
||
<span id="View"></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. |
|||
{{TitleProperty|Annotation}} |
|||
=== 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|Annotation Style|Enumeration}}: specifies the annotation style applied to the text. See [[Draft_AnnotationStyleEditor|Draft AnnotationStyleEditor]]. |
|||
* {{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| |
* {{PropertyView|Scale Multiplier|Float}}: specifies the general scaling factor applied to the text. |
||
* {{PropertyView|Justification}}: specifies if the text aligns to the left, right or at the center of the base point. |
|||
{{TitleProperty|Display Options}} |
|||
* {{PropertyView|Line Spacing}}: specifies the space between lines of text. |
|||
* {{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"> |
|||
* {{PropertyView|Режим отображения}}: если это «3D текст», текст будет выровнен по осям сцены, изначально лежащим в плоскости XY; если это «2D-текст», текст всегда будет смотреть в камеру. |
|||
* {{PropertyView|Шрифт}}: указывает шрифт для отображения текста. Может быть название шрифта, например "Arial", название стиля, например, "sans", "serif" или "mono", название семейства, например, "Arial,Helvetica,sans", или название со стилем, например "Arial:Bold". Если указанный шрифт не найден в системе, то будет использован основной. |
|||
* {{PropertyView|Размер шрифта}}: указывает размер символов текста. Если текстовый объект создается в древе проекта, но текст не отображается, увеличивайте размер текста, пока он не станет видим. |
|||
* {{PropertyView|Выравнивание}}: указывает выравнивание текста налево, направо или по центру от базовой точки. |
|||
* {{PropertyView|Межстрочное расстояние}}: указывает расстояние между строк текста. |
|||
</div> |
|||
<span id="Scripting"></span> |
|||
==Программирование== |
|||
{{Emphasis|См. так же:}} [[Draft API/ru|Draft API]] и [[FreeCAD Scripting Basics|Основы составления скриптов FreeCAD]]. |
|||
<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|macros]] and from the [[Python|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) |
|||
Text2 = Draft.makeText(t2, point=p2) |
|||
Text1.ViewObject.FontSize = 200 |
|||
Text2.ViewObject.FontSize = 200 |
|||
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 |
|||
Text4 = Draft.makeText(t3, point=p3) |
|||
Text4.ViewObject.FontSize = 200 |
|||
Text4.Placement.Rotation = FreeCAD.Rotation(ZAxis, -30) |
|||
}} |
}} |
||
{{Docnav |
|||
<div class="mw-translate-fuzzy"> |
|||
|[[Draft_Rectangle|Rectangle]] |
|||
{{Docnav/ru |
|||
|[[Draft_Dimension|Dimension]] |
|||
|[[Draft_ShapeString/ru|Фигура из текста]] |
|||
|[[Draft_Module|Draft]] |
|||
|[[Draft_Dimension/ru|Размер]] |
|||
|IconL=Draft_Rectangle.svg |
|||
|[[Draft_Workbench/ru|Верстак "Draft"]] |
|||
|IconL=Draft_ShapeString.svg |
|||
|IconR=Draft_Dimension.svg |
|IconR=Draft_Dimension.svg |
||
|IconC=Workbench_Draft.svg |
|IconC=Workbench_Draft.svg |
||
}} |
}} |
||
</div> |
|||
{{Draft Tools navi{{#translation:}}}} |
{{Draft Tools navi{{#translation:}}}} |
||
{{Userdocnavi{{#translation:}}}} |
{{Userdocnavi{{#translation:}}}} |
||
{{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