FEM: Add more glyph types for the Glyph filter (#21397)

* FEM: Update post_glyphfilter.py

* FEM: Update TaskPostGlyph.ui

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
FEA-eng
2025-05-19 17:52:25 +02:00
committed by GitHub
parent a7cf3a4900
commit c139640c8f
2 changed files with 30 additions and 3 deletions

View File

@@ -42,11 +42,31 @@
<string>Arrow</string>
</property>
</item>
<item>
<property name="text">
<string>Cone</string>
</property>
</item>
<item>
<property name="text">
<string>Cube</string>
</property>
</item>
<item>
<property name="text">
<string>Cylinder</string>
</property>
</item>
<item>
<property name="text">
<string>Line</string>
</property>
</item>
<item>
<property name="text">
<string>Sphere</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">

View File

@@ -71,7 +71,7 @@ class PostGlyphFilter(base_fempythonobject.BaseFemPythonObject):
name="Glyph",
group="Glyph",
doc="The form of the glyph",
value=["Arrow", "Cube"],
value=["Arrow", "Cone", "Cube", "Cylinder", "Line", "Sphere"],
),
_PropHelper(
type="App::PropertyEnumeration",
@@ -91,7 +91,7 @@ class PostGlyphFilter(base_fempythonobject.BaseFemPythonObject):
type="App::PropertyEnumeration",
name="VectorScaleMode",
group="Scale",
doc="If the scale data is a vector this property decides if the glyph is scaled by vector magnitude or by the individual components",
doc="If the scale data is a vector, this property decides if the glyph is scaled by vector magnitude or by the individual components",
value=["Not a vector"],
),
_PropHelper(
@@ -186,7 +186,14 @@ class PostGlyphFilter(base_fempythonobject.BaseFemPythonObject):
self._algorithms = {}
# create all vtkalgorithm combinations and set them as filter pipeline
sources = {"Arrow": vtkSources.vtkArrowSource, "Cube": vtkSources.vtkCubeSource}
sources = {
"Arrow": vtkSources.vtkArrowSource,
"Cone": vtkSources.vtkConeSource,
"Cube": vtkSources.vtkCubeSource,
"Cylinder": vtkSources.vtkCylinderSource,
"Line": vtkSources.vtkLineSource,
"Sphere": vtkSources.vtkSphereSource,
}
for source_name in sources: