Table of Contents

Method RemoveVertex

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

RemoveVertex(CadDocument, string, int)

Takes a vertex out of a polyline, as the Remove Vertex item does, one undo step: the segment that now joins its two neighbours is straight, even where the segments either side of the vertex were arcs. A polyline of two vertices keeps them, as AutoCAD keeps them; a closed one of three leaves two. A spline keeps two fit points, or as many control points as its degree and one.

public static CadEditResult RemoveVertex(CadDocument document, string handle, int gripIndex)

Parameters

document CadDocument

The document.

handle string

The handle of the polyline.

gripIndex int

The index of the vertex grip, as Of(DxfEntity) gives it.

Returns

CadEditResult

What came of it: refused for an object on a locked layer, a grip that is not a vertex, or a polyline of two vertices.

Exceptions

ArgumentNullException

Thrown when the document is null.