ConstraintSystem

References
public sealed class ConstraintSystem
A constraint system.

Constructors

ConstraintSystem

#
Create a new, empty system.
public ConstraintSystem()

Properties

ConstructionEdges

#
Iterate over all construction edges.
public IEnumerable<Edge> ConstructionEdges { get; }

EdgeCount

#
Gets the number of edges in this system.
public int EdgeCount { get; }

EdgeCurves

#
Iterate over all edges. This enumerates either returns Lines, Circles or Arcs.
public IEnumerable<(Curve curve, bool construction)> EdgeCurves { get; }

Edges

#
Iterate over all edges.
public IEnumerable<Edge> Edges { get; }

GoalCount

#
Gets the number of goals in this system.
public int GoalCount { get; }

Goals

#
Iterate over all goals.
public IEnumerable<Goal> Goals { get; }

NodeCount

#
Gets the number of nodes in this system.
public int NodeCount { get; }

Nodes

#
Iterate over all edges.
public IEnumerable<Node> Nodes { get; }

PrimaryEdges

#
Iterate over all primary edges.
public IEnumerable<Edge> PrimaryEdges { get; }

ScalarCount

#
Gets the number of scalars in this system.
public int ScalarCount { get; }

Methods

Add

#
Add one or more edges to this system.
public ConstraintSystem Add(
params Edge[]
edges
)

Add

#
Add one or more goals to this system.
public ConstraintSystem Add(
params Goal[]
goals
)

Add

#
Add one or more nodes to this system.
public ConstraintSystem Add(
params Node[]
nodes
)

Add

#
Add one or more nodes to this system.
public ConstraintSystem Add(
params Scalar[]
scalars
)

BoundingBox

#
Gets the bounding box containing all nodes and edges.
public bool BoundingBox(
out double
x0,
out double
x1,
out double
y0,
out double
y1
)

Constants

#
Gets all the named constants in this system.
public int Constants(
out string[]
numbers,
out string[]
points
)

Deviation

#
Measure the deviation between two systems.
public double Deviation()

EdgeAt

#
Gets the node at the given index.
public Edge EdgeAt(
index
)

EdgeAt

#
Find the edge at the given location.
public int EdgeAt(
location,
Location
radius,
Search radius.
out Edge
edge
Edge at or near location.
)
Index of edge.

EdgeCurve

#
Create the curve which matches the edge shape. This method will either return null if the edge nodes cannot be found, a Rhino.Geometry.Line, Rhino.Geometry.Circle or Rhino.Geometry.Arc.
public Curve EdgeCurve(
Edge
edge
)

EdgeLength

#
Measure the length of an edge.
public double EdgeLength(
Edge
edge
)

EdgeRadius

#
Measure the radius of an edge.
public double EdgeRadius(
Edge
edge
)

FindEdge

#
Find the edge with the given id.
public int FindEdge(
id,
out Edge
edge
)

FindNode

#
Find the node with the given id.
public int FindNode(
id,
out Node
node
)

FindScalar

#
Find the scalar with the given id.
public int FindScalar(
id,
out Scalar
scalar
)

GoalAt

#
Gets the goal at the given index.
public Goal GoalAt(
index
)

Iterate

#
Perform a solver iteration and create a new constraint system.
public ConstraintSystem Iterate(
resolver,
token,
out double
deviation
)

MoveNamedPoints

#
Move all fixed and named points to new location.
public ConstraintSystem MoveNamedPoints(
resolver,
Resolver for names?
dragFreePoints
If true, free points are dragged along with fixed points.
)

NodeAt

#
Find the node at the given location.
public int NodeAt(
location,
Location
radius,
Search radius.
out Node
node
Node at or near location.
)
Index of node.

NodeAt

#
Gets the node at the given index.
public Node NodeAt(
index
)

Remove

#
Remove all elements with matching identifiers from the system. Note that this will also remove any related elements which rely on any of the removed objects. If you want to switch out elements, he correct methodology is not to remove the old ones and add new ones, but rather to replace the elements.
public ConstraintSystem Remove(
params Guid[]
identifiers
)

ReplaceGoalValue

#
Replace the value of a goal.
public ConstraintSystem ReplaceGoalValue(
goalId,
value
)

ReplaceNodes

#
Replace nodes in this system with nodes from the supplied list when their Ids match.
public ConstraintSystem ReplaceNodes(
newNodes
Replacement nodes.
)
Modified system.

ScalarAt

#
Gets the scalar at the given index.
public Scalar ScalarAt(
index
)

ToggleEdgeConstruction

#
Toggle the construction state of the edge at the given index.
public ConstraintSystem ToggleEdgeConstruction(
index
)

ToggleNodeFixing

#
Toggle the fixed state of the node at the given index.
public ConstraintSystem ToggleNodeFixing(
index
)