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
indexPickIndexThe index of the space under the cursor.
cursorGeoPoint2The cursor, in drawing units.
aperturedoubleHow near a snap point or object must come, in drawing units: the aperture in pixels divided by the view's pixels per unit.
basePointGeoPoint2?The point the rubber band is drawn from, which perpendicular, tangent, ortho and polar work from; null for none.
drawnFromGeoPoint2?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.