TechDraw Hatch/ru: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>


<div class="mw-translate-fuzzy">
{{Docnav/ru
{{Docnav/ru
|[[TechDraw_ExportPageDXF/ru|Экспорт листа в DXF]]
|[[TechDraw_ExportPageDXF/ru|Экспорт листа в DXF]]
Line 9: Line 10:
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
}}
}}
</div>


<div class="mw-translate-fuzzy">
{{GuiCommand/ru
{{GuiCommand/ru
|Name/ru=Штриховка
|Name/ru=Штриховка
Line 17: Line 20:
|SeeAlso=[[TechDraw_GeometricHatch/ru|Применить геометрическую штриховку к грани]], [[TechDraw_Hatching/ru|Штриховка]]
|SeeAlso=[[TechDraw_GeometricHatch/ru|Применить геометрическую штриховку к грани]], [[TechDraw_Hatching/ru|Штриховка]]
}}
}}
</div>


<span id="Description"></span>
==Описание==
==Описание==


The Hatch tool fills a closed region in a View with a hatch pattern, which can be [[SVG|SVG]] or [[bitmap|bitmap]] files. In contrary the [[Image:TechDraw_GeometricHatch.svg|24px]] [[TechDraw_GeometricHatch|Geometric Hatch]] tool uses a specific PAT pattern file, see [[TechDraw_Hatching|Hatching]] for details.
The '''TechDraw Hatch''' tool fills a closed region in a View with a tiled [[SVG|SVG]] or bitmap ({{Version|0.21}}) based hatch pattern. Alternatively the [[Image:TechDraw_GeometricHatch.svg|16px]] [[TechDraw_GeometricHatch|TechDraw GeometricHatch]] tool uses PAT based hatch patterns. See [[TechDraw_Hatching|Hatching]] for details.


[[Image:TechDraw_Hatch_example.png|300px]]
[[Image:TechDraw_Hatch_example.png|300px]]
Line 26: Line 31:
{{Caption|SVG hatch pattern on a face}}
{{Caption|SVG hatch pattern on a face}}


<span id="Usage"></span>
==Применение==
==Применение==


# Select an closed region in a View.
# Select a closed region in a View.
# There are several ways to invoke the tool:
# Press the {{Button|[[Image:TechDraw_Hatch.svg|16px]] [[TechDraw_Hatch|Hatch a Face using Image File]]}} button
#* Press the {{Button|[[Image:TechDraw_Hatch.svg|16px]] [[TechDraw_Hatch|TechDraw Hatch]]}} button.
# A dialog will open where you can select the pattern file, the scale and color.
#* Select the {{MenuCommand|TechDraw → Hatching → [[Image:TechDraw_Hatch.svg|16px]] Hatch a Face using Image File}} option from the menu.
# The {{MenuCommand|Apply Hatch to Face}} task panel opens.
# Optionally change the {{MenuCommand|Pattern File}}.
# Optionally change the {{MenuCommand|Pattern Scale}} and the {{MenuCommand|Line Color}}. These settings are ignored for bitmap patterns.
# Press the {{Button|OK}} button.


<span id="Notes"></span>
==Примечания==
==Примечания==


* For a solid color fill select {{FileName|solid.svg}} as the '''Pattern File'''.
* Hatching objects are vulnerable to the "[[Topological_naming_problem|topological naming problem]]". See [[TechDraw_LengthDimension|TechDraw LengthDimension]] for more information. It is recommended that hatching be one of the last steps in your drawing process.
* Hatching objects are vulnerable to the "[[Topological_naming_problem|topological naming problem]]". See [[TechDraw_LengthDimension|TechDraw LengthDimension]] for more information. It is recommended that hatching be one of the last steps in your drawing process.
* Sample [[SVG|SVG]] patterns are available locally in
* Sample [[SVG|SVG]] patterns are available locally in:
{{Code|code=
: {{Code|code=
$INSTALL_DIR/data/Mod/TechDraw/Patterns
$INSTALL_DIR/data/Mod/TechDraw/Patterns
}}
}}
where {{incode|$INSTALL_DIR}} is the directory where FreeCAD was installed, for example
: Where {{incode|$INSTALL_DIR}} is the directory where FreeCAD was installed, for example:
{{Code|code=
: {{Code|code=
/usr/share/freecad/data/Mod/TechDraw/Patterns
/usr/share/freecad/data/Mod/TechDraw/Patterns
}}
}}
and also on [https://github.com/FreeCAD/FreeCAD/tree/master/src/Mod/TechDraw/Patterns GitHub].
: They are also available on [https://github.com/FreeCAD/FreeCAD/tree/master/src/Mod/TechDraw/Patterns GitHub].


<span id="Properties"></span>
==Свойства==
==Свойства==


Line 52: Line 66:
* {{PropertyView|Hatch Scale}}: Hatch pattern size modifier.
* {{PropertyView|Hatch Scale}}: Hatch pattern size modifier.


<span id="Scripting"></span>
==Программирование==
==Программирование==


{{Emphasis|См. так же:}} [[TechDraw_API/ru|TechDraw API]] и [[FreeCAD_Scripting_Basics/ru|Основы составления скриптов FreeCAD]].
{{Emphasis|См. так же:}} [[TechDraw_API/ru|TechDraw API]] и [[FreeCAD_Scripting_Basics/ru|Основы составления скриптов FreeCAD]].


The Hatch tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following functions:
A Hatch can be created with [[Macros|macros]] and from the [[Python|Python]] console by using the following functions:


{{Code|code=
{{Code|code=
hatch = FreeCAD.ActiveDocument.addObject('TechDraw::DrawHatch','Hatch')
hatch = FreeCAD.ActiveDocument.addObject("TechDraw::DrawHatch", "Hatch")
hatch.Source = (view1,["Face0"])
hatch.Source = (view1, ["Face0"])
hatch.HatchPattern = hatchFileSpec
hatch.HatchPattern = hatchFileSpec
rc = page.addView(hatch)
page.addView(hatch)
}}
}}




<div class="mw-translate-fuzzy">
{{Docnav/ru
{{Docnav/ru
|[[TechDraw_ExportPageDXF/ru|Экспорт листа в DXF]]
|[[TechDraw_ExportPageDXF/ru|Экспорт листа в DXF]]
Line 74: Line 90:
|IconC=Workbench_TechDraw.svg
|IconC=Workbench_TechDraw.svg
}}
}}
</div>


{{TechDraw Tools navi{{#translation:}}}}
{{TechDraw Tools navi{{#translation:}}}}

Latest revision as of 07:58, 1 August 2023

Other languages:

Штриховка

Системное название
TechDraw_Hatch
Расположение в меню
TechDraw → Штриховать грань, используя файл изображения
Верстаки
TechDraw
Быстрые клавиши
Нет
Представлено в версии
-
См. также
Применить геометрическую штриховку к грани, Штриховка

Описание

The TechDraw Hatch tool fills a closed region in a View with a tiled SVG or bitmap (introduced in version 0.21) based hatch pattern. Alternatively the TechDraw GeometricHatch tool uses PAT based hatch patterns. See Hatching for details.

SVG hatch pattern on a face

Применение

  1. Select a closed region in a View.
  2. There are several ways to invoke the tool:
    • Press the TechDraw Hatch button.
    • Select the TechDraw → Hatching → Hatch a Face using Image File option from the menu.
  3. The Apply Hatch to Face task panel opens.
  4. Optionally change the Pattern File.
  5. Optionally change the Pattern Scale and the Line Color. These settings are ignored for bitmap patterns.
  6. Press the OK button.

Примечания

  • For a solid color fill select solid.svg as the Pattern File.
  • Hatching objects are vulnerable to the "topological naming problem". See TechDraw LengthDimension for more information. It is recommended that hatching be one of the last steps in your drawing process.
  • Sample SVG patterns are available locally in:
$INSTALL_DIR/data/Mod/TechDraw/Patterns
Where $INSTALL_DIR is the directory where FreeCAD was installed, for example:
/usr/share/freecad/data/Mod/TechDraw/Patterns
They are also available on GitHub.

Свойства

  • ДанныеSource: The View and Face to receive the hatch pattern.
  • ДанныеHatch Pattern: Full path and filename to an SVG pattern file.
  • ВидHatch Color: Hatch pattern will be displayed in this color.
  • ВидHatch Scale: Hatch pattern size modifier.

Программирование

См. так же: TechDraw API и Основы составления скриптов FreeCAD.

A Hatch can be created with macros and from the Python console by using the following functions:

hatch = FreeCAD.ActiveDocument.addObject("TechDraw::DrawHatch", "Hatch")
hatch.Source = (view1, ["Face0"])
hatch.HatchPattern = hatchFileSpec
page.addView(hatch)