Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Get the entity number of an edge using matlab

Please login with a confirmed email address before reporting spam

Hello

Do you have ever get the entity number of an edge using the start and end points of that edge? In fact, I have the coordinates (and definitely their entity numbers) of two specific points (for instance the point 1 and 2) then, I'm gonna find the entity number of that edge which is made by those points (it might be a curve or even more complicated edge)

I don't wanna use the "mphselectbox" or "mphselectcoords" because of this problem; according to the image that I've attached Imagine in 2D, you have two lines and 3 points and you create a box using "mphselectbox" and the coordinates of the "point1" and "point2" *to get the entity number of "line1". (actually,the entity number of “line1” is our goal) as you see in this image, the result of "mphselectbox" function is the entity number of "line1" and also "line2" !!!!!!!!!!!! because "poitn3" is in this box (which is the smallest box contains "point1" and "point2")

I have a complicated geometry with many points and edges in 3D and I'm gonna get the entity number of every edge using the start and end points of each edge.



1 Reply Last Post 16 mag 2019, 02:43 GMT-4

Please login with a confirmed email address before reporting spam

Posted: 6 years ago 16 mag 2019, 02:43 GMT-4
Updated: 6 years ago 16 mag 2019, 02:43 GMT-4

Hello, In this case, “getStartEnd” returns the start and end vertices (their IDs) of all edges in the first and second row of the returned matrix. In addition, the number of columns indicate the entity number of related edge. It sounds great! and there is no problem in many cases whereas this function wouldn't be good enough if two curves have the same start and end vertices.

Hello, In this case, “getStartEnd” returns the start and end vertices (their IDs) of all edges in the first and second row of the returned matrix. In addition, the number of columns indicate the entity number of related edge. It sounds great! and there is no problem in many cases whereas this function wouldn't be good enough if two curves have the same start and end vertices.

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.