Table of Contents

Method Lengthen

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Lengthen(CadDocument, string, int, GeoPoint2)

Lengthens or shortens a line or an arc at one end, as the Lengthen item of the menu of an end grip does, one undo step. A line's end goes to where the point falls along the line's own way, the other end and the way kept: a line from (0, 0) to (100, 0) lengthened at its end by (150, 40) runs to (150, 0). An arc's end goes round the arc to the angle the point has from the centre, the centre, the radius and the other end kept: an arc of radius 50 from 0 to 90 degrees lengthened at its end by (-10, 30) ends at the angle of that point, 108.4 degrees.

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

Parameters

document CadDocument

The document.

handle string

The handle of the line or the arc.

gripIndex int

The index of the grip at the start (0) or the end (1) of the line or the arc, as Of(DxfEntity) gives it.

point GeoPoint2

The point the end is taken to, in drawing units.

Returns

CadEditResult

What came of it: refused for an object on a locked layer, no line or arc, a grip that is not an end, or a point that would leave the line no length or the arc no sweep.

Exceptions

ArgumentNullException

Thrown when the document is null.