Fem: Implement basic python filter functionality and glyph example

This commit is contained in:
Stefan Tröger
2025-02-13 19:35:10 +01:00
parent bb0c06e8f7
commit 9430bdde01
33 changed files with 1793 additions and 166 deletions

View File

@@ -652,6 +652,19 @@ def makePostVtkFilterContours(doc, base_vtk_result, name="VtkFilterContours"):
base_vtk_result.addObject(obj)
return obj
def makePostVtkFilterGlyph(doc, base_vtk_result, name="Glyph"):
"""makePostVtkFilterGlyph(document, [name]):
creates a FEM post processing filter that visualizes vector fields with glyphs
"""
obj = doc.addObject("Fem::PostFilterPython", name)
from femobjects import post_glyphfilter
post_glyphfilter.PostGlyphFilter(obj)
base_vtk_result.addObject(obj)
if FreeCAD.GuiUp:
from femviewprovider import view_post_glyphfilter
view_post_glyphfilter.VPPostGlyphFilter(obj.ViewObject)
return obj
def makePostVtkResult(doc, result_data, name="VtkResult"):
"""makePostVtkResult(document, base_result, [name]):
@@ -669,7 +682,6 @@ def makePostVtkResult(doc, result_data, name="VtkResult"):
obj.ViewObject.DisplayMode = "Surface"
return obj
# ********* solver objects ***********************************************************************
def makeEquationDeformation(doc, base_solver=None, name="Deformation"):
"""makeEquationDeformation(document, [base_solver], [name]):