TechDraw GeometricHatch/ru: Difference between revisions

From FreeCAD Documentation
(Created page with "Инструмент GeometricHatch заполняет замкнутый регион внутри вида шаблоном, базирующимся на специфика...")
(Updating to match new version of source page)
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav/ru
{{Docnav/ru
|[[TechDraw_Hatch/ru|Штриховать грань файлом изображения]]
|[[TechDraw_Hatch/ru|Штриховать грань, используя файл изображения]]
|[[TechDraw_Symbol/ru|Вставить символ SVG]]
|[[TechDraw_Symbol/ru|Вставить SVG знак]]
|[[TechDraw_Module/ru|TechDraw]]
|[[TechDraw_Workbench/ru|Верстак "TechDraw"]]
|IconL=TechDraw_Hatch.svg
|IconL=TechDraw_Hatch.svg
|IconC=Workbench_TechDraw.svg
|IconR=TechDraw_Symbol.svg
|IconR=TechDraw_Symbol.svg
|IconC=Workbench_TechDraw.svg
}}
}}


{{GuiCommand/ru
{{GuiCommand/ru
|Name/ru=Применить геометрическую штриховку к грани
|Name=TechDraw GeometricHatch
|Name=TechDraw_GeometricHatch
|Name/ru=TechDraw GeometricHatch
|MenuLocation=TechDraw → Применить геометрическую штриховку грани
|MenuLocation=TechDraw → Применить геометрическую штриховку к грани
|Workbenches=[[TechDraw Module/ru|TechDraw]]
|Workbenches=[[TechDraw_Workbench/ru|TechDraw]]
|SeeAlso=[[TechDraw_Hatch/ru|Hatch Face using Image File]], [[TechDraw_Hatching/ru|TechDraw Hatching]]
|SeeAlso=[[TechDraw_Hatch/ru|Штриховать грань, используя файл изображения]], [[TechDraw_Hatching/ru|Штриховка]]
}}
}}


==Описание==
==Описание==


<div class="mw-translate-fuzzy">
Инструмент GeometricHatch заполняет замкнутый регион внутри вида шаблоном, базирующимся на спецификации AutoDesk PAT hatching. '''В качестве альтернативы''', инструмент [[TechDraw_Hatch/ru|Hatch]] использует качестве рисунка штриховки файл в формате [[SVG/ru|SVG]] или [[bitmap/ru|растровый]], подробности см. в [[TechDraw_Hatching/ru|Hatching]].
Инструмент GeometricHatch заполняет замкнутый регион внутри вида шаблоном, базирующимся на спецификации AutoDesk PAT hatching. '''В качестве альтернативы''', инструмент [[TechDraw_Hatch/ru|Hatch]] использует качестве рисунка штриховки файл в формате [[SVG/ru|SVG]] или [[bitmap/ru|растровый]], подробности см. в [[TechDraw_Hatching/ru|Hatching]].
</div>


[[Image:TechDraw_GeomHatch_example.png|300px]]
[[Image:TechDraw_GeomHatch_example.png|300px]]
{{Caption|Геометрический узор штриховки на грани}}
{{Caption|Geometric hatch pattern on a face}}


==Применение==
==Использование==


# Select an closed region in a View. The region will turn green.
# Select a closed region in a View.
# There are several ways to invoke the tool:
# Press the {{Button|[[Image:TechDraw_GeometricHatch.svg|16px]] [[TechDraw_GeometricHatch|Apply Geometric Hatch to Face]]}} button
#* Press the {{Button|[[Image:TechDraw_GeometricHatch.svg|16px]] [[TechDraw_GeometricHatch|TechDraw GeometricHatch]]}} button.
# a dialog will open where you may select your pattern, a scale for the pattern and a line weight.
#* Select the {{MenuCommand|TechDraw → [[Image:TechDraw_GeometricHatch.svg|16px]] Apply Geometric Hatch to Face}} option from the menu.
# You may need to press {{Button|[[Image:Std_Refresh.svg|16px]] [[Std_Refresh|Refresh]]}} and/or {{Button|[[Image:TechDraw RedrawPage.svg|16px]] [[TechDraw_RedrawPage|Redraw Page]]}} to get the pattern to update.
# The {{MenuCommand|Apply Geometric Hatch to Face}} task panel opens.
# Optionally change the {{MenuCommand|Pattern File}}, the {{MenuCommand|Pattern Name}}, the {{MenuCommand|Pattern Scale}}, the {{MenuCommand|Line Weight}} and the {{MenuCommand|Line Color}}.
# Press the {{Button|OK}} button.


==Примечания==
==Примечания==


* Hatching objects are vulnerable to "[[Topological naming problem|topological naming]]" issues. See the information in the {{Button|[[Image:TechDraw_Dimension_Length.png|16px]] [[TechDraw Dimension Length|TechDraw Dimension Length]]}} tool 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.
* Unlike the [[TechDraw_Hatch|Hatch ]] tool, geometric hatch patterns are included when a drawing page is saved as an [[SVG|SVG]] file.


A small set of sample patterns are available in:
A small set of sample patterns are available in:


{{Code|code=
{{Code|code=
$INSTALL_DIR/Mod/TechDraw/PAT/FCPAT.pat
$INSTALL_DIR/data/Mod/TechDraw/PAT/FCPAT.pat
}}
}}


Line 45: Line 50:


{{Code|code=
{{Code|code=
/usr/share/freecad/Mod/TechDraw/PAT/FCPAT.pat
/usr/share/freecad/data/Mod/TechDraw/PAT/FCPAT.pat
}}
}}


Line 57: Line 62:
* {{PropertyView|Color Pattern}}: The color for the pattern lines.
* {{PropertyView|Color Pattern}}: The color for the pattern lines.


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


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


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


{{Code|code=
{{Code|code=
Line 69: Line 74:
hatch.NamePattern = "Diamond"
hatch.NamePattern = "Diamond"
rc = page.addView(hatch)
rc = page.addView(hatch)
}}

It is also possible to use TechDraw's geometric hatch engine to produce a compound object in the 3D space. One must take care that the base face lies on the XY plane, as the algorithm is not tailored yet for other cases:

{{Code|code=
import TechDraw
face = Part.makePlane(10,10)
patfile = "path/to/myPATfile.pat"
pattern = "Diamond"
scale = 10
hatch = TechDraw.makeGeomHatch(face, scale, pattern, patfile)
Part.show(hatch)
}}
}}




{{Docnav/ru
{{Docnav/ru
|[[TechDraw_Hatch/ru|Штриховать грань файлом изображения]]
|[[TechDraw_Hatch/ru|Штриховать грань, используя файл изображения]]
|[[TechDraw_Symbol/ru|Вставить символ SVG]]
|[[TechDraw_Symbol/ru|Вставить SVG знак]]
|[[TechDraw_Module/ru|TechDraw]]
|[[TechDraw_Workbench/ru|Верстак "TechDraw"]]
|IconL=TechDraw_Hatch.svg
|IconL=TechDraw_Hatch.svg
|IconC=Workbench_TechDraw.svg
|IconR=TechDraw_Symbol.svg
|IconR=TechDraw_Symbol.svg
|IconC=Workbench_TechDraw.svg
}}
}}


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

Revision as of 09:53, 14 March 2022

Other languages:

Применить геометрическую штриховку к грани

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

Описание

Инструмент GeometricHatch заполняет замкнутый регион внутри вида шаблоном, базирующимся на спецификации AutoDesk PAT hatching. В качестве альтернативы, инструмент Hatch использует качестве рисунка штриховки файл в формате SVG или растровый, подробности см. в Hatching.

Геометрический узор штриховки на грани

Применение

  1. Select a closed region in a View.
  2. There are several ways to invoke the tool:
    • Press the TechDraw GeometricHatch button.
    • Select the TechDraw → Apply Geometric Hatch to Face option from the menu.
  3. The Apply Geometric Hatch to Face task panel opens.
  4. Optionally change the Pattern File, the Pattern Name, the Pattern Scale, the Line Weight and the Line Color.
  5. Press the OK button.

Примечания

A small set of sample patterns are available in:

$INSTALL_DIR/data/Mod/TechDraw/PAT/FCPAT.pat

$INSTALL_DIR is the directory where FreeCAD was installed, for example

/usr/share/freecad/data/Mod/TechDraw/PAT/FCPAT.pat

Свойства

  • ДанныеSource: The View and Face to receive the hatch pattern.
  • ДанныеFile Pattern: The location of the PAT file to use.
  • ДанныеName Pattern: The name of the PAT specification within File Pattern.
  • ДанныеScale Pattern: The scale to be applied to the pattern (must be > 0.0).
  • ВидWeight Pattern: The thickness of the pattern lines.
  • ВидColor Pattern: The color for the pattern lines.

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

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

The GeometricHatch tool can be used in macros and from the Python console by using the following functions:

hatch = FreeCAD.ActiveDocument.addObject('TechDraw::DrawGeomHatch','GeomHatch')
hatch.Source = (view1,["Face0"])
hatch.FilePattern = "path/to/myPATfile.pat"
hatch.NamePattern = "Diamond"
rc = page.addView(hatch)

It is also possible to use TechDraw's geometric hatch engine to produce a compound object in the 3D space. One must take care that the base face lies on the XY plane, as the algorithm is not tailored yet for other cases:

import TechDraw
face = Part.makePlane(10,10)
patfile = "path/to/myPATfile.pat"
pattern = "Diamond"
scale = 10
hatch = TechDraw.makeGeomHatch(face, scale, pattern, patfile)
Part.show(hatch)