Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/3753.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fix: Bug located in VSEL using KSWP field
2 changes: 1 addition & 1 deletion src/ansys/mapdl/core/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def _get_args_xsel(*args: Tuple[str], **kwargs: Dict[str, str]) -> Tuple[str]:
vmin = kwargs.pop("vmin", args[3] if len(args) > 3 else "")
vmax = kwargs.pop("vmax", args[4] if len(args) > 4 else "")
vinc = kwargs.pop("vinc", args[5] if len(args) > 5 else "")
kabs = kwargs.pop("kabs", args[6] if len(args) > 6 else "")
kabs = kwargs.pop("kabs", kwargs.pop("kswp", args[6] if len(args) > 6 else ""))
return type_, item, comp, vmin, vmax, vinc, kabs, kwargs


Expand Down
6 changes: 5 additions & 1 deletion tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,11 +938,15 @@ def test_asel_iterable(mapdl, make_block):
)


def test_vsel_iterable(mapdl, make_block):
def test_vsel_iterable_and_kswp(mapdl, make_block):
mapdl.run("VGEN, 5, 1, , , 100, , , , , ")
assert np.allclose(
mapdl.vsel("S", "volu", "", [1, 2, 4], "", ""), np.array([1, 2, 4])
)
mapdl.vsel("S", "volu", "", [1], "", "", kswp=1)
assert np.allclose(mapdl.geometry.vnum, [1]) and np.allclose(
mapdl.geometry.anum, [1, 2, 3, 4, 5, 6]
)


def test_color_areas(mapdl, make_block):
Expand Down