Draft Hinweis

From FreeCAD Documentation
Revision as of 18:22, 3 December 2020 by Maker (talk | contribs)

Entwurf Etikett

Menüeintrag
Entwurf → Etikett
Arbeitsbereich
Entwurf, Arch
Standardtastenkürzel
D L
Eingeführt in Version
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

  1. Drücke die Entwurf Etikett Schaltfläche oder drücke D und dann L Schaltflächen.
  2. 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.
  3. 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.
  4. 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.

Hinweis 2: durch Vorauswahl eines Objekts oder eines Unterelements (Knoten, Kante oder Fläche) vor dem Drücken der Werkzeugschaltfläche wird die Beschriftung parametrisch, d. h. sie merkt sich, an welches Objekt sie gebunden ist, und kann ein bestimmtes Attribut dieses Objekts anzeigen. Wenn sich die Attribute des Objekts später ändern, passt das Etikett die angezeigten Informationen an.

Optionen

  • Klicke auf Etikettentyp, um die Art der anzuzeigenden Informationen auszuwählen, einschließlich "Benutzerdefiniert", "Name", "Etikett", "Position", "Länge", "Bereich", "Volumen", "Tag" und "Material". (Siehe Erklärung der Labeltypen unten)
  • Um Koordinaten manuell einzugeben, gib einfach die Zahlen ein und drücke dann Eingabe zwischen jeder X, Y und Z Komponente. Du kannst die Punkt hinzufügen Schaltfläche drücken wenn du die gewünschten Werte zum Einfügen des Punktes hast.
  • Halte Strg gedrückt, während der Platzierung der Beschriftung, um Fang deinen Punkt unabhängig von der Entfernung an die nächstgelegene Fangposition zu zwingen.
  • Drücke Esc oder die Schließen Schaltfläche, um den aktuellen Befehl abzubrechen.

Eigenschaften

Data

  • DatenLabel Type: specifies the type of information shown by this label (see Label types below).
  • DatenCustom Text: specifies the text block to display when DatenLabel 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.
  • DatenText: (read-only) indicates the actual text displayed by the label, depending on the DatenLabel Type.
  • DatenTarget Point: specifies the position of the tip of the leader.
  • DatenStraight Direction: specifies the direction of the straight segment of the leader, either horizontal or vertical.
  • DatenStraight 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.
  • DatenPosition: specifies the base point of the first line of the text block; it also influences how the leader is drawn.
  • DatenAngle: 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.
  • DatenAxis: specifies the axis to use for the rotation.

Etikettentypen

  • Custom: displays the contents of DatenCustom 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

  • AnsichtText 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.
  • AnsichtText 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.
  • AnsichtText Alignment: specifies the vertical alignment of the baseline of the text with respect to the leader. It can be top, middle or bottom.
  • AnsichtText Color: specifies the color of the text in an RGB tuple (R, G, B).
  • AnsichtLine Width: specifies the width of the leader.
  • AnsichtLine Color: specifies the color of the leader.
  • AnsichtArrow Size: specifies the size of the symbol displayed at the tip of the leader.
  • AnsichtArrow Type: specifies the type of symbol displayed at the tip of the leader, which can be dot, circle, arrow, or tick.
  • AnsichtFrame: if it is "Rectangle" it will draw a frame around the text.
  • AnsichtLine: if it is true the leader line will be displayed; otherwise only the text and the symbol at the tip will be displayed.
  • AnsichtDisplay 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.

Skripten

Siehe auch: Entwurf API und FreeCAD Grundlagen Skripten.

Das Etikett Werkzeug kann in Makros und aus der Python Konsole mit der folgenden Funktion verwendet werden:

Label = makeLabel(targetpoint=None, target=None, direction=None, distance=None, labeltype=None, placement=None)
  • Erstellt ein Etikett Objekt, wobei die Führung auf Zielpunkt zeigt und auf das Ziel Objekt verweist, das ein DokumentObjekt sein muss. (Editor: oder ein AuswahlObjekt? Das ist unklar).
  • Richtung ist entweder "Horizontal", "Vertikal" oder "Benutzerdefiniert".
  • Abstand ist der Abstand vom Basispunkt des Textes bis zur Führung.
  • Etikettentype ist eines von "Benutzerdefiniert", "Name", "Etikett", "Position", "Länge", "Fläche", "Volumen", "Tag" oder "Material".
  • Wenn eine Positionierung angegeben wird, wird er für den Basispunkt des Textes verwendet; andernfalls wird der Text am Ursprung erstellt.

Ändere den benutzerdefinierten Text, durch überschreiben des AngepassterText Attributs. Es kann eine Liste von Zeichenfolgen verwendet werden; jedes Element wird in einer eigenen Zeile angezeigt.

Die Ansichtseigenschaften von Etikett können durch Überschreiben seiner Attribute geändert werden; z.B. überschreibe ViewObject.TextSize mit der neuen Größe in Millimetern.

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()