Draft ShapeString/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
(One intermediate revision 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 123: Line 130:
</div>
</div>


* [[Draft_ShapeString_tutorial|Draft ShapeString tutorial]]: extrude a ShapeString, position it in 3D space, and create an engraving in another body.
{{Docnav|[[Draft_Point|Point]]|[[Draft_Facebinder|Facebinder]]|[[Draft_Module|Draft]]|IconL=Draft_Point.svg |IconC=Workbench_Draft.svg|IconR=Draft_Facebinder.svg }}
* [https://forum.freecadweb.org/viewtopic.php?f=3&t=36623 How to use ShapeStrings in PartDesign]

==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.

{{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}}
{{Draft Tools navi}}

Revision as of 14:47, 27 October 2019

Draft ShapeString

poziția meniului
Draft → Shape from text ...
Ateliere
Draft, Arch
scurtătură
S S
Prezentat în versiune
-
A se vedea, de asemenea,
Draft Text, Part Extrude

Descriere

Instrumentul ShapeString introduce o formă compusă care reprezintă un șir de caractere(text) într-un punct dat în documentul curent. Pot fi definite atribute ca: Înălțimea textului, tipul fontul, etc. The resulting shape can be used with the Part Extrude tool to create 3D letters.

Cele Draft Text instrumentul este o alternativă mai simplă, care nu produce o formă închisă.

Cum se folosește

  1. Apăsați butonul pulsatoriu Draft Shape from text ..., sau apăsați tastele S then S
  2. Click pe un punct din vizualizarea 3D, sau tastați coordonatele coordinate
  3. Introduceți textul dorit, apoi apăsați ENTER
  4. Introduceți înălțimea fontului, apoi apăsați ENTER
  5. Introduceți spațierea fontului, apoi apăsați ENTER
  6. Apăsați ENTER pentru a accepta fișierul(tipul) fontului afișat, sau,
  7. Apăsați butonul pulsatoriu cu trei puncte ... pentru a selecta un nou/diferit tip de font.

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

  • Acest instrumente nu este disponibil pentru versiunile anterioarea lui FreeCAD 0.14
  • Sunt suportatea următoareal tipuri de fișiere pentru fonturi: TrueType(*.ttf), OpenType(*.otf) și Type1(*.pfb).
  • Înălțimile foarte mici ale textului pot cauza distorsionarea glifelor de caractere din cauza pierderii detaliilor la scalare.
  • Versiunea actuală este limitată la scrierile de la stânga la dreapta pe o linie de bază orizontală.
  • Pentru a crea texte de formă curbă puteți utiliza macrocomanda Circular Text

Opţiuni

  • Pentru a introduce coordonatele manual, pur și simplu introduceți numerele, apoi apăsați ENTER între fiecare componenetă pe X, Y și Z.
  • Apăsați tasta ESCpentru a abandona operațiunea.
  • Puteți defini un fișier de font implicit în Draft/Prefences.

Proprietăți

  • DATEPosition: Punctul de bază a formei compuse
  • DATEString: Conținutul șirului tip text
  • DATESize: Înălțimea literelor exprimată în unități FC
  • DATETracking: Spațierea dintre caractere exprimată în unități FC
  • DATEFont File: Definirea fișierului fontului utilizat pentru a desena șirul de caractere

Scripturi

Instrumentul ShapeString poate fi utilizat în macros și de la consola Python folosind următoarele funcții:

ShapeString = makeShapeString(String, FontFile, Size=100, Tracking=0)
  • Transformați un șir tip text într-o Compound Shape utilizând fontul specificat.
  • Creează o formă compusă ShapeString utilizând codul String specificat

  +

  • FontFile este obligatorie și trebuie să fie calea completă a unui fișier de fonturi acceptat

  +

  • Size este înălțimea textului rezultat în milimetri

  +

  • Tracking este distanța inter-caracter suplimentară în milimetri

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

Exempluː

import FreeCAD, Draft

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 = FreeCAD.Vector(0, 0, 1)
p2 = FreeCAD.Vector(-1000, 500, 0)
place2 = FreeCAD.Placement(p2, FreeCAD.Rotation(ZAxis, 45))
S2.Placement = place2

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

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.