Hello, I am trying to modify the coordinates of points on the boundary of a triangulated surface (polydata made of triangle cells), in order to slightly expand some sections of the boundary in a direction that is perpendicular to local the boundary edge and parallel to the local boundary face. Basically in the green direction in this sketch.
I figured out I need to:
Select the boundary edges.
For each edge, select the two orange points and the triangle.
From the triangle, get the normal (the blue vector in my sketch).
From the edge, get the red vector.
With a scalar product between blue and red, get the green vector.
Check the correct direction of the green vector pointing outwards (I guess I can do this comparing the green vector with one vector obtained joining the center of the triangle with the center of the edge).
Move the coordinates of the points along a vector parallel to green and with a specified length.
(*) If I need to move just some section of the boundary, I guess I can “mark” the nodes to be moved with a scalar property.
This should do the trick, but I have the following problems.
(A) I can find all the boundary edges with vtkFeatureEdges() (with only BoundaryEdgesOn()), but as I understand it, this filter outputs a copy of the edges, not a reference to the original edges that is what I need.
(B) If I can select an edge, how can I select the points and the triangle?
Then I can easily get the coordinates and the normal, but I need help to solve (A) and (B).
Thanks very much!