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: 3 months ago 16 mag 2019, 02:43 GMT-4
Updated: 3 months 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.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.