-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: node/element selection commands returning selected ids #3636
Conversation
Thanks for opening a Pull Request. If you want to perform a review write a comment saying: @ansys-reviewer-bot review |
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you a lot for this @moe-ad :). However, for this to be approved, you need to add some unit tests. I'm sure you know the procedure, but in case you have any doubt please check: https://mapdl.docs.pyansys.com/version/stable/getting_started/develop_pymapdl.html#unit-testing
Which you can reach from main documentation page https://mapdl.docs.pyansys.com :
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3636 +/- ##
==========================================
- Coverage 87.08% 87.06% -0.02%
==========================================
Files 187 187
Lines 14679 14683 +4
==========================================
+ Hits 12783 12784 +1
- Misses 1896 1899 +3 |
@germa89 , thanks for the guide. I have added the tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thank you a lot @moe-ad ! Feel free to merge!
Congrats on this, @moe-ad 🚀 |
Description
Currently, commands such as
mapdl.nsel()
ormapdl.esel()
will return a numpy array of selected objects' IDs. This is extremely useful when scripting since the selected IDs can be saved in a variable to be accessed later. Similar commands likemapdl.esln()
ormapdl.nsle()
do not have this behavior. Instead they return some selection status string from the running mapdl instance.This PR adds the described functionality to the
mapdl.esln()
andmapdl.nsle()
commands.Issue linked
This PR will close #3635
Checklist
draft
if it is not ready to be reviewed yet.feat: adding new MAPDL command
)