ReadOnlyPoint
Namespace: Digi21.DigiNG.Entities
Assembly: Digi21.DigiNG
Read-only point: an insertion coordinate and a rotation.
public class ReadOnlyPoint : Entity, ISnapable
Inheritance: Object → Entity → ReadOnlyPoint
Derived types: Point
Implements: ISnapable and, through inheritance, IWindow3D, ICloneable and IDisposable.
The class has no public constructors. Drawing files return points they read with this type, and IDrawingFile.Add(Point) returns the added point with this type. To obtain a modifiable point, use Clone or create a Point.
Other members (codes, colors, attributes, minimum and maximum coordinates, Dispose…) are inherited from Entity.
Properties
| Member | Description |
|---|---|
Point3D Coordinate { get; } |
Insertion coordinate. |
double Rotation { get; } |
Symbol rotation, in degrees, counterclockwise from the X axis. |
Methods
| Member | Description |
|---|---|
Point Clone() |
Returns a modifiable copy of the point, without a drawing file. |
Point3D Distance(Point3D coordinate) |
Returns Coordinate - coordinate: the vector from coordinate to the point, including the Z difference. |
double NearestVertex(Point3D coordinate, out Point3D nearestVertex, out int vertex) |
Returns the point's coordinate in nearestVertex and 0 in vertex. Returns the XY plane distance between coordinate and the point. |
double NearestSegment(Point3D coordinate, out Point3D calculatedCoordinate, out int segment) |
Same result as NearestVertex: calculatedCoordinate is the point's coordinate, segment is 0, and the return value is the XY plane distance. |
string ToString() |
Returns the entity type, minimum and maximum coordinates, codes, coordinate and rotation in the Digi3D.AI interface language. |
Example
The Point example reads the properties of the ReadOnlyPoint returned by BinDouble.Add and modifies a copy obtained with Clone. The ISnapable example uses NearestVertex, NearestSegment and Distance with a point.