Sketcher helper constraint: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 1: Line 1:
[[Image:Sketcher helper constraint example1.png|thumb|500px|Example of a helper constraint (Constraint5 - point on object) for a tangent constraint (Constraint6; in tangent-via-point mode). Only one helper constraint is used in this case, since the point of tangency is the endpoint of ellipse's major diameter, which inherently lies on the ellipse.]]
[[Image:Sketcher helper constraint example1.png|thumb|500px|Example of a helper constraint (Constraint5 - point on circle) for a tangent constraint (Constraint6; in tangent-via-point mode). Only one helper constraint is used in this case, since the point of tangency is the endpoint of ellipse's major diameter, which inherently lies on the ellipse.]]


Helper constraint is a regular sketcher constraint that is needed as a part of a more complex constraint, but is exposed in user interface to assist dealing with redundancy. For example, for [[Constraint SnellsLaw|Snell's Law]] constraint, the two lines that represent rays of light need to be connected ([[Constraint PointOnPoint|coincident constraint]]), and the joint must lie on the interface ([[Constraint PointOnObject|Point On Object consraint]]).
Helper constraint is a regular sketcher constraint that is needed as a part of a more complex constraint, but is exposed in user interface to assist dealing with redundancy. For example, for [[Constraint SnellsLaw|Snell's Law]] constraint, the two lines that represent rays of light need to be connected ([[Constraint PointOnPoint|coincident constraint]]), and the joint must lie on the interface ([[Constraint PointOnObject|Point On Object consraint]]).

Revision as of 16:27, 14 January 2015

Example of a helper constraint (Constraint5 - point on circle) for a tangent constraint (Constraint6; in tangent-via-point mode). Only one helper constraint is used in this case, since the point of tangency is the endpoint of ellipse's major diameter, which inherently lies on the ellipse.

Helper constraint is a regular sketcher constraint that is needed as a part of a more complex constraint, but is exposed in user interface to assist dealing with redundancy. For example, for Snell's Law constraint, the two lines that represent rays of light need to be connected (coincident constraint), and the joint must lie on the interface (Point On Object consraint).

Helper constraints are added automatically when they are needed. The decision for if they are needed is currently made by evaluating the helper constraint error for current state of geometry (this may change in future versions). If the error is small enough, the constraint is considered to be unnecessary, and is not added. In some cases, this behavior can lead to errors (the constraint can be satisfied by accident, which can easily happen when Sketcher Grid Snapping is on).

If this happens (a helper constraint is missing, and the required conditions is not satisfied otherwise), the complex constraint will be broken. It will do something, but the actual behavior is undefined. Such a broken constraint can be repaired by adding the missing helper constraint manually.

Helper constraints are currently required for:

Helper constraints were introduced in v0.15.4387