Draft ShapeString/cs: Difference between revisions
No edit summary |
(Updating to match new version of source page) |
||
(27 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
{{Docnav |
|||
|[[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"> |
|||
{{GuiCommand|Name=Draft_ShapeString|Workbenches=[[Draft Module|Kreslení]]|MenuLocation=Draft -> ShapeString|Shortcut=S S}} |
|||
{{GuiCommand/cs|Name=Draft_ShapeString|Name/cs=Draft ShapeString|Workbenches=[[Draft Module/cs|Kreslení]]|MenuLocation=Draft -> ShapeString|Shortcut=S S|SeeAlso=[[Draft Text/cs|Draft Text]], [[Part Extrude/cs|Part Extrude]]}} |
|||
</div> |
|||
==Popis== |
==Popis== |
||
<div class="mw-translate-fuzzy"> |
|||
Nástroj ShapeString vkládá složený tvar, který reprezentuje textový řetězec na daný bod v aktuálním dokumentu. Výška textu, mezery a font mohou být specifikovány. |
Nástroj ShapeString vkládá složený tvar, který reprezentuje textový řetězec na daný bod v aktuálním dokumentu. Výška textu, mezery a font mohou být specifikovány. |
||
</div> |
|||
'''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]] |
|||
<div class="mw-translate-fuzzy"> |
|||
[[Image:Draft_ShapeString_Example400.png]] |
[[Image:Draft_ShapeString_Example400.png]] |
||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
==Použití== |
==Použití== |
||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
# Stiskněte tlačítko {{KEY|[[Image:Draft_ShapeString16.png]] [[Draft ShapeString|Kreslení ShapeString]]}} nebo klávesy {{KEY|S}} a potom {{KEY|S}} |
# Stiskněte tlačítko {{KEY|[[Image:Draft_ShapeString16.png]] [[Draft ShapeString|Kreslení ShapeString]]}} nebo klávesy {{KEY|S}} a potom {{KEY|S}} |
||
# Klikněte na bod ve 3D pohledu nebo zadejte jeho [[Draft_Coordinates|souřadnice]] |
# Klikněte na bod ve 3D pohledu nebo zadejte jeho [[Draft_Coordinates|souřadnice]] |
||
# Zadejte požadovaný text a stiskněte {{KEY|ENTER}} |
# Zadejte požadovaný text a stiskněte {{KEY|ENTER}} |
||
# Zadejte |
# Zadejte požadovanou šířku mezer mezi písmeny a stiskněte {{KEY|ENTER}} |
||
# Stiskněte {{KEY|ENTER}} pro potvrzení zobrazeného souboru s fontem nebo |
# Stiskněte {{KEY|ENTER}} pro potvrzení zobrazeného souboru s fontem nebo |
||
# Stiskněte {{KEY|...}} pro výběr souboru s fontem. |
# Stiskněte {{KEY|...}} pro výběr souboru s fontem. |
||
</div> |
|||
[[Image:SSFontSelect.png]] |
|||
If your Draft interface mode is set to TaskView: |
|||
# 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. |
|||
# Press {{KEY|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|Draft Preferences]], in the {{Button|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). |
|||
<div class="mw-translate-fuzzy"> |
|||
==Omezení== |
|||
* Tento nástroj není dosud obecně dostupný. Bude zahrnut v budoucí verzi. (post v0.13) |
|||
* Jsou podporovány soubory s fonty TrueType(*.ttf), OpenType(*.otf) a Type1(*.pfb). |
|||
* Velmi malé výšky textu mohou zapříčinit deformaci znaků kvůli ztrátě detailů. |
|||
* Aktuální verze je omezena na zarovnání zleva doprava na horizontální základně. |
|||
</div> |
|||
==Volby== |
==Volby== |
||
<div class="mw-translate-fuzzy"> |
|||
* Pro zadání souřadnic ručně, jednoduše zadejte číslo a stiskněte {{KEY|ENTER}} mezi každou z komponent X, Y a Z. |
* Pro zadání souřadnic ručně, jednoduše zadejte číslo a stiskněte {{KEY|ENTER}} mezi každou z komponent X, Y a Z. |
||
* Stiskněte klávesu {{KEY|ESC}} pro ukončení aktuálního příkazu. |
* Stiskněte klávesu {{KEY|ESC}} pro ukončení aktuálního příkazu. |
||
* Defaultní soubor s fontem můžete přednastavit v Kreslení/Předvolby. |
* Defaultní soubor s fontem můžete přednastavit v Kreslení/Předvolby. |
||
</div> |
|||
==Vlastnosti== |
==Vlastnosti== |
||
<div class="mw-translate-fuzzy"> |
|||
* {{PropertyData|Pozice}}: Základní bod složeného písma |
* {{PropertyData|Pozice}}: Základní bod složeného písma |
||
* {{PropertyData|String}}: Text řetězce |
* {{PropertyData|String}}: Text řetězce |
||
Line 30: | Line 74: | ||
* {{PropertyData|Mezery}}: Šířka mezer mezi písmeny v jednotkách FC |
* {{PropertyData|Mezery}}: Šířka mezer mezi písmeny v jednotkách FC |
||
* {{PropertyData|Font File}}: Soubor s definicí fontu pro kreslený text |
* {{PropertyData|Font File}}: Soubor s definicí fontu pro kreslený text |
||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
==Skriptování== |
==Skriptování== |
||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
Nástroj ShapeString může být použit v [[macros/cs|makrech]] a z konzoly Pythonu použitím následující funkce: |
Nástroj ShapeString může být použit v [[macros/cs|makrech]] a z konzoly Pythonu použitím následující funkce: |
||
</div> |
|||
{{Code|code= |
{{Code|code= |
||
makeShapeString(String,FontFile, |
ShapeString = makeShapeString(String, FontFile, Size=100, Tracking=0) |
||
}} |
}} |
||
* Změní textový řetězec na složené písmo s použitím specifikovaného fontu. |
|||
<div class="mw-translate-fuzzy"> |
|||
Příklad: |
|||
* Změní textový řetězec na složené písmo s použitím specifikovaného fontu. |
|||
</div> |
|||
The placement of the ShapeString can be changed by overwriting its {{incode|Placement}} attribute, or by individually overwriting its {{incode|Placement.Base}} and {{incode|Placement.Rotation}} attributes. |
|||
Příklad: |
|||
{{Code|code= |
{{Code|code= |
||
import FreeCAD as App |
|||
import Draft |
|||
Draft.makeShapeString("This is a sample text", |
|||
"/usr/share/fonts/truetype/msttcorefonts/Arial.ttf", |
|||
doc = App.newDocument() |
|||
200.0,10) |
|||
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() |
|||
}} |
}} |
||
==Omezení== |
|||
* Tento nástroj není dosud obecně dostupný. Bude zahrnut v budoucí verzi. (post v0.13) |
|||
* Jsou podporovány soubory s fonty TrueType(*.ttf), OpenType(*.otf) a Type1(*.pfb). |
|||
* Velmi malé výšky textu mohou zapříčinit deformaci znaků kvůli ztrátě detailů. |
|||
* Aktuální verze je omezena na zarovnání zleva doprava na horizontální základně. |
|||
==Tutorials== |
|||
* [[Draft_ShapeString_tutorial|Draft ShapeString tutorial]]: extrude a ShapeString, position it in 3D space, and create an engraving in another body. |
|||
<languages/> |
|||
* [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{{#translation:}}}} |
|||
{{Userdocnavi{{#translation:}}}} |
|||
{{clear}} |
Revision as of 20:59, 20 November 2020
Draft ShapeString |
Umístění Menu |
---|
Draft -> ShapeString |
Pracovní stoly |
Kreslení |
Výchozí zástupce |
S S |
Představen ve verzi |
- |
Viz také |
Draft Text, Part Extrude |
Popis
Nástroj ShapeString vkládá složený tvar, který reprezentuje textový řetězec na daný bod v aktuálním dokumentu. Výška textu, mezery a font mohou být specifikovány.
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.
Použití
- Stiskněte tlačítko Kreslení ShapeString nebo klávesy S a potom S
- Klikněte na bod ve 3D pohledu nebo zadejte jeho souřadnice
- Zadejte požadovaný text a stiskněte ENTER
- Zadejte požadovanou šířku mezer mezi písmeny a stiskněte ENTER
- Stiskněte ENTER pro potvrzení zobrazeného souboru s fontem nebo
- Stiskněte ... pro výběr souboru s fontem.
If your Draft interface mode is set to TaskView:
- Press the Draft ShapeString button, or press S then S keys.
- A dialog will appear where you can specify your parameters.
- 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).
Omezení
- Tento nástroj není dosud obecně dostupný. Bude zahrnut v budoucí verzi. (post v0.13)
- Jsou podporovány soubory s fonty TrueType(*.ttf), OpenType(*.otf) a Type1(*.pfb).
- Velmi malé výšky textu mohou zapříčinit deformaci znaků kvůli ztrátě detailů.
- Aktuální verze je omezena na zarovnání zleva doprava na horizontální základně.
Volby
- Pro zadání souřadnic ručně, jednoduše zadejte číslo a stiskněte ENTER mezi každou z komponent X, Y a Z.
- Stiskněte klávesu ESC pro ukončení aktuálního příkazu.
- Defaultní soubor s fontem můžete přednastavit v Kreslení/Předvolby.
Vlastnosti
- ÚdajePozice: Základní bod složeného písma
- ÚdajeString: Text řetězce
- ÚdajeVelikost: Výška textu v jednotkách FC
- ÚdajeMezery: Šířka mezer mezi písmeny v jednotkách FC
- ÚdajeFont File: Soubor s definicí fontu pro kreslený text
Skriptování
Nástroj ShapeString může být použit v makrech a z konzoly Pythonu použitím následující funkce:
ShapeString = makeShapeString(String, FontFile, Size=100, Tracking=0)
- Změní textový řetězec na složené písmo s použitím specifikovaného fontu.
The placement of the ShapeString can be changed by overwriting its Placement
attribute, or by individually overwriting its Placement.Base
and Placement.Rotation
attributes.
Příklad:
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
- Draft ShapeString tutorial: extrude a ShapeString, position it in 3D space, and create an engraving in another body.
- 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.
Draft
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
User documentation
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub