Arch MeshToShape/sv: Difference between revisions
Renatorivo (talk | contribs) (Created page with "Category:Arch/sv") |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{docnav|[[Arch_SplitMesh|Split Mesh]]|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]|[[Arch_Module|Arch]]}} |
|||
<div class="mw-translate-fuzzy"> |
|||
{{GuiCommand/sv|Name=Arch MeshToShape|Name/sv=Arch MeshToShape|Workbenches=[[Arch Module/sv|Arch]]|MenuLocation=Arch → Utilities → Mesh to Shape|SeeAlso=[[Arch RemoveShape/sv|Arch RemoveShape]]}} |
{{GuiCommand/sv|Name=Arch MeshToShape|Name/sv=Arch MeshToShape|Workbenches=[[Arch Module/sv|Arch]]|MenuLocation=Arch → Utilities → Mesh to Shape|SeeAlso=[[Arch RemoveShape/sv|Arch RemoveShape]]}} |
||
</div> |
|||
==Beskrivning== |
==Beskrivning== |
||
Line 8: | Line 12: | ||
==How to use== |
==How to use== |
||
# Select a mesh object |
# Select a mesh object. |
||
# Press the {{ |
# Press the {{Button|[[Image:Arch MeshToShape.svg|16px]] [[Arch MeshToShape|Mesh to Shape]]}} entry in {{MenuCommand|Arch → Utilities → Mesh to Shape}}. |
||
==Scripting== |
==Scripting== |
||
{{Emphasis|See also:}} [[Arch API]] and [[FreeCAD Scripting Basics]]. |
|||
This tool can |
This tool can be used in [[macros]] and from the [[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) |
|||
meshToShape (object,[mark]) |
|||
}} |
}} |
||
⚫ | |||
⚫ | |||
If mark is True |
* 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. |
|||
* {{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|cut}} is {{incode|True}} holes in faces are made by subtraction. |
|||
{{Code|code= |
|||
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) |
|||
}} |
|||
{{docnav|[[Arch_SplitMesh|Split Mesh]]|[[Arch_SelectNonSolidMeshes|Select non-solid meshes]]|[[Arch_Module|Arch]]}} |
|||
<div class="mw-translate-fuzzy"> |
|||
[[Category:Arch/sv]] |
[[Category:Arch/sv]] |
||
</div> |
Revision as of 13:03, 5 February 2019
Arch MeshToShape |
Menyplacering |
---|
Arch → Utilities → Mesh to Shape |
Arbetsbänkar |
Arch |
Standard genväg |
Ingen |
Introducerad i version |
- |
Se även |
Arch RemoveShape |
Beskrivning
This tool converts a selected Mesh object into a Shape object. Note that this tool is optimized for objects with flat faces (no curves). The corresponding tool from the Part Workbench might be more suited for objects that contain curved surfaces.
How to use
- Select a mesh object.
- 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
isTrue
, non-solid objects will be marked in red. - If
fast
isTrue
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
isTrue
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
isTrue
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)