Arch MeshToShape/ru: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
{{docnav
{{docnav|[[Arch_SplitMesh|Split Mesh]]|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]|[[Arch_Module|Arch]]|IconL=Arch_SplitMesh.svg |IconC=Workbench_Arch.svg |IconR=Arch_SelectNonSolidMeshes.png}}
|[[Arch_SplitMesh|Split Mesh]]
|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]
|[[Arch_Module|Arch]]
|IconL=Arch_SplitMesh.svg
|IconC=Workbench_Arch.svg
|IconR=Arch_SelectNonSolidMeshes.png
}}


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 24: Line 31:


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


This tool can be used in [[macros]] and from the [[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)
Line 49: Line 56:
new_obj = Arch.meshToShape(Box)
new_obj = Arch.meshToShape(Box)
}}
}}

{{docnav|[[Arch_SplitMesh|Split Mesh]]|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]|[[Arch_Module|Arch]]|IconL=Arch_SplitMesh.svg |IconC=Workbench_Arch.svg |IconR=Arch_SelectNonSolidMeshes.png}}
{{docnav
|[[Arch_SplitMesh|Split Mesh]]
|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]
|[[Arch_Module|Arch]]|IconL=Arch_SplitMesh.svg
|IconC=Workbench_Arch.svg
|IconR=Arch_SelectNonSolidMeshes.png
}}


{{Arch Tools navi}}
{{Arch Tools navi}}

Revision as of 10:02, 21 January 2020

Arch MeshToShape

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

Определение

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

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

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

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)
  • Turns 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 turned into faces, but this might leave gaps in the final shell.
  • If cut is True holes in faces are made by subtraction.
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)