Development
Design-Core is built on a geometry engine centred around the Point class.
As well as representing a 2D coordinate, Point provides a set of vector
mathematics methods used throughout the codebase — in entity construction,
snapping, trimming, dimension placement, and more.
This section documents the more advanced methods, explaining the underlying mathematics and describing where each is used within Design.
Vector Methods
Method |
Summary |
|---|---|
Scalar measure of how much two vectors point in the same direction. Returns positive, zero, or negative based on the angle between them. |
|
Signed area of the parallelogram formed by two vectors. Indicates the turn direction (clockwise or counter-clockwise) from one vector to another. |
|
Linear interpolation between two points at a fractional position \(t \in [0, 1]\) along the segment. |
|
Rotates a point about a centre by an angle in radians using the 2D rotation matrix. |
|
Moves a point along a bearing (angle in radians) by a given distance. |
|
Finds the foot of the perpendicular from a point onto an infinite line defined by two points. |
|
Scalar value stored on a polyline vertex that encodes an arc segment. Covers the sign convention, radius formula, and centre-point derivation. |