Class DimensioningLink

GoDiagram®
v10.0.12
by Northwoods Software®

A custom routed Link for showing the distances between a point on one node and a point on another node.

Inheritance
DimensioningLink
Namespace: Northwoods.Go.Extensions
Assembly: DimensioningLinkWinForms.dll
public class DimensioningLink : Link, IHasContextMenu, IHasToolTip

Note that because this is a Link, the points being measured must be on Nodes, not simple Parts. The exact point on each Node is determined by the FromSpot and ToSpot.

Several properties of the DimensioningLink customize the appearance of the dimensioning:

  • Direction, for orientation of the dimension line and which side it is on,
  • Extension, for how far the dimension line is from the measured points,
  • Inset, for leaving room for a text label, and
  • Gap, for distance that the extension line starts from the measured points

Constructors

Constructs a DimensioningLink and sets the following properties:

Declaration
public DimensioningLink()

Properties

The general angle at which the measurement should be made.

Declaration
public double Direction { get; set; }
Property Value
Type Description
double

The default value is 0, meaning to go measure only along the X axis, with the dimension line and label above the two nodes (at lower Y coordinates). New values must be one of: 0, 90, 180, 270, or NaN. The value NaN indicates that the measurement is point-to-point and not orthogonal.

The distance at which the dimension line should be from the points being measured.

Declaration
public float Extension { get; set; }
Property Value
Type Description
float

The default value is 30. Larger values mean further away from the nodes. The new value must be greater than or equal to zero.

The distance that the extension lines should come short of the measured points.

Declaration
public float Gap { get; set; }
Property Value
Type Description
float

The default value is 10.

The distance that the dimension line should be indented from the ends of the extension lines that are orthogonal to the dimension line.

Declaration
public float Inset { get; set; }
Property Value
Type Description
float

The default value is 10.

Methods

Constructs a new route by modifying the Points.

Declaration
public override bool ComputePoints()
Returns
Type Description
bool

true if it computed a route of points

Overrides

This is only called by UpdateRoute(), when needed. All route points are always in document coordinates.

This method may be overridden. Please read the Introduction page on Extensions for how to override methods and how to call this base method.

Overrides of this method may call a number of "protected" methods in order to build the route: ClearPoints(), AddPoint(Point), InsertPoint(int, Point), RemovePoint(int), SetPoint(int, Point). Overrides of this method must not set Points.

Other methods that are commonly called and may be overridden are: ComputeEndSegmentLength(Node, GraphObject, Spot, bool), ComputeSpot(bool, GraphObject), ComputeOtherPoint(Node, GraphObject), ComputeCurve(), ComputeCurviness(), HasCurviness(), ComputeThickness(), MakeGeometry().

Implements