Open mikerife opened 1 month ago
Code to replicate this issue in: https://github.com/ansys/pymapdl/discussions/3119?notification_referrer_id=NT_kwDOAa2IUbQxMDc3OTQwNTU0MToyODE0OTg0MQ#discussioncomment-9571309
GitHubhello :) When I use the BEAM188 unit to calculate, the node number displayed in the eplot window is not the same as the node number when vtk=False. What is the reason? If you could discuss with me,...
Further more, I am getting this error:
>>> mapdl.nplot(vtk=True, show_node_numbering=True)
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[4], line 1
----> 1 mapdl.nplot(vtk=True, show_node_numbering=True)
File ~/Other_pymapdls/pymapdl_0/pymapdl/src/ansys/mapdl/core/mapdl_extended.py:1104, in _MapdlCommandExtended.nplot(self, nnum, vtk, **kwargs)
1102 labels = [{"points": pcloud.points, "labels": pcloud["labels"]}]
1103 points = [{"points": self.mesh.nodes}]
-> 1104 return general_plotter([], points, labels, mapdl=self, **kwargs)
1106 # otherwise, use the built-in nplot
1107 if isinstance(nnum, bool):
TypeError: general_plotter() got an unexpected keyword argument 'show_node_numbering'
I think the error comes when plotting the labels. The node IDs seems correct.
This issue seems to happen not only on element numbering, but with general geometrical entities. Here is a minimal example creating 3 keypoints and connecting the first two with a line:
from ansys.mapdl.core import launch_mapdl
# Launch MAPDL instance
mapdl = launch_mapdl()
# Enter pre-processing mode
mapdl.prep7()
# Create keypoints 3 keypoints
mapdl.k(1, 0, 0, 0)
mapdl.k(2, 1, 0, 0)
mapdl.k(3, 1, 1, 0)
# Create line connecting keypoints 1 and 2
mapdl.l(1, 2)
# Plot the geometry
mapdl.lplot(show_line_numbering=False, show_keypoint_numbering=True, color_lines=True)
The output shows keypoint 1 connected to keypoint 3 instead of 2:
This is an import issue, specially when setting boundary conditions and/or mesh refinement over complex geometries.
Discussed in https://github.com/ansys/pymapdl/discussions/3119