ArcGIS Pro 2.8 API Reference Guide
GetNormalsAtM Method (GeometryEngine)
Example 

ArcGIS.Core.Geometry Namespace > GeometryEngine Class : GetNormalsAtM Method
The multipart containing the M values. If the multipart is a polygon, then the boundary is used.
The M value at which to construct the normal line.
The length of the normal line. A positive value means the normal lines are on the right side of the multipart. A negative value means the normal lines are on the left side of the multipart.
Gets the line segments corresponding to the normal at the locations along the geometry where the specified M occurs.
Syntax
public Polyline GetNormalsAtM( 
   Multipart multipart,
   double m,
   double length
)
Public Function GetNormalsAtM( _
   ByVal multipart As Multipart, _
   ByVal m As Double, _
   ByVal length As Double _
) As Polyline

Parameters

multipart
The multipart containing the M values. If the multipart is a polygon, then the boundary is used.
m
The M value at which to construct the normal line.
length
The length of the normal line. A positive value means the normal lines are on the right side of the multipart. A negative value means the normal lines are on the left side of the multipart.

Return Value

A polyline. Each part of the polyline is a normal line.
Exceptions
ExceptionDescription
Multipart is null or empty.
This geometry is not M-Aware.
Spatial reference of multipartis an image coordinate system.
Example
IList<MapPoint> inPoints = new List<MapPoint>()
{
  MapPointBuilder.CreateMapPoint(-3000, -2000, 0, 100),
  MapPointBuilder.CreateMapPoint(-3000, 0, 0, 200),
  MapPointBuilder.CreateMapPoint(-1000, 0, 0, 300),
  MapPointBuilder.CreateMapPoint(-1000, 2000, 0, 100),
  MapPointBuilder.CreateMapPoint(3000, 2000, 0, 200),
  MapPointBuilder.CreateMapPoint(3000, 0, 0, 300),
  MapPointBuilder.CreateMapPoint(1000, 0, 0, 100),
  MapPointBuilder.CreateMapPoint(1000, -2000, 0, 200),
  MapPointBuilder.CreateMapPoint(-3000, -2000, 0, 300)
};

Polygon polygon = PolygonBuilder.CreatePolygon(inPoints);
// polygon.HasM = true

Polyline polyline = GeometryEngine.Instance.GetNormalsAtM(polygon, 150, 100);
// polyline.PartCount = 5
// polyline.PointCount = 10
// polyline.HasM = false

ReadOnlyPartCollection parts = polyline.Parts;
ReadOnlySegmentCollection segments = parts[0];
LineSegment line = segments[0] as LineSegment;
// line.StartCoordinate = (-3000, -1000)
// line.EndCoordinate = (-2900, -1000)

segments = parts[1];
line = segments[0] as LineSegment;
// line.StartCoordinate = (-1000, 1500)
// line.EndCoordinate = (-900, 1500)

segments = parts[2];
line = segments[0] as LineSegment;
// line.StartCoordinate = (1000, 2000)
// line.EndCoordinate = (1000, 1900)

segments = parts[3];
line = segments[0] as LineSegment;
// line.StartCoordinate = (1500, 0)
// line.EndCoordinate = (1500, 100)

segments = parts[4];
line = segments[0] as LineSegment;
// line.StartCoordinate = (1000, -1000)
// line.EndCoordinate = (900, -1000)
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

GeometryEngine Class
GeometryEngine Members