Mesh FromPartShape/ru: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 55: | Line 55: | ||
*Quad dominant:Whether meshes will be arranged like hexahedral. |
*Quad dominant:Whether meshes will be arranged like hexahedral. |
||
== |
== Scripting == |
||
<br /> |
|||
This tool can be used in [[macros]] and from the [[Python]] console by using the following function: |
|||
<br /> |
|||
{{Code|code= |
|||
MeshPart.meshFromShape(Shape=Shape, MaxLength=520) |
|||
}} |
|||
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" |
|||
}} |
|||
==Notes== |
==Notes== |
Revision as of 17:23, 24 December 2018
Mesh MeshFromShape |
Системное название |
---|
Mesh MeshFromShape |
Расположение в меню |
Сетки → Создайте сетку из фигуры |
Верстаки |
Mesh |
Быстрые клавиши |
Нет |
Представлено в версии |
- |
См. также |
Нет |
Introduction
This command creates a mesh from a shape object.
Use
- Select the shape object.
- Choose Meshes → Create Mesh from shape... from the top menu.
- A menu will ask for the mesher to use and the appropriate values for the mesher
Just selecting Meshes → Create Mesh from shape... will give you an additional menu to choose your shape to mesh
Standard Mesher
Surface deviation: If this number is smaller the mesh becomes finer. Smallest value is 0,001.
Mefisto Mesher
Maximum edge length: If this number is smaller the mesh becomes finer. Smallest value is 0,000.
Netgen Mesher
You can choose between mesh being:
- Very coarse
- Coarse
- Moderate
- Fine
- Very fine
- User defined
For Mesh being "user defined" you can set these values:
- Mesh size grading : If this parameter is smaller, mesh becomes finer. A value in the range of 0.1-10.
- Element per edge : If this parameter is larger, mesh becomes finer. A value in the range of 0.1-10.
- Element per curvature radius : If this parameter is larger, mesh becomes finer. A value in the range of 0.1-10.
For every main option you can also choose:
- Optimize surface : Whether optimization of surface shape will be done.
- Second order elements:Whether second order elments will be generated.
- Quad dominant:Whether meshes will be arranged like hexahedral.
Scripting
This tool can be used in macros and from the Python console by using the following function:
MeshPart.meshFromShape(Shape=Shape, MaxLength=520)
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"
Notes
- Tutorial: Export_to_STL_or_OBJ