Part ShapeFromMesh/ro: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav
{{Docnav
|[[Part BoxSelection|Part BoxSelection]]
|[[Part_BoxSelection|BoxSelection]]
|[[Part PointsFromMesh|PointsFromMesh]]
|[[Part_PointsFromMesh|PointsFromMesh]]
|[[Part_Module|Part]]
|[[Part_Workbench|Part]]
|IconL=Part_BoxSelection.svg
|IconL=Part_BoxSelection.svg
|IconC=Workbench_Part.svg
|IconR=Part_PointsFromMesh.svg
|IconR=Part_PointsFromMesh.svg
|IconC=Workbench_Part.svg
}}
}}


{{GuiCommand/ro
<div class="mw-translate-fuzzy">
|Name=Part ShapeFromMesh‏‎
{{GuiCommand|Name=Part ShapeFromMesh‏‎|MenuLocation=Part → Create shape from mesh...|Workbenches=[[Part Workbench|Part]]|SeeAlso=[[Part ConvertToSolid]], [[Part RefineShape]]}}
|Name/ro=Part ShapeFromMesh‏‎
</div>
|MenuLocation=Part → Create shape from mesh...
|Workbenches=[[Part_Workbench/ro|Part]]
|SeeAlso=[[Part_MakeSolid/ro|Part ConvertToSolid]], [[Part_RefineShape/ro|Part RefineShape]], [[Part_PointsFromMesh/ro|Part PointsFromMesh]]
}}

==Introduction==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 17: Line 24:
Această comandă creează o formă dintr-un [[Glossary#Mesh|mesh object]] . Obiectele din rețea au capacități de editare limitate în FreeCAD, transformându-le în forme, permit utilizarea lor cu multe alte instrumente în FreeCAD (vezi și [[#Notes | Notes]]).
Această comandă creează o formă dintr-un [[Glossary#Mesh|mesh object]] . Obiectele din rețea au capacități de editare limitate în FreeCAD, transformându-le în forme, permit utilizarea lor cu multe alte instrumente în FreeCAD (vezi și [[#Notes | Notes]]).
</div>
</div>

The inverse operation is {{Button|[[File:Mesh_FromPartShape.svg|16px]] [[Mesh_FromPartShape|Mesh FromPartShape]]}} from the [[File:Workbench_Mesh.svg|24px]] [[Mesh_Workbench|Mesh Workbench]].

==Usage==


<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Line 26: Line 37:
</div>
</div>


== Links ==
<div class="mw-translate-fuzzy">
==Limitări==
There will be no analyzing or validating of the mesh object.
<br />
Analyzing and repairing of the mesh (if needed) should be done manually before conversion.
<br />
Appropriate tools are available in the [[Mesh Workbench]].
</div>


* [https://www.youtube.com/watch?v=5lwENZeNiNg&feature=youtu.be Edit STL Files In FreeCAD] video by AllVisuals4U.
Analyzing and repairing of the mesh (if needed) should be done manually before conversion.


==Scripting==
Appropriate tools are available in the {{KEY|[[Image:Workbench_Mesh.svg|16px]] [[Mesh Workbench|Mesh Workbench]]}}


Creating a [[Shape|Shape]] from a [[Mesh|Mesh]] can be done by using the {{incode|makeShapeFromMesh}} method from a [[Part_TopoShape|Part TopoShape]]; you need to specify the source mesh and tolerance, and assign the result to a new [[Part_Feature|Part Feature]] object.
<div class="mw-translate-fuzzy">

==Note==
Notice that the mesh must be recalculated before it is converted to a Shape, otherwise there won't be topology information, and the conversion won't be successful.
After creation of a shape, it may be useful to use [[Part ConvertToSolid|Convert to solid]] (necessary for [[Glossary#Boolean Operation|Boolean operations]]) and [[Part RefineShape|Refine shape]] tools.

</div>
{{Code|code=
import FreeCAD as App
import Part

doc = App.newDocument()
mesh = doc.addObject("Mesh::Cube", "Mesh")
mesh.recompute()

solid = doc.addObject("Part::Feature", "Shape")
shape = Part.Shape()
shape.makeShapeFromMesh(mesh.Mesh.Topology, 0.1)

solid.Shape = shape
solid.Placement.Base = App.Vector(15, 0, 0)
solid.purgeTouched()
doc.recompute()
}}


==Scripting==


{{Docnav
{{Docnav
|[[Part BoxSelection|Part BoxSelection]]
|[[Part_BoxSelection|BoxSelection]]
|[[Part PointsFromMesh|PointsFromMesh]]
|[[Part_PointsFromMesh|PointsFromMesh]]
|[[Part_Module|Part]]
|[[Part_Workbench|Part]]
|IconL=Part_BoxSelection.svg
|IconL=Part_BoxSelection.svg
|IconC=Workbench_Part.svg
|IconR=Part_PointsFromMesh.svg
|IconR=Part_PointsFromMesh.svg
|IconC=Workbench_Part.svg
}}
}}


{{Part Tools navi}}
{{Part Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

{{Userdocnavi}}


{{clear}}
{{clear}}

Latest revision as of 12:46, 30 January 2024

Part ShapeFromMesh‏‎

poziția meniului
Part → Create shape from mesh...
Ateliere
Part
scurtătură
nici unul
Prezentat în versiune
-
A se vedea, de asemenea,
Part ConvertToSolid, Part RefineShape, Part PointsFromMesh

Introduction

Introducere

Această comandă creează o formă dintr-un mesh object . Obiectele din rețea au capacități de editare limitate în FreeCAD, transformându-le în forme, permit utilizarea lor cu multe alte instrumente în FreeCAD (vezi și Notes).

The inverse operation is Mesh FromPartShape from the Mesh Workbench.

Usage

Utilizare

  1. Selectați obeictul tip plasă.
  2. Choose Part Create shape from mesh ... from the top menu.
  3. A popup-menu will ask for the tolerance for sewing shape (default value: 0,1)
  4. A shape from the mesh object is created as a seperate new object.

Links

Scripting

Creating a Shape from a Mesh can be done by using the makeShapeFromMesh method from a Part TopoShape; you need to specify the source mesh and tolerance, and assign the result to a new Part Feature object.

Notice that the mesh must be recalculated before it is converted to a Shape, otherwise there won't be topology information, and the conversion won't be successful.

import FreeCAD as App
import Part

doc = App.newDocument()
mesh = doc.addObject("Mesh::Cube", "Mesh")
mesh.recompute()

solid = doc.addObject("Part::Feature", "Shape")
shape = Part.Shape()
shape.makeShapeFromMesh(mesh.Mesh.Topology, 0.1)

solid.Shape = shape
solid.Placement.Base = App.Vector(15, 0, 0)
solid.purgeTouched()
doc.recompute()