SnapPoint

public sealed class SnapPoint : ISnapElement
Implement ISnapElement for individual points.

Constructors

SnapPoint

#
public SnapPoint(double x, double y, double radius, string description = null)
Create a new snap point.
x (double)X-coordinate.
y (double)Y-coordinate.
radius (double)Snapping radius.
description (string = null)Optional point description.

Properties

Description

#
public string Description { get; }
Gets the description for this snapping point.

Disjoint

#
public bool Disjoint { get; }
Gets whether this element consists of multiple disjoint pieces.

Projection

#
public SnapProjection Projection { get; }
Gets the type of projection for this element.
Projection

Radius

#
public double Radius { get; }
Gets the radius within which this element is active.
Radius

X

#
public double X { get; }
Gets the x-coordinate.

Y

#
public double Y { get; }
Gets the x-coordinate.

Methods

DistanceTo

#
public double DistanceTo(double x, double y)
Compute the distance from a coordinate to this element.
x (double)X coordinate.
y (double)Y coordinate.
Minimum distance from the coordinate to this element.

Project

#
public bool Project(double x, double y, bool limitToRadius, out double xʹ, out double yʹ, out string description)
x (double)
y (double)
limitToRadius (bool)
xʹ (out double)
yʹ (out double)
description (out string)
Project