Table of Contents

Enum CadSnapModes

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

The object snaps that may be taken, with AutoCAD's OSMODE values: Endpoint 1, Midpoint 2, Center 4, Node 8, Quadrant 16, Intersection 32, Insertion 64, Perpendicular 128, Tangent 256, Nearest 512, Geometric Center 1024, Apparent Intersection 2048, Extension 4096 and Parallel 8192, so that an OSMODE of 4133 reads as Endpoint, Center, Intersection and Extension.

[Flags]
public enum CadSnapModes

Fields

None = 0

None.

Endpoint = 1

The ends of lines, arcs and polyline segments, the corners of polylines and fills, and the base point of a RAY.

Midpoint = 2

The middle of a line, an arc or a polyline segment, and the root point of an XLINE, as AutoCAD takes it.

Center = 4

The centre of an arc or a circle.

Node = 8

A POINT object.

Quadrant = 16

The points of a circle or an arc at 0, 90, 180 and 270 degrees.

Intersection = 32

Where two objects cross.

Insertion = 64

The insertion point of a block, a text, an MTEXT or an attribute: taken near the point, or with the cursor anywhere on the object, as AutoCAD takes the base point of a block from any of its lines.

Perpendicular = 128

The foot of the perpendicular from the base point to an object: on a line or a straight segment of a polyline run on past its ends, as AutoCAD gives it; on an arc only where the arc runs.

Tangent = 256

Where a line from the base point touches a circle or an arc.

Nearest = 512

The point of an object nearest the cursor.

GeometricCenter = 1024

The centroid of the area a closed polyline holds, taken with the cursor on the polyline or near the centroid.

ApparentIntersection = 2048

Where two objects would cross if both ran on, lines as endless lines and arcs as whole circles: two under the cursor, or one clicked first (Extended Apparent Intersection) and one under the cursor after.

Extension = 4096

A point on the run of a line or an arc beyond an end the cursor rested on.

Parallel = 8192

A point on the line through the base point parallel to a line the cursor rested on.

All = Endpoint | Midpoint | Center | Quadrant | Intersection | Perpendicular | Tangent | Nearest

The eight snaps the presenter had first, Endpoint to Nearest; Node, GeometricCenter and the snaps after them are not in it, so that a set kept as "every snap but Nearest" takes the same points as before they came.