Constructors

Goal

#
protected Goal(Nomen nomen, IIcon icon, params Edge[] referencedEdges)
nomen (Nomen)
icon (IIcon)
referencedEdges (params Edge[])

Fields

_edges

#
protected readonly Edge[] _edges

Properties

EdgeCount

#
public int EdgeCount { get; }
Gets the number of edges this goal is associated with.

Icon

#
public IIcon Icon { get; }
Gets the icon of this goal.

Id

#
public Guid Id { get; }
Gets the id of this goal.

Nomen

#
public Nomen Nomen { get; }
Gets the description of this goal.

Methods

Apply

#
public abstract bool Apply(IIteration iteration)
Apply this constraint to a system.
iteration (IIteration)Constraint system iteration within which to solve this goal.
Success state.

DependsOnId

#
public bool DependsOnId(Guid nodeId)
Test whether this goal depends on a specific node or scalar id.
nodeId (Guid)

Edge

#
public Edge Edge(int index)
Gets the referenced edge at the given index.
index (int)

RemoveReferents

#
public virtual Goal RemoveReferents(HashSet<Guid> map)
Return a modified goal in response to the removal of node or edge referents. By default this method will return null if one of the referenced edges occurs in the map.
map (HashSet<Guid>)

SolveAlign

#
public static bool SolveAlign(Node a, Node b, Vector2d direction, out Point2d aa, out Point2d bb)
Alignment solver for two nodes.
a (Node)
b (Node)
direction (Vector2d)
aa (out Point2d)
bb (out Point2d)

SolveAlign

#
public static bool SolveAlign(ref Point2d a, ref Point2d b, Vector2d direction, Point2d? anchor = null)
Align two points along a direction.
a (ref Point2d)First point.
b (ref Point2d)Second point.
direction (Vector2d)Direction.
anchor (Point2d? = null)Optional fixed point.

SolveArcArcTangent

#
public static bool SolveArcArcTangent(Node a, Node b, Scalar x, Node c, Node d, Scalar y, out Point2d aa, out Point2d bb, out double xx, out Point2d cc, out Point2d dd, out double yy)
Align two arcs tangentially.
a (Node)
b (Node)
x (Scalar)
c (Node)
d (Node)
y (Scalar)
aa (out Point2d)
bb (out Point2d)
xx (out double)
cc (out Point2d)
dd (out Point2d)
yy (out double)

SolveArcCoincidence

#
public static bool SolveArcCoincidence(ref Point2d p, ref Point2d a, ref Point2d b, ref double bulge, bool fixP, bool fixA, bool fixB)
Solve coincidence constraint between a point and an arc.
p (ref Point2d)
a (ref Point2d)
b (ref Point2d)
bulge (ref double)
fixP (bool)
fixA (bool)
fixB (bool)

SolveArcLength

#
public static bool SolveArcLength(Node a, Node b, double bulge, double length, out Point2d aa, out Point2d bb, out double cc)
Solve arc length constraint.
a (Node)
b (Node)
bulge (double)
length (double)
aa (out Point2d)
bb (out Point2d)
cc (out double)

SolveArcRadius

#
public static bool SolveArcRadius(Node a, Node b, double bulge, double radius, out Point2d aa, out Point2d bb, out double cc)
Solve an arc radius constraint.
a (Node)
b (Node)
bulge (double)
radius (double)
aa (out Point2d)
bb (out Point2d)
cc (out double)

SolveCircleCircleTangent

#
public static bool SolveCircleCircleTangent(Node a, Node b, Node c, Node d, out Point2d aa, out Point2d bb, out Point2d cc, out Point2d dd)
Align two circles tangentially.
a (Node)
b (Node)
c (Node)
d (Node)
aa (out Point2d)
bb (out Point2d)
cc (out Point2d)
dd (out Point2d)

SolveCircleCoincidence

#
public static bool SolveCircleCoincidence(ref Point2d p, ref Point2d c, ref Point2d r, bool fixP, bool fixC, bool fixR)
Solve coincidence constraint between a point and a circle.
p (ref Point2d)
c (ref Point2d)
r (ref Point2d)
fixP (bool)
fixC (bool)
fixR (bool)

SolveCircumference

#
public static bool SolveCircumference(Node a, Node b, double circumference, out Point2d aa, out Point2d bb)
Solve circumference constraints on two circle nodes.
a (Node)
b (Node)
circumference (double)
aa (out Point2d)
bb (out Point2d)

SolveCollinear

#
public static bool SolveCollinear(Node a, Node b, Node c, Node d, out Point2d aa, out Point2d bb, out Point2d cc, out Point2d dd)
Solve collinearity between four nodes.
a (Node)
b (Node)
c (Node)
d (Node)
aa (out Point2d)
bb (out Point2d)
cc (out Point2d)
dd (out Point2d)

SolveCollinear

#
public static bool SolveCollinear(ref Point2d a, ref Point2d b, ref Point2d c, ref Point2d d, Point2d? anchor1 = null, Point2d? anchor2 = null)
Align four points along their shared direction.
a (ref Point2d)First point.
b (ref Point2d)Second point.
c (ref Point2d)Third point.
d (ref Point2d)Fourth point.
anchor1 (Point2d? = null)Optional first fixed point.
anchor2 (Point2d? = null)Optional second fixed point.

SolveDistance

#
public static bool SolveDistance(Node a, Node b, double separation, out Point2d aa, out Point2d bb)
Separation solver for two nodes.
a (Node)
b (Node)
separation (double)
aa (out Point2d)
bb (out Point2d)

SolveDistance

#
public static bool SolveDistance(ref Point2d a, ref Point2d b, double separation, Point2d? anchor)
Move two points to ensure a specific distance between them.
a (ref Point2d)First point.
b (ref Point2d)Second point.
separation (double)Distance.
anchor (Point2d?)Optional fixed point.

SolveHeight

#
public static bool SolveHeight(Node a, Node b, double verticalSeparation, out Point2d aa, out Point2d bb)
Solve (signed) vertical separation between two nodes.
a (Node)
b (Node)
verticalSeparation (double)
aa (out Point2d)
bb (out Point2d)

SolveHorizontal

#
public static bool SolveHorizontal(Node a, Node b, out Point2d aa, out Point2d bb)
Solve a horizontality constraint between two nodes.
a (Node)
b (Node)
aa (out Point2d)
bb (out Point2d)

SolveLineArcTangent

#
public static bool SolveLineArcTangent(Node a, Node b, Node c, Node d, Scalar x, out Point2d aa, out Point2d bb, out Point2d cc, out Point2d dd, out double xx)
Align a line and an arc tangentially.
a (Node)
b (Node)
c (Node)
d (Node)
x (Scalar)
aa (out Point2d)
bb (out Point2d)
cc (out Point2d)
dd (out Point2d)
xx (out double)

SolveLineCircleTangent

#
public static bool SolveLineCircleTangent(Node a, Node b, Node c, Node r, out Point2d aa, out Point2d bb, out Point2d cc, out Point2d rr)
Align a line and a circle tangentially.
a (Node)
b (Node)
c (Node)
r (Node)
aa (out Point2d)
bb (out Point2d)
cc (out Point2d)
rr (out Point2d)

SolveLineCoincidence

#
public static bool SolveLineCoincidence(ref Point2d p, ref Point2d a, ref Point2d b, bool fixP, bool fixA, bool fixB, bool infinite)
Solve coincidence constraint between a point and a line.
p (ref Point2d)
a (ref Point2d)
b (ref Point2d)
fixP (bool)
fixA (bool)
fixB (bool)
infinite (bool)

SolvePerpendicular

#
public static bool SolvePerpendicular(Node a, Node b, Node c, Node d, out Point2d aa, out Point2d bb, out Point2d cc, out Point2d dd)
Align four points perpendicularly.
a (Node)
b (Node)
c (Node)
d (Node)
aa (out Point2d)
bb (out Point2d)
cc (out Point2d)
dd (out Point2d)

SolvePerpendicular

#
public static bool SolvePerpendicular(ref Point2d a, ref Point2d b, ref Point2d c, ref Point2d d, bool fixA, bool fixB, bool fixC, bool fixD)
Align four points perpendicularly.
a (ref Point2d)
b (ref Point2d)
c (ref Point2d)
d (ref Point2d)
fixA (bool)
fixB (bool)
fixC (bool)
fixD (bool)

SolveVertical

#
public static bool SolveVertical(Node a, Node b, out Point2d aa, out Point2d bb)
Solve a verticality constraint between two nodes.
a (Node)
b (Node)
aa (out Point2d)
bb (out Point2d)

SolveWidth

#
public static bool SolveWidth(Node a, Node b, double horizontalSeparation, out Point2d aa, out Point2d bb)
Solve (signed) horizontal separation between two nodes.
a (Node)
b (Node)
horizontalSeparation (double)
aa (out Point2d)
bb (out Point2d)