ERROR: Cannot create line between coincident keypoints #3155
-
Hi! My geometry is basically a point cloud (3D coordinates) between which lines are extended (an example in the figure). The geometry is semi-randomly generated and my analysis works fine on the different geometries generated most of the time. Sometimes, however, I run into this error: LINE CONNECTS KEYPOINTS 1 2 I understand what the error implies, but my two points aren't that close to be considered coincident! What's even weirder is that defining the same two keypoints manually on mapdl and extending a line between them doesn't give an error. Here's a minimal code of the problem with the two points (this point pair isn't the only one that raises the error, but they are an example): from ansys.mapdl.core import launch_mapdl mapdl= launch_mapdl() point1=[19.54381, 19.54088, 15.666154] k1=mapdl.k(x=point1[0],y=point1[1],z=point1[2]) mapdl.l(k1,k2) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Ahmed-Zeid did you try the script you posted to see if it returns the error? I just tried and the line is created. Mike |
Beta Was this translation helpful? Give feedback.
Hey @mikerife!
I could of sworn that it didn't work for me at the time of the post, but now it does. You are right!
After some debugging, I found that further along the my code (not shown) I am filtering out repeated keypoints using
KSEL
before creating the lines, but apparently the default selection tolerance was too wide for my geometry. Easily enough, nothing a properly setSELTOL
couldn't fix.Thanks for the second eye!