Arch SplitMesh/ru: Difference between revisions

From FreeCAD Documentation
(Created page with "Этот инструмент разбивает выбранную сетку на отдельные компоненты")
(Updating to match new version of source page)
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
{{docnav
|[[Arch_CloneComponent|Clone component]]
|[[Arch_MeshToShape|Mesh To Shape]]
|[[Arch_Module|Arch]]
|IconL=Arch_Component_Clone.svg
|IconC=Workbench_Arch.svg
|IconR=Arch_MeshToShape.svg
}}

<div class="mw-translate-fuzzy">
{{GuiCommand/ru
{{GuiCommand/ru
|Name=Arch SplitMesh
|Name=Arch SplitMesh
Line 5: Line 16:
|MenuLocation=Архитектура → Утилиты → Разделить сетку
|MenuLocation=Архитектура → Утилиты → Разделить сетку
|SeeAlso=[[Arch SelectNonSolidMeshes/ru|Выбрать не-разнородные сетки]]}}
|SeeAlso=[[Arch SelectNonSolidMeshes/ru|Выбрать не-разнородные сетки]]}}
</div>


==Определение==
==Определение==
Line 10: Line 22:
Этот инструмент разбивает выбранную [[Mesh Module/ru|сетку]] на отдельные компоненты
Этот инструмент разбивает выбранную [[Mesh Module/ru|сетку]] на отдельные компоненты


<div class="mw-translate-fuzzy">
==How to use==
==Использование==
</div>


# Select a mesh object
# Select a mesh object.
# Press the {{KEY|[[Image:Arch SplitMesh.png|16px]] '''Split Mesh'''}} entry in Arch -> Utilities menu
# Press the {{Button|[[Image:Arch_SplitMesh.svg|16px]] [[Arch SplitMesh|Split Mesh]]}} entry in {{MenuCommand|Arch Utilities Split Mesh}}.


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

The SplitMesh tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:


The Split Mesh tool can by used in [[macros]] and from the python console by using the following function:
{{Code|code=
{{Code|code=
new_list = splitMesh(obj, mark=True)
splitMesh (object,[mark])
}}
}}
splits the given mesh object into separated components.


* Splits the given mesh object ({{incode|obj}}) into separated components.
If mark is False, nothing else is done. If True (default), non-[http://en.wikipedia.org/wiki/Manifold manifold] components will be painted in red.
* If {{incode|mark}} is {{incode|True}} [http://en.wikipedia.org/wiki/Manifold non-manifold] components will be painted red.
{{clear}}
* {{incode|new_list}} is a list of all the individual components that make the mesh.
<languages/>

Example:

{{Code|code=
import FreeCAD, Draft, Arch, Mesh, MeshPart

Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0),FreeCAD.Vector(2000, 2000, 0)])
Wall = Arch.makeWall(Line, width=150, height=3000)
FreeCAD.ActiveDocument.recompute()

Shape = Wall.Shape.copy(False)
Shape.Placement = Wall.getGlobalPlacement()

mesh_obj = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh")
mesh_obj.Mesh = MeshPart.meshFromShape(Shape=Shape, MaxLength=520)
mesh_obj.ViewObject.DisplayMode = "Flat Lines"

new_list = Arch.splitMesh(mesh_obj)
}}

{{docnav
|[[Arch_CloneComponent|Clone component]]
|[[Arch_MeshToShape|Mesh To Shape]]
|[[Arch_Module|Arch]]
|IconL=Arch_Component_Clone.svg
|IconC=Workbench_Arch.svg
|IconR=Arch_MeshToShape.svg
}}

{{Arch Tools navi{{#translation:}}}}

{{Userdocnavi{{#translation:}}}}

Revision as of 20:50, 20 February 2020

Arch SplitMesh

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

Определение

Этот инструмент разбивает выбранную сетку на отдельные компоненты

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

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

Scripting

See also: Arch API and FreeCAD Scripting Basics.

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

new_list = splitMesh(obj, mark=True)
  • Splits the given mesh object (obj) into separated components.
  • If mark is True non-manifold components will be painted red.
  • new_list is a list of all the individual components that make the mesh.

Example:

import FreeCAD, Draft, Arch, Mesh, MeshPart

Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0),FreeCAD.Vector(2000, 2000, 0)])
Wall = Arch.makeWall(Line, width=150, height=3000)
FreeCAD.ActiveDocument.recompute()

Shape = Wall.Shape.copy(False)
Shape.Placement = Wall.getGlobalPlacement()

mesh_obj = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh")
mesh_obj.Mesh = MeshPart.meshFromShape(Shape=Shape, MaxLength=520)
mesh_obj.ViewObject.DisplayMode = "Flat Lines"

new_list = Arch.splitMesh(mesh_obj)