GoDiagram is currently in beta -- See here for details, or contact us if you have questions or feedback.

Class SpiralLayout

GoDiagram
v10.0.0-beta3
by Northwoods Software®

A custom Layout that lays out a chain of nodes in a spiral.

Inheritance
System.Object
SpiralLayout
Namespace: Northwoods.Go.Layouts.Extensions
Assembly: SpiralWinForms.dll
Syntax
public class SpiralLayout : NetworkLayout<SpiralNetwork, SpiralVertex, SpiralEdge, SpiralLayout>
Remarks

This layout assumes the graph is a chain of Nodes, Spacing controls the spacing between nodes.

If you want to experiment with this extension, try the Spiral Layout sample.

Constructors

SpiralLayout()

Create a Spiral Layout.

Declaration
public SpiralLayout()

Properties

Clockwise

Gets or sets whether the spiral should go clockwise or counter-clockwise.

Declaration
public bool Clockwise { get; set; }
Property Value
Type Description
System.Boolean
Remarks

The default value is true.

Radius

Gets or sets the radius distance.

Declaration
public double Radius { get; set; }
Property Value
Type Description
System.Double
Remarks

The default value is NaN.

Spacing

Gets or sets the spacing between nodes.

Declaration
public double Spacing { get; set; }
Property Value
Type Description
System.Double
Remarks

The default value is 100.

Methods

Diameter(SpiralVertex)

Compute the effective diameter of a Node.

Declaration
public static double Diameter(SpiralVertex v)
Parameters
Type Name Description
SpiralVertex v
Returns
Type Description
System.Double

DoLayout(IEnumerable<Part>)

This method actually positions all of the Nodes, assuming that the ordering of the nodes is given by a single link from one node to the next.

Declaration
public override void DoLayout(IEnumerable<Part> coll = null)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Part> coll
Overrides
Remarks

This respects the Spacing property to affect the layout.