Table of Contents

Method Snap

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Snap(PickIndex, GeoPoint2, double, GeoPoint2?, GeoPoint2?)

Gets the point a click at the cursor takes.

public CadSnapResult Snap(PickIndex index, GeoPoint2 cursor, double aperture, GeoPoint2? basePoint = null, GeoPoint2? drawnFrom = null)

Parameters

index PickIndex

The index of the space under the cursor.

cursor GeoPoint2

The cursor, in drawing units.

aperture double

How near a snap point or object must come, in drawing units: the aperture in pixels divided by the view's pixels per unit.

basePoint GeoPoint2?

The point the rubber band is drawn from, which perpendicular, tangent, ortho and polar work from; null for none.

drawnFrom GeoPoint2?

The point perpendicular and tangent are drawn from where there is no base point, as a dimension's first origin draws them from the last point (SnapFrom); null for none.

Returns

CadSnapResult

The point and the snap that gave it.

Exceptions

ArgumentNullException

Thrown when the index is null.