Mesh FromPartShape/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "Aby stworzyć obiekt siatki z obiektu kształtu należy użyć metody {{incode|meshFromShape}} modułu ''MeshPart''. Metoda ta posiada kilka sygnatur. Sygnatura określa gener...")
(Created page with "{{Docnav/pl |Eksport |Uprość przez Gmsh |środowisko pracy Siatka |IconL=Mesh_Export.svg |IconR=Mesh_RemeshGm...")
Line 129: Line 129:




{{Docnav
{{Docnav/pl
|[[Mesh_Export|Export]]
|[[Mesh_Export/pl|Eksport]]
|[[Mesh_RemeshGmsh|RemeshGmsh]]
|[[Mesh_RemeshGmsh/pl|Uprość przez Gmsh]]
|[[Mesh_Workbench|Mesh]]
|[[Mesh_Workbench/pl|środowisko pracy Siatka]]
|IconL=Mesh_Export.svg
|IconL=Mesh_Export.svg
|IconR=Mesh_RemeshGmsh.svg
|IconR=Mesh_RemeshGmsh.svg

Revision as of 13:44, 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).

Generator Mefisto

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

Generator Netgen

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

Generator Gmsh

dostępne w wersji 0.19

Dla użytkowników systemu Linux: wymagany jest zewnętrzny moduł Gmsh.

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

Uwagi

Ustawienia

Standardowy

  • 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

  • The Path is stored: Tools → Edit parameters... → BaseApp → Preferences → Mod → Mesh → Meshing → gmshExe.

Właściwości

Zapoznaj się z informacjami na stronie: cecha siatki.

Tworzenie skryptów

Zobacz również: FreeCAD podstawy tworzenia skryptów.

Aby stworzyć obiekt siatki z obiektu kształtu należy użyć metody meshFromShape modułu MeshPart. Metoda ta posiada kilka sygnatur. Sygnatura określa generator siatki, który zostanie użyty. Poniższy przykład używa sygnatury generatora siatki Mefisto.

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"