Draft Étiquette
Draft Label |
Menu location |
---|
Draft → Label |
Workbenches |
Draft, Arch |
Default shortcut |
D L |
Introduced in version |
- |
See also |
None |
Description
Cet outil insère une étiquette, qui est un morceau de texte avec une ligne à 2 segments et une flèche, dans le document actif. Si un objet ou un sous-élément (face, arête ou sommet) est sélectionné lors du lancement de la commande, vous pouvez configurer le l'étiquette pour afficher automatiquement un certain attribut de l'élément sélectionné.
To insert a simpler text element without an arrow use Draft Text. To create solid text shapes use Draft ShapeString with Part Extrude.
Utilisation
- Facultativement, sélectionnez un objet ou un sous-élément d'un objet (sommet, arête ou face)
- Appuyez sur la touche , ou appuyez sur les touches D puis L.
- Cliquez sur un premier point de la vue 3D ou tapez une coordinate pour indiquer le point cible (position de la flèche). Cela peut être n'importe où, il n'est pas nécessaire que ce soit exactement sur l'élément sélectionné
- Cliquez sur un deuxième point de la vue 3D ou tapez une coordinate pour indiquer le point central qui correspond au début du segment de droite.
- Cliquez sur un troisième point de la vue 3D ou tapez une coordinate, pour indiquer la position du texte.
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.
Options
- Appuyez sur CTRL pour que snap pointe sur les emplacements de capture disponibles.
- Pour entrer les coordonnées manuellement, entrez simplement les nombres, puis appuyez sur ENTER entre chaque composante X, Y et Z.
- Appuyez sur ESC pour annuler l'opération.
- La direction du segment de droite (droite ou gauche) justifiera automatiquement le texte à gauche ou à droite.
Propriétés
- Données Type d'étiquette: Le type d'information indiqué par cette étiquette (voir ci-dessous)
- Données Custom Text: texte à afficher lorsque le type d'étiquette est défini sur custom
- Données Placement: Indique la rotation et la position du texte.
- Données Straight Distance: la longueur du segment de droite
- Données Direction droite: direction du segment de droite, horizontal ou vertical
- Données Target Point: Le point indiqué par cette étiquette
- Vue Text Size: La taille du texte
- Vue Text Font: la police utilisée pour le texte.
- Vue Text Alignment: l'alignement vertical du texte: haut, milieu ou bas
- Vue Couleur du texte: La couleur du texte
- Vue Line Width: La largeur de la ligne
- Vue Line Line: La couleur de la ligne
- Vue Type de flèche: type de la flèche: point, cercle, flèche ou tick.
- Vue Arrow Size: La taille de la flèche
- Vue Frame: Dessine un cadre autour du texte.
Types d'étiquettes
- Custom: Affiche le contenu de la propriété Custom Text
- Nom: Affiche le nom de l'objet cible
- Label: Affiche le label de l'objet cible
- Position: affiche les coordonnées de l'objet cible (point de base de l'emplacement), ou les coordonnées du sommet cible, le cas échéant, ou les coordonnées du centre du sous-élément cible (centre de gravité)
- Longueur: Affiche la longueur du sous-élément cible, si possible
- Area: affiche la zone du sous-élément cible, si possible
- Volume: Affiche le volume de l'objet cible, si possible
- Tag: Affiche la valeur de la balise de l'objet cible, si l'objet cible a une telle propriété (ce qui est le cas de tous les objets Arch).
- Material: Affiche l'étiquette du matériau de l'objet cible, si celui-ci a cette propriété.
View
- VueText 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.
- VueText 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.
- VueText Alignment: specifies the vertical alignment of the baseline of the text with respect to the leader. It can be top, middle or bottom.
- VueText Color: specifies the color of the text in an RGB tuple (R, G, B).
- VueLine Width: specifies the width of the leader.
- VueLine Color: specifies the color of the leader.
- VueArrow Size: specifies the size of the symbol displayed at the tip of the leader.
- VueArrow Type: specifies the type of symbol displayed at the tip of the leader, which can be dot, circle, arrow, or tick.
- VueFrame: if it is "Rectangle" it will draw a frame around the text.
- VueLine: if it is
true
the leader line will be displayed; otherwise only the text and the symbol at the tip will be displayed. - VueDisplay 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
L'outil texte peut être utilisé dans les macros, et dans la console Python, en utilisant la fonction suivante :
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)
- Retourne le nouvel objet créé.
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.
Exemple:
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()
- 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
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub