Entwurf Etikett
Menüeintrag |
---|
Entwurf → Etikett |
Arbeitsbereich |
Entwurf, Arch |
Standardtastenkürzel |
D L |
In der Version eingeführt |
0.17 |
Siehe auch |
Entwurf Text, Entwurf FormZeichenfolge |
Beschreibung
Das Etikettenwerkzeug fügt ein mehrzeiliges Textfeld mit einer 2-teiligen Führungslinie und einem Pfeil ein. Wenn beim Starten des Befehls ein Objekt oder ein Unterelement (Fläche, Kante oder Scheitelpunkt) ausgewählt wird, kann das Etikett veranlasst werden, ein bestimmtes Attribut des ausgewählten Elements anzuzeigen, einschließlich Position, Länge, Fläche, Volumen oder Material.
Um ein einfacheres Textelement ohne Pfeil einzufügen, verwende Entwurf Text. Um feste Textformen zu erstellen, verwende Entwurf FormZeichenfolge mit Part extrudieren.
Verschiedene Etiketten mit unterschiedlichen Ausrichtungen, Hinweissymbolen und Informationen
Anwendung
- Drücke die
Entwurf Etikett Schaltfläche oder drücke D und dann L Schaltflächen.
- Klicke auf einen ersten Punkt in der 3D Ansicht oder gib eine Koordinate ein und drücke die
Punkt hinzufügen Schaltfläche. Dieser Punkt gibt das Ziel (Pfeilspitze) an. Dies kann überall sein, es muss kein Element sein.
- Klicke auf einen zweiten Punkt in der 3D Ansicht, oder gib eine Koordinate ein, und drücke die
Punkt hinzufügen Schaltfläche. Dieser Punkt zeigt den Beginn einer horizontalen oder vertikalen Führungslinie an.
- Klicke auf einen dritten Punkt in der 3D Ansicht, oder gib eine Koordinate ein, und drücke die
Punkt hinzufügen Schaltfläche. Dieser Punkt gibt den Basispunkt des Textes an.
Hinweis: die Richtung des horizontalen geraden Segments, nach rechts oder links, richtet den Text automatisch in die entgegengesetzte Richtung aus. Wenn die Führungslinie vertikal nach oben geht, wird der Text nach links ausgerichtet; wenn sie vertikal nach unten geht, wird sie nach rechts ausgerichtet.
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.
Optionen
- Click on Label type to select the type of information to display, including "Custom", "Name", "Label", "Position", "Length", "Area", "Volume", "Tag", and "Material". (See explanation of Label types below)
- To enter coordinates manually, simply enter the numbers, then press Enter between each X, Y and Z component. You can press the
add point button when you have the desired values to insert the point.
- Hold Ctrl while placing the label to force snapping your point to the nearest snap location, independently of the distance.
- Press Esc or the Close button to abort the current command.
Eigenschaften
Data
- DataLabel Type: specifies the type of information shown by this label (see Label types below).
- DataCustom Text: specifies the text block to display when DataLabel Type is set to "Custom", or the label is not parametric. The text is given as a list of strings; each element on the list, separated by a comma, indicates a new line of text.
- DataText: (read-only) indicates the actual text displayed by the label, depending on the DataLabel Type.
- DataTarget Point: specifies the position of the tip of the leader.
- DataStraight Direction: specifies the direction of the straight segment of the leader, either horizontal or vertical.
- DataStraight Distance: specifies the length of the straight segment of the leader, starting from the base point of the text. 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.
- DataPosition: specifies the base point of the first line of the text block; it also influences how the leader is drawn.
- DataAngle: specifies the rotation of the baseline of the first line of the text block; it also influences how the leader is drawn, as it will no longer be horizontal or vertical.
- DataAxis: specifies the axis to use for the rotation.
Etikettentypen
- Custom: displays the contents of DataCustom Text.
- Name: displays the internal name of the target object; the internal name is assigned to the object at its creation time, and remains fixed throughout the existence of the object.
- Label: displays the label of the target object; the label of the object can be changed by the user at any time.
- Position: displays the coordinates of the base point of the target object, of the target vertex, or of the center of mass of the target sub-element, if applicable.
- Length: displays the length of the target sub-element, if applicable.
- Area: displays the area of the target sub-element, if applicable.
- Volume: displays the volume of the target object, if applicable.
- Tag: displays the
Tag
attribute of the target object, if the object has such property, for example, objects created with the Arch Workbench. - Material: displays the label of the material of the target object, if the target object has such property.
View
- ViewText 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.
- ViewText 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.
- ViewText Alignment: specifies the vertical alignment of the baseline of the text with respect to the leader. It can be top, middle or bottom.
- ViewText Color: specifies the color of the text in an RGB tuple (R, G, B).
- ViewLine Width: specifies the width of the leader.
- ViewLine Color: specifies the color of the leader.
- ViewArrow Size: specifies the size of the symbol displayed at the tip of the leader.
- ViewArrow Type: specifies the type of symbol displayed at the tip of the leader, which can be dot, circle, arrow, or tick.
- ViewFrame: if it is "Rectangle" it will draw a frame around the text.
- ViewLine: if it is
true
the leader line will be displayed; otherwise only the text and the symbol at the tip will be displayed. - ViewDisplay 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.
Scripting
See also: Draft API and FreeCAD Scripting Basics.
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)
- Creates a
Label
object, with the leader pointing totargetpoint
, and linking to thetarget
object which must be aDocumentObject
(Editor: or a SelectionObject? This is unclear). direction
is either "Horizontal", "Vertical", or "Custom".distance
is the distance from the base point of the text to the leader.labeltype
is one of "Custom", "Name", "Label", "Position", "Length", "Area", "Volume", "Tag", or "Material".- If a
placement
is given, it is used for the base point of the text; otherwise the text is created at the origin.
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.
Beispiel:
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()
- Grundlagen: Coordinates, Constraining, Snapping (Near, Extension, Parallel, Grid, Endpoint, Midpoint, Perpendicular, Angle, Center, Ortho, Intersection, Special, Dimensions, Working plane)
- Zeichnung: Line, Wire, Circle, Arc, Ellipse, Polygon, Rectangle, Text, Dimension, BSpline, Point, ShapeString, Facebinder, Bezier Curve, Label
- Ändern: Move, Rotate, Offset, Trimex, Upgrade, Downgrade, Scale, Edit, Wire to BSpline, Add point, Delete point, Shape 2D View, Draft to Sketch, Array, Path Array, Point Array, Clone, Drawing, Mirror, Stretch
- Dienstprogramme: Set working plane, Finish line, Close line, Undo line, Toggle construction mode, Toggle continue mode, Apply style, Toggle display mode, Add to group, Select group contents, Toggle snap, Toggle grid, Show snap bar, Heal, Flip Dimension, VisGroup, Slope, AutoGroup, Set Working Plane Proxy, Add to Construction group
- Zusätzlich: Preferences, Import-Export Preferences (DXF/DWG, SVG, OCA, DAT); Draft API

- Installation: Installieren auf Windows, Installieren auf Linux, Installieren auf MacOSX; Erste Schritte
- Grundlagen: Über FreeCAD, Arbeitsbereiche, Programmeinstellungen, Dokumentstruktur, Graphische Oberfläche anpassen, Objekteigenschaften, Mausbedienung; Tutorials
- Arbeitsbereiche: Arch, Draft, FEM, Image, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Plot, Points, Raytracing, Reverse Engineering, Robot, Ship, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Scripting: Allgemein: Einführung in Python, FreeCAD scripting tutorial, FreeCAD Scripting Basics, Wie installiere ich Makros?, Gui Command, Units Module: Builtin modules, Erstellung von Arbeitsbereichen, Weitere Workbenches installieren Meshes (Netze): Mesh Scripting, Arbeitsbereich Mesh Teile: Arbeitsbereich Part, Topological data scripting, PythonOCC, Mesh to Part Coin scenegraph: The Coin/Inventor scenegraph, Pivy Qt-Interface: PySide, Using the FreeCAD GUI, Dialog creation Parametrische Objekte: Scripted objects Andere: Code-Schnipsel, Linienzeichnungsfunktion, Einbetten von FreeCAD, FreeCAD-Bibliothek für Vektormathematik, Übersicht für erfahrene Anwender, Grundlagen der FreeCAD-Skripterstellung, Topologisches Daten-Scripting