Table of Contents

Method ConvertToArc

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

ConvertToArc(CadDocument, string, int, GeoPoint2)

Makes a straight segment of a polyline an arc through a point, as the Convert to Arc item does, one undo step: the arc from the segment's start through the point to its end. A chord of 100 with the point 20 off its middle is a bulge of 0.4 (the sagitta over half the chord), above nought where the point is to the right of the way the segment runs.

public static CadEditResult ConvertToArc(CadDocument document, string handle, int gripIndex, GeoPoint2 point)

Parameters

document CadDocument

The document.

handle string

The handle of the polyline.

gripIndex int

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

point GeoPoint2

The point the arc passes through, in drawing units.

Returns

CadEditResult

What came of it: refused for an object on a locked layer, a grip that is not the middle of a straight segment, or a point in line with the segment.

Exceptions

ArgumentNullException

Thrown when the document is null.