Arch MeshToShape/ru: Difference between revisions

From FreeCAD Documentation
(Created page with "{{Arch Tools navi/ru}}")
(Updating to match new version of source page)
 
(13 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

<div class="mw-translate-fuzzy">
{{docnav/ru
{{docnav/ru
|[[Arch_SplitMesh|Split Mesh]]
|[[Arch_SplitMesh|Split Mesh]]
|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]
|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]
|[[Arch_Module|Arch]]
|[[Arch_Workbench|Arch]]
|IconL=Arch_SplitMesh.svg
|IconL=Arch_SplitMesh.svg
|IconC=Workbench_Arch.svg
|IconC=Workbench_Arch.svg
|IconR=Arch_SelectNonSolidMeshes.png
|IconR=Arch_SelectNonSolidMeshes.png
}}
}}
</div>


<div class="mw-translate-fuzzy">
{{GuiCommand/ru
{{GuiCommand/ru
|Name=Arch MeshToShape
|Name=Arch MeshToShape
|Name/ru=Arch MeshToShape
|Name/ru=Arch MeshToShape
|MenuLocation=Архитектура → Утилиты → Сетка в фигуру
|MenuLocation=Архитектура → Утилиты → Сетка в фигуру
|Workbenches=[[Arch Module/ru|Arch]]
|Workbenches=[[Arch_Workbench/ru|Arch]]
|SeeAlso=[[Arch SplitMesh/ru|Arch SplitMesh]], [[Arch RemoveShape/ru|Удалить форму из Архитектуры]]
|SeeAlso=[[Arch SplitMesh/ru|Arch SplitMesh]], [[Arch RemoveShape/ru|Удалить форму из Архитектуры]]
}}
}}
</div>


==Описание==
==Определение==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Этот инструмент преобразует выбранную [[Mesh Module/ru|сетку]] в объект типа [[Part Module/ru|Shape]]. Обратите внимание, этот инструмент оптимизирован для объектов с плоскими поверхностями (без кривых). Соответствующий инструмент из [[Part Workbench/ru|верстака Part]] более подходит для объектов с кривыми поверхностями.
Этот инструмент преобразует выбранную [[Mesh Workbench/ru|сетку]] в объект типа [[Part Workbench/ru|Shape]]. Обратите внимание, этот инструмент оптимизирован для объектов с плоскими поверхностями (без кривых). Соответствующий инструмент из [[Part Workbench/ru|верстака Part]] более подходит для объектов с кривыми поверхностями.
</div>
</div>

This tool is optimized for objects with flat faces (no curves). The corresponding tool {{Button|[[File:Part_ShapeFromMesh.svg|16px]] [[Part_ShapeFromMesh|Part ShapeFromMesh]]}} from the [[Image:Workbench_Part.svg|16px]] [[Part_Workbench|Part Workbench]] might be more suited for objects that contain curved surfaces.


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


# Select a mesh object.
# Select a mesh object.
# Press the {{Button|[[Image:Arch MeshToShape.svg|16px]] [[Arch MeshToShape|Mesh to Shape]]}} entry in {{MenuCommand|Arch → Utilities → Mesh to Shape}}.
# Press the {{Button|[[Image:Arch MeshToShape.svg|16px]] [[Arch_MeshToShape|Mesh to Shape]]}} entry in {{MenuCommand|Arch → Utilities → Mesh to Shape}}.


==Properties==
==Properties==
Line 33: Line 40:


==Scripting==
==Scripting==
{{Emphasis|See also:}} [[Arch API|Arch API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].


{{Emphasis|See also:}} [[Arch_API|Arch API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].
This tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:

This tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following function:
{{Code|code=
{{Code|code=
new_obj = meshToShape(obj, mark=True, fast=True, tol=0.001, flat=False, cut=True)
new_obj = meshToShape(obj, mark=True, fast=True, tol=0.001, flat=False, cut=True)
}}
}}


* Turns the given {{incode|obj}}, a mesh, into a shape, joining coplanar facets.
The above code snippet converts the given {{incode|obj}} (a mesh), into a shape, joining coplanar facets.
* If {{incode|mark}} is {{incode|True}}, non-solid objects will be marked in red.
* If {{incode|mark}} is {{incode|True}}, non-solid objects will be marked in red.
* If {{incode|fast}} is {{incode|True}} it uses a faster algorithm by building a shell from the facets then removing splitter.
* If {{incode|fast}} is {{incode|True}}, it uses a faster algorithm by building a shell from the facets then removing splitter.
* {{incode|tol}} is the tolerance used when converting mesh segments to wires.
* {{incode|tol}} is the tolerance used when converting mesh segments to wires.
* If {{incode|flat}} is {{incode|True}} it will force the wires to be perfectly planar, to be sure they can be turned into faces, but this might leave gaps in the final shell.
* If {{incode|flat}} is {{incode|True}}, it will force the wires to be perfectly planar to be sure they can be converted into faces, but this might leave gaps in the final shell.
* If {{incode|cut}} is {{incode|True}} holes in faces are made by subtraction.
* If {{incode|cut}} is {{incode|True}}, holes in faces are made by subtraction.


Example:
{{Code|code=
{{Code|code=
import Arch, Mesh, BuildRegularGeoms
import Arch, Mesh, BuildRegularGeoms
Line 59: Line 68:
}}
}}



{{docnav
<div class="mw-translate-fuzzy">
{{docnav/ru
|[[Arch_SplitMesh|Split Mesh]]
|[[Arch_SplitMesh|Split Mesh]]
|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]
|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]
|[[Arch_Module|Arch]]|IconL=Arch_SplitMesh.svg
|[[Arch_Workbench|Arch]]|IconL=Arch_SplitMesh.svg
|IconC=Workbench_Arch.svg
|IconC=Workbench_Arch.svg
|IconR=Arch_SelectNonSolidMeshes.png
|IconR=Arch_SelectNonSolidMeshes.png
}}
}}
</div>


{{Arch Tools navi/ru}}
{{Arch Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

{{Userdocnavi}}

Latest revision as of 18:12, 10 March 2022

Arch MeshToShape

Системное название
Arch MeshToShape
Расположение в меню
Архитектура → Утилиты → Сетка в фигуру
Верстаки
Arch
Быстрые клавиши
Нет
Представлено в версии
-
См. также
Arch SplitMesh, Удалить форму из Архитектуры

Описание

Этот инструмент преобразует выбранную сетку в объект типа Shape. Обратите внимание, этот инструмент оптимизирован для объектов с плоскими поверхностями (без кривых). Соответствующий инструмент из верстака Part более подходит для объектов с кривыми поверхностями.

This tool is optimized for objects with flat faces (no curves). The corresponding tool Part ShapeFromMesh from the Part Workbench might be more suited for objects that contain curved surfaces.

Использование

  1. Select a mesh object.
  2. Press the Mesh to Shape entry in Arch → Utilities → Mesh to Shape.

Properties

Limitations

Scripting

See also: Arch API and FreeCAD Scripting Basics.

This tool can be used in macros and from the Python console by using the following function:

new_obj = meshToShape(obj, mark=True, fast=True, tol=0.001, flat=False, cut=True)

The above code snippet converts the given obj (a mesh), into a shape, joining coplanar facets.

  • If mark is True, non-solid objects will be marked in red.
  • If fast is True, it uses a faster algorithm by building a shell from the facets then removing splitter.
  • tol is the tolerance used when converting mesh segments to wires.
  • If flat is True, it will force the wires to be perfectly planar to be sure they can be converted into faces, but this might leave gaps in the final shell.
  • If cut is True, holes in faces are made by subtraction.

Example:

import Arch, Mesh, BuildRegularGeoms

Box = FreeCAD.ActiveDocument.addObject("Mesh::Cube", "Cube")
Box.Length = 1000
Box.Width = 2000
Box.Height = 1000
FreeCAD.ActiveDocument.recompute()

new_obj = Arch.meshToShape(Box)