ArcObjects Library Reference (Geometry)  

IGeometryServer2.Cut Method

Cuts the target polyline or polygon Cutter.

[Visual Basic .NET]
Public Function Cut ( _
    ByVal pSR As ISpatialReference, _
    ByVal pTargets As IGeometryArray, _
    ByVal pCutter As IPolyline, _
    ByRef ppCutIndexes As ILongArray _
) As IGeometryArray
[C#]
public IGeometryArray Cut (
    ISpatialReference pSR,
    IGeometryArray pTargets,
    IPolyline pCutter,
    ref ILongArray ppCutIndexes
);
[C++]
HRESULT Cut(
  ISpatialReference* pSR,
  IGeometryArray* pTargets,
  IPolyline* pCutter,
  ILongArray** ppCutIndexes,
  IGeometryArray** ppCutPiecesGA
);
[C++]

Parameters

pSR

  pSR is a parameter of type ISpatialReference

pTargets

  pTargets is a parameter of type IGeometryArray

pCutter

  pCutter is a parameter of type IPolyline

ppCutIndexes [out]

  ppCutIndexes is a parameter of type ILongArray

ppCutPiecesGA [out, retval]

  ppCutPiecesGA is a parameter of type IGeometryArray

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

The target of the cut operation may be either a polyline or a polygon.

When it is a polyline, it is split where it intersects the cutter polyline. Each piece is classified as ‘left of’ or ‘right of’ the cutter. This classification is based on the orientation of the cutter line. The left pieces are returned in the first element of the output array and the right pieces are returned in the second element. Parts of the target polyline that do not intersect the cutting polyline are discarded. Figure below shows an example. The orientation of the cutter line is indicated with a red arrowhead. Notice that a polyline part is also cut when the cutter line just touches it (as opposed to crossing it). The lower right input part was not included in the output because it did not intersect the cutting line. The cutting line can also have multiple parts. The left/right decision is made per part.

Cut1

The next figure shows an example of a cutting operation with a multipart cutting polyline. The orientation of each cutting part is shown with a red arrowhead. The ‘left’ result has been requested and is shown in the right box of the figure.

Cut2

When the target is a polygon, the left/right classification it not done. The polygon pieces are returned in order of ascending area. In the figure below, the first cut part returned is to the right of the oriented cutting line, but it has the smallest area. Input parts that do not intersect the cutting line are discarded. The cutting line can be multi-part.  See figure below.

Cut3

See Also

IGeometryServer2 Interface