ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.Data.Analyst3D Namespace / TinEdge Class / GetNeighbor Method
Example

In This Topic
    GetNeighbor Method
    In This Topic
    Gets the corresponding edge of the triangle opposite to this TIN edge. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public TinEdge GetNeighbor()
    Public Function GetNeighbor() As TinEdge

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run
    Remarks
    A triangle is comprised of three edges. They are ordered clockwise. So, the RightTriangle of an edge is the triangle the edge belongs to. An edge's neighboring edge is the edge of the LeftTriangle that shares the same nodes (although from and to are reversed). GetNeighbor will return null when the edge is on the absolute boundary of the triangulation.
    Example
    TIN Edges
    {
      // nodes of the edge
      var nodes = edge.Nodes;
    
      // edge geometry
      polyline = edge.ToPolyline();
      // edge length
      var length = edge.Length;
      // is the edge "inside"
      var isInsideEdge = edge.IsInsideDataArea;
      // edge type - regular/hard/soft
      var edgeType = edge.EdgeType;
    
      // get next (clockwise) edge in the triangle
      var nextEdge = edge.GetNextEdgeInTriangle();
      // get previous (anti-clockwise) edge in the triangle
      var prevEdge = edge.GetPreviousEdgeInTriangle();
    
      // get opposite edge
      var oppEdge = edge.GetNeighbor();
    
      // get left triangle
      var leftTriangle = edge.LeftTriangle;
      // get right triangle
      var rightTriangle = edge.RightTriangle;
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.5 or higher.
    See Also