Elsevier

Advances in Engineering Software

Volume 41, Issues 10–11, October–November 2010, Pages 1187-1194
Advances in Engineering Software

A 2D geometric constraint solver using a graph reduction method

https://doi.org/10.1016/j.advengsoft.2010.07.008Get rights and content

Abstract

Modeling by constraints enables users to describe shapes by specifying relationships between geometric elements. These relationships are called constraints. A constraint solver derives then automatically the design intended by exploiting these constraints. The constraints solvers can be classified in four categories: symbolic, numerical, rule-oriented and graph-constructive solvers. The graph constructive approach is widely used in recent Computer Aided Design (CAD) systems. In this paper, we present a decomposition–recombination (DR) planning algorithm, called S-DR, that uses a graph reduction method to solve systems of 2D geometric constraints. Based on the key concept of skeletons, S-DR planner figures out a plan for decomposing a well constrained system into small sub-systems and recombines the solutions of these sub-systems to derive the solution of the entire system.

Introduction

Geometric constraint solving has applications in many different fields, such as Computer Aided Design (CAD), molecular modeling, tolerance analysis, and geometric theorem proving. Geometric modeling by constraints enables users to describe shapes by specifying a rough sketch and adding to it geometric constraints, i.e. a set of required relations between geometric elements. The constraint solver must derive automatically the correct shape needed. Typically, in 2D, geometric modeling by constraints specifies geometrical objects such as points, lines, circles, conics by a set of constraints: distances between points, points and lines, parallel lines, angles between lines, incidence relations between points and lines, points and circles, tangency relations between lines and circles or between circles.

Many resolution methods have been proposed for solving systems of geometric constraints. We classify the resolution methods in four broad categories: symbolic, numerical, rule-oriented and graph-constructive solvers.

In symbolic methods, the constraints are translated into a system of equations. Methods such as Gröbner bases or elimination with resultants are applied to find symbolic expressions for the solutions. These methods are “extremely” time consuming. They are typically exponential in time and space (see [4], [15]). They can be used only for small systems.

Numerical methods (Newton–Raphson’s iteration, homotopy, Gaussian elimination and so on) for solving systems of equations are O(n3) or worse (see [3], [17], [23], [26]). Most numerical methods have difficulties for handling over- and under-constrained schemes. Some systems use a preprocess treatment to decompose the system of equations before launching the numerical solver (see [1], [26]). We can also mention the use of Cayley–Menger determinants to yield simpler algebraic systems (see [21], [31], [32]). Other approaches optimize the resolution process by pruning the solutions space (see [25]). Foufou et al. [7] used efficient numerical methods to solve systems of constraints.

Rule-based solvers rely on the predicates formulation (see [28], [29], [30]). Although they provide a qualitative study of geometric constraints, the “huge” amount of computations needed (exhaustive searching and matching) makes them inappropriate for real world applications.

Graph-constructive solvers are stemming from graph theory. They are based on the analysis of the structure of the constraint graph. The graph constructive approach provides means for developing sound and efficient algorithms (see [2], [6], [9], [11], [13], [14], [18], [19], [20], [22], [24], [27], [33]).

A decomposition–recombination (DR) planner, as defined by Hoffman et al. [12], figures out a plan for decomposing a constraint system into small sub-systems and recombines the solutions of these sub-systems to derive the solution of the entire system. DR planners should have desirable properties such as solvability preserving, Church–Rosser property and completeness [12].

In this paper, we describe a decomposition–recombination planning method based on skeletons called S-DR algorithm that uses a graph based reduction method to solve systems of geometric constraints.

During the decomposition phase, the constraint solver develops a plan to decompose the constraint graph into small sub-systems. A sequence of constructions steps is derived. During the recombination phase, an evaluation of the constructions steps (recombining solutions of the sub-systems) is made to derive the shape needed.

This paper is organized as follows. The graph representation of the constraint problem is explained in Section 2. We present in Section 3, the core algorithm that handles structurally well constrained problems. In Section 4, we briefly compare our method with commonly used comparable methods. Section 5 gives conclusions.

Section snippets

Graph representation

Geometric modeling by constraints enables users to describe geometric elements such as points, lines, circles, line segments and circular arcs by a set of required relationships. Typical set of constraints consists of distance, angle, incidence, tangency, parallelism and perpendicularity relationships between geometric elements (see [5]). With some pre-processing, the geometric elements are reduced to points and lines, and the constraints to those of distance and angle (see [8]).

In this paper,

Constraints solving

A DR planner, that uses the constraint graph, proceeds by finding a sequence of graphs Gi (G1, G2, …, Gk). G1 is the initial constraint graph G. Every Gi containing well constrained sub-graphs (clusters) is simplified into a graph Gi+1 = Ti(Gi) where transformation Ti is called simplifier map operating on Gi. If the constraint graph G is structurally well constrained, then the process terminates when the graph Gk cannot be simplified further. We will often use the term cluster to qualify a

Comparison with other methods

In this section, we will compare our proposed S-DR algorithm for solving constraint graphs (where each vertex has two degrees of freedom and each edge reduces one degree of freedom of each object related to) with the two well known algorithms proposed by Hoffman et al. (see [13]) called Condensing Algorithm (CA) and Modified Frontier Algorithm (MFA). We have restricted ourselves to these algorithms because they are powerful and operate like S-DR algorithm.

Conclusion

We have described and implemented a decomposition–recombination planning method based on skeletons called S-DR algorithm. S-DR uses a graph based reduction method to solve systems of geometric constraints. This method is strictly solvability preserving and can deal with 2D constraint graph where each vertex has two degrees of freedom and each edge reduces one degree of freedom of each object related to. S-DR also handles under-constrained configurations. Comparing to other

References (33)

  • Ait-Aoudia S, Jegou R, Michelucci D. Reduction of constraint systems. In: ACM proceedings of compugraphics, Alvor,...
  • Ait-Aoudia S, Brahim H, Moussaoui A, Saadi T. Solving geometric constraints by a graph-constructive approach. In: IEEE...
  • E.L. Allgower et al.

    Continuation and path following

    Acta Numerica

    (1993)
  • Anderl R, Mendgen R. Parametric design and its impact on solid modeling applications. In: Symposium on solid modeling...
  • B. Bettig et al.

    Derivation of a standard set of geometric constraints for parametric modeling and data exchange

    Comput Aided Des

    (2001)
  • W. Bouma et al.

    A geometric constraint solver

    Comput Aided Des

    (1995)
  • Foufou S, Michelucci D, Jurzak JP. Numerical decomposition of geometric constraints. In: Proceedings of the 2005 ACM...
  • Fudos I. Editable representation for 2D geometric design. Master’s thesis, Dept. of Computer Science, Purdue...
  • I. Fudos et al.

    A graph-constructive approach to solving systems of geometric constraints

    ACM Trans Graph

    (1997)
  • Hoffman CM, Lomonosov A, Sitharam M. Finding solvable subsets of constraint graphs. In: Proceedings of principles and...
  • C.M. Hoffman et al.

    Geometric constraint decomposition

  • C.M. Hoffman et al.

    Decomposition plans for geometric constraint systems, part I: performance measures for CAD

    J Symb Computat

    (2001)
  • C.M. Hoffman et al.

    Decomposition plans for geometric constraint problems, part II: new algorithms

    J Symb Computat

    (2001)
  • Joan-Arinyo R, Tarrés-Puertas M, Vila-Marta S. Geometric constraint graphs decomposition based on computing graph...
  • K. Kondo

    Algebraic method for manipulation of dimensional relationships in geometric models

    Comput Aided Des

    (1992)
  • G. Laman

    On graphs and rigidity of plane skeletal structures

    J Eng Math

    (1970)
  • Cited by (0)

    View full text