ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / TinLayer Class / SearchTriangles Method
Filter by parameters. See ArcGIS.Core.Data.Analyst3D.TinTriangleFilter. If null, then all triangles will be retrieved.
Example

In This Topic
    SearchTriangles Method (TinLayer)
    In This Topic
    Retrieves the triangles in the TIN that satisfy the criteria set in the filter. If no filter is set, all triangles will be retrieved. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public TinTriangleCursor SearchTriangles( 
       TinTriangleFilter filter
    )
    Public Function SearchTriangles( _
       ByVal filter As TinTriangleFilter _
    ) As TinTriangleCursor

    Parameters

    filter
    Filter by parameters. See ArcGIS.Core.Data.Analyst3D.TinTriangleFilter. If null, then all triangles will be retrieved.

    Return Value

    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run
    Remarks
    To ensure maximum robustness, callers should explicitly dispose of the returned ArcGIS.Core.Data.Analyst3D.TinTriangleCursor in either a using statement or a finally block.
    Example
    Seach for TIN Nodes, Edges, Triangles
    // search all "inside" nodes
    using (ArcGIS.Core.Data.Analyst3D.TinNodeCursor nodeCursor = tinLayer.SearchNodes(null))
    {
      while (nodeCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.TinNode node = nodeCursor.Current)
        {
    
        }
      }
    }
    
    // search "inside" nodes with an extent
    ArcGIS.Core.Data.Analyst3D.TinNodeFilter nodeFilter = new ArcGIS.Core.Data.Analyst3D.TinNodeFilter();
    nodeFilter.FilterEnvelope = envelope;
    using (ArcGIS.Core.Data.Analyst3D.TinNodeCursor nodeCursor = tinLayer.SearchNodes(nodeFilter))
    {
      while (nodeCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.TinNode node = nodeCursor.Current)
        {
    
        }
      }
    }
    
    // search for super nodes only
    var supernodeFilter = new ArcGIS.Core.Data.Analyst3D.TinNodeFilter();
    supernodeFilter.FilterEnvelope = tinDataset.GetSuperNodeExtent();
    supernodeFilter.DataElementsOnly = false;
    supernodeFilter.SuperNode = true;
    using (ArcGIS.Core.Data.Analyst3D.TinNodeCursor nodeCursor = tinLayer.SearchNodes(nodeFilter))
    {
      while (nodeCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.TinNode node = nodeCursor.Current)
        {
    
        }
      }
    }
    
    
    // search all edges within an extent
    //    this could include outside or edges attached to super nodes depending upon the extent
    ArcGIS.Core.Data.Analyst3D.TinEdgeFilter edgeFilterAll = new ArcGIS.Core.Data.Analyst3D.TinEdgeFilter();
    edgeFilterAll.FilterEnvelope = envelope;
    edgeFilterAll.DataElementsOnly = false;
    using (ArcGIS.Core.Data.Analyst3D.TinEdgeCursor edgeCursor = tinLayer.SearchEdges(edgeFilterAll))
    {
      while (edgeCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.TinEdge edge = edgeCursor.Current)
        {
        }
      }
    }
    
    
    // search for hard edges in the TIN
    var edgeFilter = new ArcGIS.Core.Data.Analyst3D.TinEdgeFilter();
    edgeFilter.FilterByEdgeType = true;
    edgeFilter.EdgeType = ArcGIS.Core.Data.Analyst3D.TinEdgeType.HardEdge;
    using (ArcGIS.Core.Data.Analyst3D.TinEdgeCursor edgeCursor = tinLayer.SearchEdges(edgeFilter))
    {
      while (edgeCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.TinEdge edge = edgeCursor.Current)
        {
    
        }
      }
    }
    
    
    // search for "inside" triangles in an extent
    ArcGIS.Core.Data.Analyst3D.TinTriangleFilter triangleFilter = new ArcGIS.Core.Data.Analyst3D.TinTriangleFilter();
    triangleFilter.FilterEnvelope = envelope;
    triangleFilter.DataElementsOnly = true;
    using (ArcGIS.Core.Data.Analyst3D.TinTriangleCursor triangleCursor = tinLayer.SearchTriangles(triangleFilter))
    {
      while (triangleCursor.MoveNext())
      {
        using (ArcGIS.Core.Data.Analyst3D.TinTriangle triangle = triangleCursor.Current)
        {
        }
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.2 or higher.
    See Also