Mesh FromPartShape/pt-br

Mesh FromPartShape

Menu location
Meshes → Mesh From Shape
Workbenches
Mesh
Default shortcut
None
Introduced in version
-
See also
None

Descrição

The Mesh_FromPartShape command creates non-parametric mesh objects (Mesh Features) from shape objects (Part Features).

This command is the counterpart of the Part ShapeFromMesh command.

Utilização

  1. Optionally select one or more objects.
  2. There are several ways to invoke the command:
    • Press the Mesh From Shape button.
    • Select the Meshes → Mesh From Shape option from the menu.
  3. The Tessellation task panel opens.
  4. While the task panel is open you can create a new selection or change an existing selection.
  5. Select the tab for the mesher you wish to use.
  6. Specify the required settings. See Meshers.
  7. Press the OK button to close the task panel and finish the command.

Meshers

These are the available meshers and their settings:

Standard mesher

Mefisto mesher

Netgen mesher

Gmsh mesher

For Linux users: the external Gmsh module is required.

Notes

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"