Draft ShapeString/es: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{Docnav
{{Docnav|[[Draft_Point|Point]]|[[Draft_Facebinder|Facebinder]]|[[Draft_Module|Draft]]|IconL=Draft_Point.svg |IconC=Workbench_Draft.svg|IconR=Draft_Facebinder.svg }}
|[[Draft_Point|Point]]
|[[Draft_Facebinder|Facebinder]]
|[[Draft_Module|Draft]]
|IconL=Draft_Point.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_Facebinder.svg
}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 12: Line 19:
</div>
</div>


To insert a simpler text element without a closed shape use [[Draft Text|Draft Text]]. To create a text label with a lead and an arrow use [[Draft Label|Draft Label]].
'''Alternatively''': To insert a simpler text element without a closed shape use [[Image:Draft_Text.svg|24px]] [[Draft Text|Draft Text]]. To create a text label with a lead and an arrow use [[Image:Draft_Label.svg|24px]] [[Draft Label|Draft Label]].


[[Image:Draft_ShapeString_Example400.png]]
[[Image:Draft_ShapeString_Example400.png]]
Line 19: Line 26:
</div>
</div>


<div class="mw-translate-fuzzy">
==Como utilizar==
==Como utilizar==
</div>


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 33: Line 42:


If your Draft interface mode is set to TaskView:
If your Draft interface mode is set to TaskView:
# Press the {{Button|[[Image:Draft_ShapeString16.png]] [[Draft_ShapeString|Draft ShapeString]]}} button, or press {{KEY|S}} then {{KEY|S}} keys.
# Press the {{Button|[[Image:Draft_ShapeString.svg|16px]] [[Draft_ShapeString|Draft ShapeString]]}} button, or press {{KEY|S}} then {{KEY|S}} keys.
# A dialog will appear where you can specify your parameters.
# A dialog will appear where you can specify your parameters.
# Press {{KEY|OK}} to create the ShapeString.
# Press {{KEY|OK}} to create the ShapeString.
Line 45: Line 54:
* Very small text heights may result in deformed character shapes due to loss of detail in scaling.
* Very small text heights may result in deformed character shapes due to loss of detail in scaling.
* The current version is limited to left-to-right writing.
* The current version is limited to left-to-right writing.
* To create text arranged in a circular fashion use the {{Button|[[File:FCCircularTextButtom.png|24px]] [[Macro_Circular Text|Circular Text]]}} macro.
* To create text arranged in a circular fashion use the {{Button|[[File:FCCircularTextButtom.png|24px]] [[Macro_FCCircularText|Circular Text]]}} macro.


==Opciones==
==Opciones==
Line 84: Line 93:
Ejemplo:
Ejemplo:
{{Code|code=
{{Code|code=
import FreeCAD, Draft
import FreeCAD as App
import Draft

doc = App.newDocument()


font1 = "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf"
font1 = "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf"
Line 94: Line 106:
S2 = Draft.makeShapeString("Inclined text", font2, 200, 10)
S2 = Draft.makeShapeString("Inclined text", font2, 200, 10)


ZAxis = FreeCAD.Vector(0, 0, 1)
ZAxis = App.Vector(0, 0, 1)
p2 = FreeCAD.Vector(-1000, 500, 0)
p2 = App.Vector(-1000, 500, 0)
place2 = FreeCAD.Placement(p2, FreeCAD.Rotation(ZAxis, 45))
place2 = App.Placement(p2, App.Rotation(ZAxis, 45))
S2.Placement = place2
S2.Placement = place2


S3 = Draft.makeShapeString("Upside-down text", font3, 200, 10)
S3 = Draft.makeShapeString("Upside-down text", font3, 200, 10)
S3.Placement.Base = FreeCAD.Vector(0, -1000, 0)
S3.Placement.Base = App.Vector(0, -1000, 0)
S3.Placement.Rotation = FreeCAD.Rotation(ZAxis, 180)
S3.Placement.Rotation = App.Rotation(ZAxis, 180)

doc.recompute()
}}
}}


==Tutorials==
==Tutorials==

* [[Draft_ShapeString_tutorial|Draft ShapeString tutorial]]: extrude a ShapeString, position it in 3D space, and create an engraving in another body.
* [[Draft_ShapeString_tutorial|Draft ShapeString tutorial]]: extrude a ShapeString, position it in 3D space, and create an engraving in another body.
* [https://forum.freecadweb.org/viewtopic.php?f=3&t=36623| Nice write up on using ShapeString with PartDesign]
* [https://forum.freecadweb.org/viewtopic.php?f=3&t=36623 How to use ShapeStrings in PartDesign]


==Notes==
{{Docnav|[[Draft_Point|Point]]|[[Draft_Facebinder|Facebinder]]|[[Draft_Module|Draft]]|IconL=Draft_Point.svg |IconC=Workbench_Draft.svg|IconR=Draft_Facebinder.svg }}


* Many fonts will generate problematic geometric. This is because font contours are allowed to overlap, have small gaps and have varying directions within a glyph. These conditions are considered errors in the Wires used to define Faces. Options are to correct the font definition with a tool like FontForge or to use another font.
{{Draft Tools navi}}

{{Docnav
|[[Draft_Point|Point]]
|[[Draft_Facebinder|Facebinder]]
|[[Draft_Module|Draft]]
|IconL=Draft_Point.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_Facebinder.svg
}}


{{Draft Tools navi{{#translation:}}}}
{{Userdocnavi}}
{{Userdocnavi{{#translation:}}}}
{{clear}}
{{clear}}

Revision as of 20:10, 24 May 2020

Draft ShapeString/es

Ubicación en el Menú
Borrador -> Bosquejar forma de cadena
Entornos de trabajo
Borrador, Arquitectura
Atajo de teclado por defecto
S S
Introducido en versión
-
Ver también
Draft Text, Part Extrude

Descripción

La herramienta forma de cadena, inserta una forma compuesta representando una cadena de texto a un punto dado en el actual documento. Altura, trayectoria y fuente pueden ser definidas.

Alternatively: To insert a simpler text element without a closed shape use Draft Text. To create a text label with a lead and an arrow use Draft Label.

Como utilizar

  1. Presiona el boton Draft Shape from text ... o presiona la tecla S luego S
  2. Cliquea en un punto sobre la vista 3D o escribe una coordenada coordenada
  3. Ingresa el texto deseado y presiona ENTER
  4. Ingresa el tamaño deseado y presiona ENTER
  5. Ingresa la trayectoria deseada y presiona ENTER
  6. Presiona ENTER para aceptar el archivo fuente mostrado ó
  7. Presiona ... para seleccionar el archivo fuente.

If your Draft interface mode is set to TaskView:

  1. Press the Draft ShapeString button, or press S then S keys.
  2. A dialog will appear where you can specify your parameters.
  3. Press OK to create the ShapeString.


  • The text, size, tracking, and font can be changed after creation, by modifying the values in the Property Editor.
  • You will want to set the default font file in Draft Preferences, in the Texts and dimensions tab. This will prefill the font file box in the dialog.
  • Supported fonts include TrueType (.ttf), OpenType (.otf), and Type 1 (.pfb).

Limitations

  • Very small text heights may result in deformed character shapes due to loss of detail in scaling.
  • The current version is limited to left-to-right writing.
  • To create text arranged in a circular fashion use the Circular Text macro.

Opciones

  • Para ingresar coordenadas manualmente, simplemente ingresa los numeros, luego ENTER entre cada componente X,Y y Z.
  • Presionando ESC cancelará la operación.
  • Puedes ajustar un archivo fuente predeterminado en Draft/Preferencias.

Propiedades

  • DatosPosition: El punto base del compuesto
  • DatosString: Los contenidos del texto
  • DatosSize: La altura de las letras en unidades de FreeCAD
  • DatosTracking: El espacio adicional entre los caracteres en unidades de FreeCAD
  • DatosFont File: El archivo fuente utilizado para dibujar el texto

Programación

Esta herramienta se puede utilizar en macros y desde la consola de Python mediante las siguientes funciones:

ShapeString = makeShapeString(String, FontFile, Size=100, Tracking=0)
  • Convierte un texto en un compuesto usando la fuente especificada.

The placement of the ShapeString can be changed by overwriting its Placement attribute, or by individually overwriting its Placement.Base and Placement.Rotation attributes.

Ejemplo:

import FreeCAD as App
import Draft

doc = App.newDocument()

font1 = "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf"
font2 = "/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf"
font3 = "/usr/share/fonts/truetype/freefont/FreeSerifItalic.ttf"

S1 = Draft.makeShapeString("This is a sample text", font1, 200)

S2 = Draft.makeShapeString("Inclined text", font2, 200, 10)

ZAxis = App.Vector(0, 0, 1)
p2 = App.Vector(-1000, 500, 0)
place2 = App.Placement(p2, App.Rotation(ZAxis, 45))
S2.Placement = place2

S3 = Draft.makeShapeString("Upside-down text", font3, 200, 10)
S3.Placement.Base = App.Vector(0, -1000, 0)
S3.Placement.Rotation = App.Rotation(ZAxis, 180)

doc.recompute()

Tutorials

Notes

  • Many fonts will generate problematic geometric. This is because font contours are allowed to overlap, have small gaps and have varying directions within a glyph. These conditions are considered errors in the Wires used to define Faces. Options are to correct the font definition with a tool like FontForge or to use another font.