Fem: Implement basic python filter functionality and glyph example
This commit is contained in:
@@ -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]):
|
||||
|
||||
Reference in New Issue
Block a user