Draft ShapeString/es: Difference between revisions

From FreeCAD Documentation
(Created page with "Ejemplo:")
(Created page with "Esta herramienta se puede utilizar en macros y desde la consola de Python mediante las siguientes funciones:")
Line 34: Line 34:
==Programación==
==Programación==


Esta herramienta se puede utilizar en [[macros/es|macros]] y desde la consola de Python mediante las siguientes funciones:
The ShapeString tool can by used in [[macros]] and from the python console by using the following function:


{{Code|code=
{{Code|code=

Revision as of 05:22, 26 October 2018

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
Ninguno

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.

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.

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.

Properties

  • DatosPosition: The base point of the compound shape
  • DatosString: The contents of the text string
  • DatosSize: The height of the letters in FC units
  • DatosTracking: The inter-character spacing in FC units
  • DatosFont File: The font definition file used to draw the string

Programación

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

makeShapeString(String,FontFile,[Size],[Tracking])
  • Turns a text string into a Compound Shape using a specified font.

Ejemplo:

import FreeCAD,Draft
Draft.makeShapeString("This is a sample text",
                       "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf",
                       200.0,10)

Selecting A Font

ShapeString uses the internal geometry of a font to make FreeCAD shapes. To do this it must read the actual font file (*.tff, etc). If the Font Selection box is empty, you must type the full path to the font file or use ... to select a font file.

Limitations

  • This tool is not available in FreeCAD versions anterior to 0.14
  • TrueType(*.ttf), OpenType(*.otf) and Type1(*.pfb) font files are supported.
  • Very small text heights may result in deformed character glyphs due to loss of detail in scaling.
  • The current version is limited to left-to-right layouts on a horizontal baseline.
  • For creating curved text you can use the macro Circular Text

Tutorials