ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Geometry Namespace / Multipatch Class / GetPatchNormal Method
The index of the patch. Must be greater than or equal to zero and less than PartCount.
The index of the point relative to the patch. Must be greater than or equal to zero and less than the value returned from GetPatchPointCount.
Example

In This Topic
    GetPatchNormal Method
    In This Topic
    Gets the normal coordinate for the specified patch (part) at the point index.
    Syntax
    Public Function GetPatchNormal( _
       ByVal patchIndex As Integer, _
       ByVal pointIndex As Integer _
    ) As Coordinate3D
    public Coordinate3D GetPatchNormal( 
       int patchIndex,
       int pointIndex
    )

    Parameters

    patchIndex
    The index of the patch. Must be greater than or equal to zero and less than PartCount.
    pointIndex
    The index of the point relative to the patch. Must be greater than or equal to zero and less than the value returned from GetPatchPointCount.

    Return Value

    The coordinate representing the normal.
    Exceptions
    ExceptionDescription
    The patch index must be >= 0.
    The patch index must be less than the number of patches (parts) in the multipatch.
    The point index must be >= 0.
    The point index must be less than the number of points in the patch. See GetPatchPointCount
    This multipatch does not have normals.
    Remarks
    The normals of a 3D object are used for lighting. They define the direction that each face will reflect light. They are usually perpendicular to the geometry but can also be defined in other directions.

    Cube with Normals

    Example
    Get the normal coordinate of a multipatch
    {
      if (multipatch.HasNormals)
      {
        int patchIndex = 0;
        // If the multipatch has normals, then the number of normals is equal to the number of points.
        int numNormals = multipatch.GetPatchPointCount(patchIndex);
    
        for (int pointIndex = 0; pointIndex < numNormals; pointIndex++)
        {
          Coordinate3D normal = multipatch.GetPatchNormal(patchIndex, pointIndex);
    
          // Do something with the normal coordinate.
        }
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also