TechDraw GeometricHatch/ru: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
 
(4 intermediate revisions by 2 users not shown)
Line 10: Line 10:
}}
}}


<div class="mw-translate-fuzzy">
{{GuiCommand/ru
{{GuiCommand/ru
|Name/ru=Применить геометрическую штриховку к грани
|Name/ru=Применить геометрическую штриховку к грани
Line 17: Line 18:
|SeeAlso=[[TechDraw_Hatch/ru|Штриховать грань, используя файл изображения]], [[TechDraw_Hatching/ru|Штриховка]]
|SeeAlso=[[TechDraw_Hatch/ru|Штриховать грань, используя файл изображения]], [[TechDraw_Hatching/ru|Штриховка]]
}}
}}
</div>


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


<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|Геометрический узор штриховки на грани}}


<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_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 can select your pattern, the scale, line weight and color.
#* Select the {{MenuCommand|TechDraw → Hatching → [[Image:TechDraw_GeometricHatch.svg|16px]] Apply Geometric Hatch to Face}} option from the menu.
# 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.


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


* For a solid color fill use [[TechDraw_Hatch|TechDraw Hatch]] instead and 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.
* A small set of sample patterns are available in:

: {{Code|code=
A small set of sample patterns are available in:

{{Code|code=
$INSTALL_DIR/data/Mod/TechDraw/PAT/FCPAT.pat
$INSTALL_DIR/data/Mod/TechDraw/PAT/FCPAT.pat
}}
}}
: Where {{incode|$INSTALL_DIR}} is the directory where FreeCAD was installed, for example:

: {{Code|code=
{{incode|$INSTALL_DIR}} is the directory where FreeCAD was installed, for example

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


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


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


<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 GeometricHatch tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following functions:
A GeometricHatch 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::DrawGeomHatch','GeomHatch')
hatch = FreeCAD.ActiveDocument.addObject("TechDraw::DrawGeomHatch", "GeomHatch")
hatch.Source = (view1,["Face0"])
hatch.Source = (view1, ["Face0"])
hatch.FilePattern = "path/to/myPATfile.pat"
hatch.FilePattern = "path/to/myPATfile.pat"
hatch.NamePattern = "Diamond"
hatch.NamePattern = "Diamond"
rc = page.addView(hatch)
page.addView(hatch)
}}
}}


Line 74: Line 84:
{{Code|code=
{{Code|code=
import TechDraw
import TechDraw
face = Part.makePlane(10,10)
face = Part.makePlane(10, 10)
patfile = "path/to/myPATfile.pat"
patfile = "path/to/myPATfile.pat"
pattern = "Diamond"
pattern = "Diamond"
Line 83: Line 93:




<div class="mw-translate-fuzzy">
{{Docnav/ru
{{Docnav/ru
|[[TechDraw_Hatch/ru|Штриховать грань файлом изображения]]
|[[TechDraw_Hatch/ru|Штриховать грань, используя файл изображения]]
|[[TechDraw_Symbol/ru|Вставить символ SVG]]
|[[TechDraw_Symbol/ru|Вставить SVG знак]]
|[[TechDraw_Workbench/ru|TechDraw]]
|[[TechDraw_Workbench/ru|Верстак "TechDraw"]]
|IconL=TechDraw_Hatch.svg
|IconL=TechDraw_Hatch.svg
|IconR=TechDraw_Symbol.svg
|IconR=TechDraw_Symbol.svg
|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_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 → Hatching → 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.

Примечания

  • For a solid color fill use TechDraw Hatch instead and 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.
  • A small set of sample patterns are available in:
$INSTALL_DIR/data/Mod/TechDraw/PAT/FCPAT.pat
Where $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.

A GeometricHatch can be created with 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"
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)