Selecting from Multiple Solutions

When a well-constrained sketch is sent to the constraint solver component of the profile editor, a single solution is displayed on return. However, in general, geometric constraint problems have more than one solution. These solutions arise as different roots of the equations that were solved in obtaining the solutions. Thus solution selection is technically a matter of identifying the particular roots to use. Our solver, like most such programs, uses certain heuristics to decide which solution to display. However, unlike other geometric constraint solvers, our solver also allows the user to interactively select from all possible solutions the one which the user desires.

Solution Selection Heuristics

Three Points

        
            Figure 1   

Consider placing three points, p1, p2, and p3 relative to each other, given the respective distances between points. Arbitrarily place p1 and p2 with respect to each other. There are then zero, one, or two solutions for p3. If there are two solutions for p3, maintain the original orientation of p3 with respect to the line p1 p2 oriented from p1 to p2.


One Line and Two Points

        
            Figure 2   

The line is oriented, and the points, p1 and p2, are kept on the same side(s) of the line as they were in the original sketch. Furthermore, we preserve the orientation of the vector p1 p2 with respect to the line orientation by preserving the sign of the inner product with the line tangent vector. Thus in Figure 2, the correct solution is the filled point p2 on the right, rather than the open point p2(alt) on the left.


Two Lines and One Point

        
            Figure 3   

When placing a point relative to two lines, one of four possible locations is selected based on the quadrant of the oriented lines in which the point lies in the original sketch. Note that the line orientation permits an unambiguous specification of the angle between the lines.


Tangent Arc

        
            Figure 4   

There are two types of tangency possible between an arc and a segment. These two variations are shown in Figure 4. An arc tangent to two line segments will be centered such that the arc subtended preserves the type of tangency. Moreover, the center will be placed such that the smaller of the two arcs possible is chosen, ties broken by placing the center on the same side of the two segments as in the input sketch.


All rules except the tangency rule are mutually exclusive. They are therefore applicable without interference. The tangency rule could contradict the other rules, because dimensioned arcs and circles are determined by placing the center. In such cases, the tangency rule takes precedence. In our experiments with these rules, we found that most situations are easy to understand for the user and therefore the sketch is solved as the user would expect. When the sketch is not solved as the user desired, our interactive user interface allows the user to select from different solutions.

Overview