Mesh FromPartShape/ro: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{Docnav|[[Mesh Export|Export Mesh]]|[[Mesh CurvaturePlot|Curvature Plot]]|[[Mesh_Workbench|Mesh]]|IconL=Mesh_ExportMesh.png|IconC=Workbench_Mesh.svg|IconR=Mesh_CurvaturePlot.png}} |
|||
{{Docnav |
|||
{{GuiCommand|Name=Mesh MeshFromShape|MenuLocation=Meshes → Create Mesh from Shape|Workbenches=[[Mesh Workbench|Mesh]]|SeeAlso=}} |
|||
|[[Mesh_Export|Export]] |
|||
|[[Mesh_RemeshGmsh|RemeshGmsh]] |
|||
|[[Mesh_Workbench|Mesh]] |
|||
|IconL=Mesh_Export.svg |
|||
|IconR=Mesh_RemeshGmsh.svg |
|||
|IconC=Workbench_Mesh.svg |
|||
}} |
|||
<div class="mw-translate-fuzzy"> |
|||
{{GuiCommand |
|||
|Name=Mesh FromPartShape |
|||
|MenuLocation=Meshes → Create Mesh from Shape |
|||
|Workbenches=[[Mesh Workbench|Mesh]] |
|||
|SeeAlso= |
|||
}} |
|||
</div> |
|||
==Description== |
|||
<div class="mw-translate-fuzzy"> |
|||
==Introducere== |
==Introducere== |
||
Această comandă creează o plasă dintr-un obiect tip formă. |
Această comandă creează o plasă dintr-un obiect tip formă. |
||
</div> |
|||
The inverse operation is [[Part_ShapeFromMesh|Part ShapeFromMesh]] from the [[File:Workbench_Part.svg|24px]] [[Part_Workbench|Part Workbench]]. |
|||
<div class="mw-translate-fuzzy"> |
|||
<span id="Usage"></span> |
|||
==Utilizare== |
==Utilizare== |
||
# Selectați obiectul de tip formă. |
# Selectați obiectul de tip formă. |
||
Line 14: | Line 35: | ||
<br /> |
<br /> |
||
Doar selectând {{KEY| Meshes}} → {{KEY|[[Image:Mesh_Mesh_from_Shape.svg|32px]] Create Mesh from shape...}} vă va oferi un meniu suplimentar pentru a vă alege forma de transformat în plasă |
Doar selectând {{KEY| Meshes}} → {{KEY|[[Image:Mesh_Mesh_from_Shape.svg|32px]] Create Mesh from shape...}} vă va oferi un meniu suplimentar pentru a vă alege forma de transformat în plasă |
||
</div> |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
Line 22: | Line 42: | ||
</div> |
</div> |
||
<span id="Meshers"></span> |
|||
<div class="mw-translate-fuzzy"> |
|||
==Notes== |
|||
* Tutorial: [[Export_to_STL_or_OBJ|Export_to_STL_or_OBJ]] |
|||
</div> |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
[[Image:Mesh_Mesher_Standard.jpg]] |
[[Image:Mesh_Mesher_Standard.jpg]] |
||
Line 35: | Line 51: | ||
</div> |
</div> |
||
<span id="Standard_mesher"></span> |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
[[Image:Mesh_Mesher_Mefisto.jpg]] |
[[Image:Mesh_Mesher_Mefisto.jpg]] |
||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
Lungimea maximă a muchiei: dacă acest număr este mai mic, ochiul devine mai fin. Valoarea cea mai mică este de 0,000. |
|||
</div> |
</div> |
||
Line 47: | Line 60: | ||
</div> |
</div> |
||
<span id="Mefisto_mesher"></span> |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
Puteți alege între plase fiind: |
Puteți alege între plase fiind: |
||
Line 65: | Line 79: | ||
* Elemente de ordine al doilea: Fie elementele de ordinul doi vor fi generate. |
* Elemente de ordine al doilea: Fie elementele de ordinul doi vor fi generate. |
||
* Quad dominantă: Dacă ochiurile vor fi aranjate ca hexahedral. |
* Quad dominantă: Dacă ochiurile vor fi aranjate ca hexahedral. |
||
</div> |
|||
<div class="mw-translate-fuzzy"> |
|||
'''Standard Mesher''' |
|||
</div> |
</div> |
||
Line 75: | Line 85: | ||
</div> |
</div> |
||
<span id="Netgen_mesher"></span> |
|||
<div class="mw-translate-fuzzy"> |
<div class="mw-translate-fuzzy"> |
||
'''Netgen Mesher''' |
'''Netgen Mesher''' |
||
</div> |
</div> |
||
* {{MenuCommand|Fineness}}: select an options for the finesse of the mesh: |
|||
[[Image:Mesh_Mesher_Netgen.jpg]] |
|||
** {{MenuCommand|Very coarse}} |
|||
** {{MenuCommand|Coarse}} |
|||
** {{MenuCommand|Moderate}} |
|||
** {{MenuCommand|Fine}} |
|||
** {{MenuCommand|Very fine}} |
|||
** {{MenuCommand|User defined}}: for this option the following settings can be specified: |
|||
*** {{MenuCommand|Mesh size grading}}: a smaller value results in a finer mesh. The value must be in the {{Value|0.1}} - {{Value|1.0}} range. |
|||
*** {{MenuCommand|Element per edge}}: a larger value results in a finer mesh. The value must be in the {{Value|0.2}} - {{Value|10.0}} range. |
|||
*** {{MenuCommand|Element per curvature radius}}: a larger value results in a finer mesh. The value must be in the {{Value|0.2}} - {{Value|10}} range. |
|||
*{{MenuCommand|Optimize surface}}: if checked, the surface shape will be optimized. |
|||
*{{MenuCommand|Second order elements}}: if checked, second order elements will be generated resulting in a finer mesh. |
|||
*{{MenuCommand|Quad dominated}}: if checked, the mesh will preferably use [https://en.wikipedia.org/wiki/Types_of_mesh#Two-dimensional quadrilateral faces]. |
|||
===Gmsh mesher=== |
|||
You can choose between mesh {{MenuCommand|Fineness }} being: |
|||
*{{MenuCommand|Very coarse}} |
|||
*{{MenuCommand|Coarse}} |
|||
*{{MenuCommand|Moderate}} |
|||
*{{MenuCommand|Fine}} |
|||
*{{MenuCommand|Very fine}} |
|||
*{{MenuCommand|User defined}} |
|||
:For this you can set these values: |
|||
:{{MenuCommand|Mesh size grading}}: If this parameter is smaller, the mesh becomes finer. A value in the range of 0.1-1. |
|||
:{{MenuCommand|Element per edge}}: If this parameter is larger, the mesh becomes finer. A value in the range of 0.2-10. |
|||
:{{MenuCommand|Element per curvature radius}}: If this parameter is larger, the mesh becomes finer. A value in the range of 0.2-10. |
|||
For Linux users: the external [https://gmsh.info/ Gmsh] module is required. |
|||
For every {{MenuCommand|Fineness}} you can also choose: |
|||
*{{MenuCommand|Optimize surface}}: Whether an optimization of surface shape will be done. |
|||
*{{MenuCommand|Second order elements}}: Whether second order elements will be generated. |
|||
*{{MenuCommand|Quad dominated}}: Whether meshes will be arranged preferably using [https://en.wikipedia.org/wiki/Types_of_mesh#Two-dimensional quadrilateral faces]. |
|||
* {{MenuCommand|Meshing}}: select a meshing option: |
|||
== Scripting == |
|||
** {{MenuCommand|Automatic}} |
|||
** {{MenuCommand|Adaptive}} |
|||
** {{MenuCommand|Delaunay}} |
|||
** {{MenuCommand|Frontal}} |
|||
** {{MenuCommand|BAMG}} |
|||
** {{MenuCommand|Frontal Quad}} |
|||
** {{MenuCommand|Parallelograms}} |
|||
* {{MenuCommand|Max. element size}}: a smaller value results in a finer mesh. Specify {{Value|0}} to have this size automatically determined. |
|||
* {{MenuCommand|Min. element size}}: a smaller value results in a finer mesh. The value should be smaller than the {{MenuCommand|Max. element size}}. Specify {{Value|0}} to have this size automatically determined. |
|||
* {{MenuCommand|Angle}}: seems to be unsupported at this time. |
|||
* {{MenuCommand|Path}}: press the {{Button|...}} button and browse to the {{FileName|gmsh.exe}} path. |
|||
* If the meshing process takes too long you can press the {{Button|Kill}} button to abort it. |
|||
* Press the {{Button|Clear}} button to remove the information in the text area. <!--Because the task panel closes the Clear button cannot be used with this command. But the same task panel is used for the Mesh_RemeshGmsh command--> |
|||
==Notes== |
|||
This tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function: |
|||
{{Code|code= |
|||
* This command is not restricted to objects created with the [[Part_Workbench|Part workbench]]. It can create a mesh from any object that has a shape including objects created with the [[PartDesign_Workbench|PartDesign workbench]]. |
|||
MeshPart.meshFromShape(Shape=Shape, MaxLength=520) |
|||
* The [[Std_Export|Std Export]] command can export shape objects directly to a mesh format. |
|||
}} |
|||
* See also: [[Export_to_STL_or_OBJ|Export to STL or OBJ]] tutorial. |
|||
==Preferences== |
|||
===Standard mesher=== |
|||
* The {{MenuCommand|Surface deviation}} setting is stored: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → Mesh → Meshing → Standard → LinearDeflection}}. |
|||
* The {{MenuCommand|Angular deviation}} setting is stored: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → Mesh → Meshing → Standard → AngularDeflection}}. |
|||
* The {{MenuCommand|Relative surface deviation}} setting is stored: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → Mesh → Meshing → Standard → RelativeLinearDeflection}}. |
|||
===Gmsh mesher=== |
|||
* The {{MenuCommand|Path}} is stored: {{MenuCommand|Tools → Edit parameters... → BaseApp → Preferences → Mod → Mesh → Meshing → gmshExe}}. |
|||
==Properties== |
|||
See: [[Mesh_Feature|Mesh Feature]]. |
|||
==Scripting== |
|||
See also: [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
|||
To create a mesh object from a shape object use the {{incode|meshFromShape}} method of the MeshPart module. This method has several signatures. The signature determines the mesher that will be used. The example below uses the Mefisto mesher signature. |
|||
Example: |
|||
{{Code|code= |
{{Code|code= |
||
import FreeCAD, |
import FreeCAD, Part, Mesh, MeshPart |
||
cyl = FreeCAD.ActiveDocument.addObject("Part::Cylinder","Cylinder") |
|||
Line = Draft.makeWire([FreeCAD.Vector(0, 0, 0),FreeCAD.Vector(2000, 2000, 0)]) |
|||
Wall = Arch.makeWall(Line, width=150, height=3000) |
|||
FreeCAD.ActiveDocument.recompute() |
FreeCAD.ActiveDocument.recompute() |
||
msh = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh") |
|||
Shape = Wall.Shape.copy(False) |
|||
msh.Mesh = MeshPart.meshFromShape(Shape=cyl.Shape, MaxLength=1) |
|||
Shape.Placement = Wall.getGlobalPlacement() |
|||
msh.ViewObject.DisplayMode = "Flat Lines" |
|||
mesh_obj = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh") |
|||
mesh_obj.Mesh = MeshPart.meshFromShape(Shape=Shape, MaxLength=520) |
|||
mesh_obj.ViewObject.DisplayMode = "Flat Lines" |
|||
}} |
}} |
||
==Notes== |
|||
* Tutorial: [[Export_to_STL_or_OBJ|Export_to_STL_or_OBJ]] |
|||
{{Docnav |
|||
{{Docnav|[[Mesh Export|Export Mesh]]|[[Mesh CurvaturePlot|Curvature Plot]]|[[Mesh_Workbench|Mesh]]|IconL=Mesh_ExportMesh.png|IconC=Workbench_Mesh.svg|IconR=Mesh_CurvaturePlot.png}} |
|||
|[[Mesh_Export|Export]] |
|||
|[[Mesh_RemeshGmsh|RemeshGmsh]] |
|||
{{Mesh Tools navi}} |
|||
|[[Mesh_Workbench|Mesh]] |
|||
|IconL=Mesh_Export.svg |
|||
|IconR=Mesh_RemeshGmsh.svg |
|||
|IconC=Workbench_Mesh.svg |
|||
}} |
|||
{{Mesh Tools navi{{#translation:}}}} |
|||
{{Userdocnavi}} |
|||
{{Userdocnavi{{#translation:}}}} |
|||
{{clear}} |
Latest revision as of 15:58, 20 May 2023
Mesh FromPartShape |
Menu location |
---|
Meshes → Create Mesh from Shape |
Workbenches |
Mesh |
Default shortcut |
None |
Introduced in version |
- |
See also |
None |
Description
Introducere
Această comandă creează o plasă dintr-un obiect tip formă.
The inverse operation is Part ShapeFromMesh from the Part Workbench.
Utilizare
- Selectați obiectul de tip formă.
- Alegeți Meshes → Create Mesh from shape... din meniul principal.
- Un meniu va cere utilizarea mesher-ului/tessellation și valorile corespunzătoare pentru mesher
Doar selectând Meshes → Create Mesh from shape... vă va oferi un meniu suplimentar pentru a vă alege forma de transformat în plasă
Limitări
Abaterea de suprafață: Dacă acest număr este mai mic, ochiul devine mai fin. Valoarea cea mai mică este de 0,001.
Puteți alege între plase fiind:
- Foarte grosieră
- Grosieră
- Moderat
- Fină
- Foarte fină
- Definită de utilizator
Pentru ca Mesh fiind "definit de utilizator", puteți seta aceste valori:
- Clasificarea dimensiunii ochiului: Dacă acest parametru este mai mic, ochiul devine mai fin. O valoare cuprinsă între 0,1 și 10.
- Element per muchie/edge: Dacă acest parametru este mai mare, ochiul devine mai fin. O valoare cuprinsă între 0,1 și 10.
- Element pe raza de curbură: Dacă acest parametru este mai mare, ochiul devine mai fin. O valoare cuprinsă între 0,1 și 10.
Pentru fiecare opțiune principală puteți de asemenea să alegeți:
- Optimizați suprafața: dacă va fi făcută optimizarea formei suprafeței.
- Elemente de ordine al doilea: Fie elementele de ordinul doi vor fi generate.
- Quad dominantă: Dacă ochiurile vor fi aranjate ca hexahedral.
Mefisto Mesher
Netgen Mesher
- Fineness: select an options for the finesse of the mesh:
- Very coarse
- Coarse
- Moderate
- Fine
- Very fine
- User defined: for this option the following settings can be specified:
- Mesh size grading: a smaller value results in a finer mesh. The value must be in the
0.1
-1.0
range. - Element per edge: a larger value results in a finer mesh. The value must be in the
0.2
-10.0
range. - Element per curvature radius: a larger value results in a finer mesh. The value must be in the
0.2
-10
range.
- Mesh size grading: a smaller value results in a finer mesh. The value must be in the
- Optimize surface: if checked, the surface shape will be optimized.
- Second order elements: if checked, second order elements will be generated resulting in a finer mesh.
- Quad dominated: if checked, the mesh will preferably use quadrilateral faces.
Gmsh mesher
For Linux users: the external Gmsh module is required.
- Meshing: select a meshing option:
- Automatic
- Adaptive
- Delaunay
- Frontal
- BAMG
- Frontal Quad
- Parallelograms
- Max. element size: a smaller value results in a finer mesh. Specify
0
to have this size automatically determined. - Min. element size: a smaller value results in a finer mesh. The value should be smaller than the Max. element size. Specify
0
to have this size automatically determined. - Angle: seems to be unsupported at this time.
- Path: press the ... button and browse to the gmsh.exe path.
- If the meshing process takes too long you can press the Kill button to abort it.
- Press the Clear button to remove the information in the text area.
Notes
- This command is not restricted to objects created with the Part workbench. It can create a mesh from any object that has a shape including objects created with the PartDesign workbench.
- The Std Export command can export shape objects directly to a mesh format.
- See also: Export to STL or OBJ tutorial.
Preferences
Standard mesher
- The Surface deviation setting is stored: Tools → Edit parameters... → BaseApp → Preferences → Mod → Mesh → Meshing → Standard → LinearDeflection.
- The Angular deviation setting is stored: Tools → Edit parameters... → BaseApp → Preferences → Mod → Mesh → Meshing → Standard → AngularDeflection.
- The Relative surface deviation setting is stored: Tools → Edit parameters... → BaseApp → Preferences → Mod → Mesh → Meshing → Standard → RelativeLinearDeflection.
Gmsh mesher
- The Path is stored: Tools → Edit parameters... → BaseApp → Preferences → Mod → Mesh → Meshing → gmshExe.
Properties
See: Mesh Feature.
Scripting
See also: FreeCAD Scripting Basics.
To create a mesh object from a shape object use the meshFromShape
method of the MeshPart module. This method has several signatures. The signature determines the mesher that will be used. The example below uses the Mefisto mesher signature.
import FreeCAD, Part, Mesh, MeshPart
cyl = FreeCAD.ActiveDocument.addObject("Part::Cylinder","Cylinder")
FreeCAD.ActiveDocument.recompute()
msh = FreeCAD.ActiveDocument.addObject("Mesh::Feature", "Mesh")
msh.Mesh = MeshPart.meshFromShape(Shape=cyl.Shape, MaxLength=1)
msh.ViewObject.DisplayMode = "Flat Lines"
- Miscellaneous: Import mesh, Export mesh, Create mesh from shape, Regular solid, Unwrap Mesh, Unwrap Face
- Modifying: Harmonize normals, Flip normals, Fill holes, Close hole, Add triangle, Remove components, Remove components by hand, Smooth, Refinement, Decimation, Scale
- Boolean: Union, Intersection, Difference
- Cutting: Cut mesh, Trim mesh, Trim mesh with a plane, Create section from mesh and plane, Cross-sections
- Components and segments: Merge, Split by components, Create mesh segments, Create mesh segments from best-fit surfaces
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub