Mesh FromPartShape/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "Oto dostępne generatory siatki i ich ustawienia:")
(Created page with "===Generator standardowy===")
Line 39: Line 39:
Oto dostępne generatory siatki i ich ustawienia:
Oto dostępne generatory siatki i ich ustawienia:


===Standard mesher===
===Generator standardowy===


* {{MenuCommand|Surface deviation}}: the maximum [https://www.opencascade.com/doc/occt-7.3.0/overview/html/occt_user_guides__modeling_algos.html#occt_modalg_11_2 linear deviation] of a mesh section from the surface of the object.
* {{MenuCommand|Surface deviation}}: the maximum [https://www.opencascade.com/doc/occt-7.3.0/overview/html/occt_user_guides__modeling_algos.html#occt_modalg_11_2 linear deviation] of a mesh section from the surface of the object.

Revision as of 13:02, 26 September 2022

Siatka: Utwórz siatkę z kształtu

Lokalizacja w menu
Siatki → Utwórz siatkę z kształtu ...
Środowisko pracy
Siatka
Domyślny skrót
brak
Wprowadzono w wersji
-
Zobacz także
brak

Opis

Polecenie Utwórz siatkę z kształtu tworzy nieparametryczne obiekty siatek (Siatka: Cecha) z obiektów kształtu (Część: Cecha).

Operacją odwrotną jest Kształt z siatki ze środowiska Część.

Użycie

  1. Opcjonalnie wybierz jeden lub więcej obiektów.
  2. Istnieje kilka sposobów na wywołanie polecenia:
  3. Otwiera się panel zadań Rozdrobnienie.
  4. Gdy panel zadań jest otwarty, możesz stworzyć nowe zaznaczenie lub zmienić istniejące.
  5. Wybierz zakładkę dla generatora siatki, którego chcesz użyć.
  6. Określ wymagane ustawienia. Zobacz akapit generator siatki aby uzyskać więcej informacji.
  7. Naciśnij przycisk OK, aby zamknąć panel zadań i zakończyć polecenie.

Generator siatki

Oto dostępne generatory siatki i ich ustawienia:

Generator standardowy

  • Surface deviation: the maximum linear deviation of a mesh section from the surface of the object.
  • Angular deviation: the maximum angular deviation from one mesh section to the next. This setting is used when meshing curved surfaces.
  • Relative surface deviation: if checked, the maximum linear deviation of a mesh segment will be the specified Surface deviation multiplied by the length of the current mesh segment (edge).
  • Apply face colors to mesh: if checked, the mesh will get the face colors of the object.
  • Define segments by face colors: if checked, mesh segments will be grouped according to the colors of the object's faces. These groups will be exported for mesh output formats supporting this feature (the OBJ format for example).

Mefisto mesher

  • Maximum edge length: the maximum edge length of the mesh. A smaller value results in a finer mesh. Specifying 0, or unchecking the checkbox, results in a very coarse mesh.
    • If you press the Estimate button the mesher will enter an estimated value for the Maximum edge length. This value is not very reliable if multiple objects have been selected.

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.
  • 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

introduced in version 0.19

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

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"