Advances in Engineering Software 34 (2003) 103–113 www.elsevier.com/locate/advengsoft
A hybrid approach to geometric constraint solving with graph analysis and reduction Kyu-Yeul Leea,*, O-Hwan Kwonb, Jae-Yeol Leec, Tae-Wan Kimd a
Department of Naval Architecture and Ocean Engineering, Research Institute of Marine Systems, San 56-1, Shilim-Dong, Kwanak-Gu, Seoul, South Korea b Institute for Advanced Engineering, Yongin 449-860, South Korea c Concurrent Engineering Team, Computer Software Technology Lab, Electronics and Telecommunications Research Institute, Kajong-Dong 161, Yusong-Gu, Taejon, South Korea d Department of Digital Contents and Institute of Digital Media, Sejong University, KunJa-Dong 98, KwangJin-Gu, Seoul 143-747, South Korea Received 1 March 2002; revised 1 October 2002; accepted 1 October 2002
Abstract In this paper, a graph constructive approach to solving geometric constraint problems is being described. Usually, the graph constructive approach is efficient; however, it has its limitations in scope: it cannot handle ruler-and-compass non-constructible configurations, and underconstrained problems. To overcome these limitations, a proposed algorithm that isolates ruler-and-compass non-constructible configurations from ruler-and-compass constructible configurations is made. Numerical calculation methods are applied to solve them separately. This separation can maximize the efficiency and robustness of a geometric constraint solver. Moreover, the solver can handle under-constrained problems by classifying under-constrained subgraphs to simplified cases by applying classification rules. Then, it decides the calculating sequence of the geometric entities in each classified case, and calculates the geometric entities by adding appropriate assumptions or constraints. By extending the clustering types, and defining several rules, the proposed approach can overcome the limitations of previous graph constructive approaches. Therefore, an efficient and robust geometric constraint solver using this approach can be made. q 2002 Elsevier Science Ltd. All rights reserved. Keywords: Geometric constraint solver; Graph constructive approach; Under-constrained problems
1. Introduction There are several approaches to solving the geometric constraint problem. The symbolic approach, translates geometric constraints into a system of polynomial equations, and solves the system by computer algebra techniques such as the Wu-Ritt method, or the Grobner basis method [1 – 3]. This is reliable and complete, but is too slow and consumes too much space to solve practical problems. The numerical approach is a general method for solving the geometric constraint problem. Like the symbolic method, the numerical method first translates the constraints into a system of non-linear equations. Then this equation system is solved simultaneously using iterative methods, such as Newton– Raphson’s iteration (or its variants), instead of the exact symbolic computation. * Corresponding author. Fax: þ 82-2-888-8298. E-mail addresses:
[email protected] (K.Y. Lee),
[email protected] (H. Kwon),
[email protected] (J.Y. Lee),
[email protected] (T.W. Kim).
This approach can solve a variety of geometric configurations, including the ruler-and-compass constructible1 and non-constructible configurations, since any well-constrained problem that can be represented as a set of equations can be, in theory, solved by numerical techniques. However, there are some significant shortcomings [4,5] that comes together with this advantage. Numerical techniques have a number of problems related to numerical stability and solution consistency. † The number of iterations required to solve a set of constraint equations can vary substantially, depending on initial conditions given to the solver. † Numerical techniques are relatively inefficient. † Numerical techniques cannot distinguish between different roots in the solution space. 1 In this paper, a ruler-and-compass constructible configuration is defined as a set of geometric entities and constraints, in which the geometric entities can be incrementally determined by a sequence of ruler-and-compass constructive operations.
0965-9978/03/$ - see front matter q 2002 Elsevier Science Ltd. All rights reserved. PII: S 0 9 6 5 - 9 9 7 8 ( 0 2 ) 0 0 1 0 8 - 4
104
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
To overcome these shortcomings, the homotopy method has been proposed and experimented recently [6]. According to the report in Ref. [6], in general, the homotopy method works much better in terms of stability. However, both the Newton – Raphson method and the homotopy method generally require the number of variables to be the same as the number of equations. If these two numbers are different, i.e. the constraint system is generally over- or under-constrained, some special techniques, such as the linear least square and singular value decomposition of a matrix, are required. Ge [7] used an optimization method for geometric constraint solving that showed the stability of the solver. Further more, this method can naturally deal with under- and over-constrained problems. However, these efforts cannot overcome the inefficiency and distinctness of the numerical approach. Therefore, a more efficient approach is needed, that can handle a large-sized geometric constraint problem. In the constructive approach, geometric constraints are represented by a set of knowledge such as graphs, called a constraint graph, or predicate symbols. In this approach, a constraint solver satisfies the constraints by incrementally processing the set of knowledge [8 – 15]. Usually, the solver takes two phases of geometric constraint solving: a planning phase, and an execution phase. During the first phase, a sequence of construction steps is derived using a graphbased technique, or a rule-based technique. During the second phase, the sequence of construction steps is carried out to determine the geometric entities. This approach is the most efficient. However, constructive approaches have limitations in their scope. Owen [8], Bouma et al. [9], Lee [10,11] and Fudos [12] have presented graph reduction approaches to geometric constraint solving. Owen [8] proposed a graph-based constructive solver in which a constraint graph was analyzed for tri-connected components. However, only ruler-and-compass constructible configurations were considered. Bouma et al. [9] proposed a similar approach, but extended it to deal with more complex configurations. Lee [10] proposed a graph-based rule inferencing method that can overcome the inefficient geometric reasoning process of rule-based inferencing methods. Nevertheless, it can only deal with ruler-andcompass constructible configurations. To overcome these limitations, Lee [11] proposed a hybrid approach that isolates the ruler-and-compass non-constructible configurations from the constraint graph, and applies a numerical calculation method to them. For isolating the ruler-andcompass non-constructible configuration, Lee [11] defines four clustering types, and classifies them into ruler-andcompass constructible or non-constructible configurations. However, this approach cannot handle more complex, and under-constrained problems. In this paper, a new graph constructive approach to geometric constraint solving is proposed. We adopt Lee’s hybrid method is adopted and its ability is extended by solving more complex geometric configurations and
under-constrained problems. Two clustering types are proposed: (1) under-constrained clustering subgraphs, and (2) extended clustering subgraphs, for extending the capability of the solver. The proposed approach can handle under-constrained problems by using under-constrained clustering subgraphs, and complex problems by using extended clustering subgraphs. Several rules were defined for effectively detecting under-constrained and extended clustering. Using the proposed approach, a geometric constraint problem that is either under-constrained or complexly configured can be incrementally solved, instead of solving it simultaneously using an optimization method, or any other numerical method. By extending the clustering types and defining several rules, the proposed method can overcome the limitations of previous graph constructive approaches, Therefore, we can make an efficient and robust geometric constraint solver.
2. Constraint graph and structural definition of geometric constraint problems A geometric constraint problem consists of geometric entities and relations between them, called constraints. The geometric entities used in this paper include points, lines and circles. Constraints include incidence, coincidence, distance, angle, parallelism, concentricity, tangency and perpendicularity. In a plane, a point is represented by a two-component vector, a line is represented by a direction vector and a through point, and a circle is represented by a center point and a radius, as shown in Fig. 1. In a plane, the geometric entities have different degrees of freedom (DOF). A point has two translational DOF. A line has one translational DOF, and one rotational DOF. A circle has two translational DOF, and one internal DOF (the radius). Fig. 2 shows the DOF of geometric entities. Table 1 shows the possible combinations of geometric entities and constraints. A geometric constraint reduces the DOF of the geometric entities by a certain number, called the valency [16]. As mentioned in Section 1, in the constructive approach, geometric constraint problems can be represented by a constraint graph. In the constraint graph, nodes are denoted by geometric entities, such as points, lines and circles, and
Fig. 1. A representation of geometric entities.
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
105
Fig. 3. An example of a constraint graph. Fig. 2. The DOF (degree of freedom) of geometric entities.
edges are denoted by constraints, such as incidence, distance, perpendicular, parallel, coincidence, etc. Fig. 3 shows an example of a highly constrained geometric constrained problem and its constraint graph. Some definitions concerning the structural properties of the constraint graph are now provided [15]. (Here, an assumption is made such that all geometric entities have two DOF and all constraints have a valency of one if radius of circle is determined as certain value already. In fact, with some preprocessing, the geometric elements are reduced to points and lines, and the constraints to distances and angles [17].) Definition 1. A constraint graph, G ¼ ðV; EÞ where lVl ¼ n and lEl ¼ m; is structurally well-constrained if, and only if, m ¼ 2 £ n 2 3 and m0 # 2 £ n0 2 3; for any induced subgraph G0 ¼ ðV 0 ; E0 Þ where lV 0 l ¼ n0 and lE0 l ¼ m0 : m ¼ 2 £ n 2 3 and m0 # 2 £ n0 2 3 ð1Þ Definition 2. A constraint graph, G ¼ ðV; EÞ contains a structurally over-constrained section if there is an induced subgraph G0 ¼ ðV 0 ; E0 Þ having more than 2 £ n0 2 3 edges. lE0 l . 2 £ n0 2 3
ð2Þ
Table 1 Constraints and their valencies Constraint type
Associated geometric entities
Valency
Distance
Point, point Point, line Point, circle Line, line
1 1 1 2
Incidence
Point, line Point, circle
1 1
Coincidence
Point, point Line, line
2 2
Tangency
Line, circle Circle, circle
1 1
Angle
Line, line
1
Parallelism perpendicularity
Line, line
1
Concentricity
Point, circle
2
Definition 3. A constraint graph, G ¼ ðV; EÞ is structurally under-constrained, and the number of edges is less than 2£n23 lEl , 2 £ n 2 3
ð3Þ
where G ¼ ðV; EÞ is a graph that has V as nodes and E as edges. lVl ¼ n means that number of nodes is n and lEl ¼ m means that number of edges is m. Table 2 shows an example of a well-, over- and underconstrained problem and its constraint graph.
3. Solving the well-constrained problem 3.1. The construction plan generation phase In the construction plan generation phase, the solver determines the calculation sequence of the geometric entities. For determining the sequence, the construction plan generation phase uses several procedures as follows. † Preprocessing the constraint graph; † DOF analysis; † Clustering geometric entities and/or clusters. 3.1.1. Preprocessing the constraint graph Most geometric constraints take up one DOF, but there are some constraints that take up two DOF, such as the distance between two lines, coincidence between two same geometric entities, and concentricity between a circle and a point, as shown in Fig. 4. The preprocessing procedure merges the subgraph that represents these cases into a cluster that has two DOF, called a pseudo-geometric entity. The pseudo-geometric entity is treated similarly as a geometric entity in the clustering. Thus, the solver can generate a construction plan by identifying and merging only the clustering subgraph in the clustering procedure. 3.1.2. DOF analysis DOF analysis is a checking procedure that determines whether the geometric constraint problem is over-or underconstrained. A geometric constraint problem can be determined whether it is well-, or under-constrained by using Definitions 1 – 3 as defined in Section 2.
106
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
Table 2 An example of a well-, over- and under-constrained problem and its constraint graph Geometric constrained problem
Constraint graph
Analysis lEl ¼ 2 £ lVl 2 3
Well-constrained
3¼2£323
lEl . 2 £ lVl 2 3
Over-constrained
6.2£423
lEl , 2 £ lVl 2 3 2,2£323
Under-constrained
3.1.3. Clustering geometric entities and/or clusters with basic clustering subgraphs The clustering procedure generates the calculating sequence of the geometric entities (the construction plan), by identifying and merging the basic clustering subgraphs in the constraint graph as shown in Fig. 5. A cluster is a node that contains two or more geometric entities, and has two or three DOF. A cluster that has two DOF is generated in the preprocessing procedure, and is called a pseudo-geometric entity. A cluster that has three DOF represents a rigid body in which all the geometric entities’ relative positions are already determined. Therefore, the geometric constraint problem can be solved incrementally by forming a constraint graph as a cluster with three DOF. The same
procedure can be applied recursively to the remaining constraint graphs. The basic clustering subgraphs have three remaining DOF from the DOF analysis as shown in Fig. 5. This means that basic clustering subgraphs can be merged into clusters. Therefore, the clustering procedure requires two processes: detecting the basic clustering subgraphs, and reducing these basic clustering subgraphs into clusters. To make a new three-DOF cluster, a cluster with a basic clustering subgraph (a) in Fig. 5 is generated initially. In fact, we can make a three-DOF cluster with a subgraph that consists of two nodes (geometric entities) and one edge (constraint) can be made. However, an initial cluster that has two nodes can break the integrity of the solver. Therefore, an initial cluster with a set of three nodes that has the same
Fig. 4. Constraints that take up two DOF.
Fig. 5. Basic clustering subgraphs.
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
107
entities G0, G1, and G2 are generated. At each step of (1) and (3), an initial cluster R0 with G0, P0, P3, and R3 with P6, G1, and G2 can be constructed. At each step of (2), (4), and (5), a basic clustering subgraph is identified and merged into a cluster. In step (5), a ruler-and-compass nonconstructible configuration is merged: R2 and R6 are the clusters with three DOF. 3.2. The construction plan evaluation phase Fig. 6. An example of a well-constrained problem and its constraint graph (containing a ruler-and-compass non-constructible configuration) [18].
configuration as the basic clustering subgraph (a) is formed. As an example of an initial cluster, assume that a subgraph, S, consists of a line and two points. If S has an ‘incidence’ relation between the line and each point (two constraints), and a ‘distance’ relation between the two points (one constraint), then the remaining DOF of S is three. Therefore, an initial cluster with S can be formed. More details are presented in Section 5.2. Fig. 6 shows an example of a well-constrained problem and its constraint graph. The construction plan generation phase is described in Fig. 7. Step (0) of Fig. 7 shows the preprocessing procedure, and steps (1) – (5) show the clustering procedures. In step (0), the pseudo-geometric
In the construction plan evaluation phase, the solver evaluates the value of the geometric entities according to the sequence generated in the construction plan generation phase, using two calculating methods, i.e. the algebraic, and numerical calculating methods. The clustering types of the clustering subgraphs determine the calculating method of each sequence. The algebraic calculating method is used for evaluating the geometric entity whose type is either (a) or (b) as shown in Fig. 5, and the numerical method is used for evaluating the rigid body whose type is (c) or (d) as shown in Fig. 5, and for extended clustering subgraphs. More details are presented in Refs. [11,19,20]. Newton– Raphson’s method and an optimization method for the numerical calculations are used. In the Newton –Raphson method, the singular value decomposition of a matrix for solving
Fig. 7. An example of a construction plan generation phase of a well-constrained problem.
108
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
Fig. 8. An example of an under-constrained problem.
singular valued problems is used [21]. In the optimization method, sequential quadratic programming (SQP) is used.
4. Solving under-constrained problems In Section 3, only well-constrained problems were considered. However, over- or under-constrained problems are generated in the design process frequently. In particular, under-constrained problems often occur in the design process because a designer incrementally adds constraints to the model. Therefore, an incomplete model always contains an under-constrained problem. In order to use the proposed geometric constraint solver in a real situation, the capability of the solver has to be extended to solve underconstrained problems, because the present solver could not complete the clustering procedure using only the basic clustering subgraphs. 4.1. The under-constrained problem As an example of an under-constrained problem, one can envisage a model in which the designer does not add three distances or other constraints to the model, as shown in Fig. 8. It can detect that this problem is an under-constrained problem by DOF analysis: there are 18 points (36 DOF), and 30 distance constraints (valency ¼ 30), so that three DOF are needed in order for it to be well-constrained. 4.2. The construction plan generation phase of the under-constrained problem The solver cannot generate a construction plan using the proposed approach in the case of an under-constrained problem, because it cannot find any rigid clustering
subgraphs. Therefore, further constraints must be added to the under-constrained problem so long as they do not violate the given constraints. One of the major difficulties in solving the under-constraint problem is to make decision on the types of constraints that should be added, and where they are to be added. In order to solve these problems, the underconstrained clustering subgraphs, which are used for generating a construction plan as shown in Fig. 9 is being proposed. The under-constrained clustering subgraphs can be formed by deleting one or two edges of basic clustering subgraphs in Fig. 5. In the clustering procedure, a construction plan can be formed by using the clustering procedure with the underconstrained clustering subgraphs. This means that one or two constraints must be added to the constraint problem: one constraint is added to Fig. 9(a)– (d) and two constraints are added to Fig. 9(c). However, there are numerous subgraphs that have the same configuration as the underconstrained clustering subgraphs. If a wrong underconstrained clustering subgraph is selected, the clustering procedures cannot be completed, even though enough constraints have been added to the constraint problem, as shown in Fig. 10. Fig. 10 shows the clustering procedure of Fig. 8. In STEP 1 of Fig. 10, the under-constrained clustering subgraph in Fig. 9(a) is selected. This means that one constraint is added to the subgraph. In STEP 2 and STEP 3, the under-constrained clustering subgraph in Fig. 9(b) is selected, and two constraints are added to the problem. Now, this problem is well-constrained. However, the clustering steps cannot be continued since there are no more basic clustering subgraphs. Note that the overall subgraph in STEP 4 of Fig. 10 is well-constrained, but any clustering loop is under-constrained with respect to clustering types shown in Fig. 5. To avoid this problem, appropriate rules must be made for selecting the subgraph among multiple candidates. These rules are classified into two cases: Case I is where a constraint graph has no cycle, and Case II is where the constraint graph has a cycle. In Case I, added constraints do not violate any other constraints in the constraint graphs because there is no feedback of additional assumptions to the cluster. However, in Case II, added constraint affects other geometric entities in the constraint problem, because the constraint graph is cyclical. When constraints are added in the wrong place, the solver cannot continue
Fig. 9. Under-constrained clustering subgraphs.
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
109
DOF and maximum number of nodes. This rule allows users to avoid these complications because the maximum number of nodes is merged into a cluster in each state of the under-constrained clustering phase. More details are described below. Let G ¼ ðV; EÞ be a constraint graph; NðGÞ be the number of nodes in a subgraph, G; CðGÞ be the number of cycles in a subgraph, G; DOFðGÞ be the degrees of freedom of a subgraph, G; UCS(x ) be the subgraph that has the same configuration as the under-constrained clustering subgraph type x, where x can be one of the under-constrained subgraphs shown in Fig. 9(a)– (d). Let R be the rigid cluster. Case 1. CðGÞ ¼ 0:
Fig. 10. An example of a wrong selection of under-rigid subgraph.
clustering using the basic clustering subgraphs as shown in Fig. 10. To avoid this, we propose a selection rule is proposed, whose role is to select under-constrained clustering subgraphs in the cycle that have minimum
1. If there is no R in G, find UCS(a ). 2. Else, find UCS(b ), UCS(c ), UCS(d ) in G. Case 2. CðGÞ . 0: 1. Find a cycle, Csel, in G, where DOFðCsel Þ ¼ MIN ðDOFðCi ÞÞ and NðCsel Þ ¼ MAXðNðCi ÞÞ; and where Ci
Fig. 11. A construction plan generation flow chart of the present algorithm that contains the clustering procedure of the under-constrained problem.
110
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
As the under-constrained clustering subgraphs do not have sufficient constraints, the solver cannot calculate the geometric entities in under-constrained clustering subgraphs, nor can it construct a rigid body. Therefore, if the under-constrained clustering subgraphs are merged into a cluster, the solver must add appropriate assumptions to the under-constrained clustering subgraph to calculate the geometric entities. Fig. 12 shows an example of an under-constrained problem clustering procedure, using the clustering steps of Fig. 11. The problem of Fig. 12 has 36 DOFs and 30 geometric constraints, so we must add 3 constraints for making the problem be well-constrained. As shown in STEP 1 of Fig. 12, the solver finds C1 that has the minimum DOF, and the maximum number of nodes. Then, the solver constructs an initial cluster by finding a subgraph that has the same configuration as the under-constrained clustering subgraph (a) in C1, and finds other subgraphs that have the basic clustering subgraph as shown in STEP 2. By repeating the above procedures, the solver can carry out the clustering procedure as shown in STEP 7. The solver completes the clustering procedure by merging the constraint graph into a single node in STEP 7. 4.3. The construction plan evaluation phase of the under-constrained problem In the construction plan evaluation phase of the under-constrained problem, the solver evaluates the value of the geometric entities as in the construction plan evaluation phase of the well-constrained problem. The difference is that the clustering subgraphs have insufficient information for calculating the geometric entities, because the constraint problem is under-constrained. Generally, the number of solutions to the underconstrained problem is infinite. Therefore, the solver must add the appropriate assumptions to the underconstrained clustering subgraphs in order for the user to choose the most intuitive solution among them. An example of such an assumption is that the geometric entities move a minimum distance to satisfy the given constraints. Fig. 13 shows such an example. Fig. 13 is a part of Fig. 12. In STEP 2 of Fig. 12, P1, P2 and P3 are selected as the initial cluster. First, P1 is selected as the origin, and P2 is placed at a position that satisfies the given constraint between P1 and P2. At this time, Fig. 12. An example of the construction plan generation phase of an underconstrained problem.
is an arbitrary cycle in G. 2. If there is no R in Csel, find UCS(a ). 3. Else, find UCS(b ), UCS(c ), UCS(d ) in Csel. Fig. 11 shows a flow chart of an extended algorithm that contains the rules of under-constrained problems.
Fig. 13. An example of a construction plan evaluation phase.
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
111
Fig. 14. An example of a problem that has extended clustering subgraphs and its constraint graph.
Fig. 15. An example problem that has several initial cluster candidates and its constraint graph.
the rigid body is assumed to have three DOF, two for P1, and one for P2. Then, P3’s value must be calculated. P3 has one distance constraint with P2. If the value of the given constraint is assumed to be between P2 and P3 as denoted by D1, P3 is located on the circle whose center is at P2, and whose radius is D1. In this case, the solver calculates the position of P3 that satisfies the assumption of minimum movement. This assumption can be interpreted as that of the solver adding a new distance constraint between P3 and P1. Of course, the new constraint’s value must be determined to satisfy the minimum movement assumption. Another assumption can be added in the case of a line. As such an example, an assumption that the ‘line’s direction vector is not changed’, can be added.
5. Extending the solver 5.1. Clustering the geometric entities and/or clusters using extended clustering subgraphs In the case of some complex configurations, the present solver cannot complete the clustering procedure using only the basic clustering subgraphs. Therefore, the solver still needs to be extended. The basic clustering subgraphs consist of fewer than three nodes with three DOF. However, a subgraph, S, that has four, or more, nodes with three DOF can be assumed. If S cannot be divided into basic clustering subgraphs, the solver cannot complete the clustering procedure, as shown in Fig. 14. In order to solve these
problems, extended clustering subgraphs as additional clustering types. An extended clustering subgraph must be added is a connected subgraph of the constraint graph, and has more than four nodes with three DOF. The extended clustering subgraph can be merged into a three-DOF cluster, because it has three DOF. However, the extended subgraph can make the solver inefficient, because it requires numerical calculations. Therefore, the number must be minimized by using extended clustering subgraphs. For detecting the extended clustering subgraphs, the solver must use an extended clustering subgraph identification procedure. This procedure takes several cycles or circuit identifications and reductions, until it finds a rigid subgraph. In Fig. 14, the solver cannot continue the basic clustering procedure because there is no more basic clustering subgraph. However, the whole constraint graph is wellconstrained, so that it can be solved using extended clustering subgraphs. For example in Fig. 14, the solver first finds a cycle, C1, which consists of R1, R3 and L6. At this time, C1 is under-constrained. After this, the procedure finds another cycle, C2, which can make C1 wellconstrained if C2 is merged with C1. Then, the solver can
Fig. 16. An example of selecting a wrong initial cluster.
112
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
find an extended clustering subgraph, which consists of R1, R2, R3 and L6. 5.2. Selecting the initial cluster
Fig. 17. An example of a problem adopting the rule of selecting the initial cluster.
In the clustering procedure, an initial cluster must be constructed. However, the basic clustering subgraph (a) in Fig. 5 must be selected carefully, in some special cases. Fig. 15 shows such an example.
Fig. 18. A sketched procedure of a complex problem (a simplified midship section of a container ship).
K.-Y. Lee et al. / Advances in Engineering Software 34 (2003) 103–113
In Fig. 15, S1, S2, S3 and S4 can be selected as the initial cluster. If S1 and S3 are selected as candidates for the initial cluster, then the clustering procedure is carried out as shown in Fig. 16. The clustering procedure cannot be continued by using only basic clustering subgraphs. Of course, the clustering procedure can be completed by using extended clustering subgraphs. However, this makes the solver inefficient, because it needs numerical calculations. To avoid such a case, a rule is made for selecting the initial cluster. The rule is, that, a cluster that has a maximum number of edges connected to other nodes is selected, if there are several basic clustering subgraphs of type (a) in Fig. 5. After applying the above rule, the clustering procedure can be completed using only the basic clustering types by selecting S2 and S4 as an initial cluster, as shown in Fig. 17.
6. A complex example To test the present algorithm, a simplified midship section of a container ship is selected, as shown in Fig. 18. The final sketch (f) of Fig. 18 consists of 106 geometric entities (212 DOF), 173 constraints (valency ¼ 209), and has an extended clustering subgraph in its constraint graph. Parts (a), (b), (c) and (d) show the sketch procedures. In parts (b) and (d), the problem is under-constrained, because the constraints are not yet defined. However, it can be seen that these under-constrained problems can be solved by the present algorithm as shown in parts (b) and (d) of Fig. 18. Finally, the sketch is completed as shown in part (e). Then the value of constraint can be changed as illustrated in part (f).
7. Conclusions This work has presented a two-dimensional geometric constraint solving approach that employs a graph constructive approach globally, and a numerical approach locally. The constructive approach is used for the construction plan generation, while a numerical approach is used to evaluate the ruler-and-compass non-constructible configurations. In this way, the proposed approach combines the advantages of both methods. Moreover, the use of extended clustering subgraphs for solving complex configured problems, and under-constrained clustering subgraphs is proposed for solving underconstrained problems. By extending the clustering types, and defining several rules, the proposed approach can overcome the limitations of previous graph constructive approaches. Therefore, an efficient and robust geometric constraint solver that can solve the ruler-and-compass non-constructible configuration, and under-constrained problems is made.
113
Acknowledgements This work was supported by the Research Institute of Marine Systems Engineering of Seoul National University.
References [1] Buchberger B, Collins G, Kutzler B. Algebraic methods for geometric reasoning. Ann Rev Comput Sci 1988;3:85–120. [2] Kondo K. Algebraic method for manipulation of dimensional relationships in geometric models. Comput-Aided Des 1992;24(3): 141 –7. [3] Gao XS, Chou SC. Solving geometric constraint problems. II. A symbolic approach and decision of rc-constructibility. Comput-Aided Des 1998;30(2):115–22. [4] Kramer GA. Solving geometric constraint systems: a case study in kinematics. Cambridge: MIT Press; 1992. [5] Hsu C, Bruederlin BD. A hybrid constraint solver using exact and iterative geometric constraints. CAD systems developments: tools and methods, Berlin: Springer; 1997. p. 265–79. [6] Lamure H, Michelucci D. Solving geometric constraints by homotopy. IEEE Trans Visual Comput Graphics 1996;2(1): 28–34. [7] Ge JX, Chou SC, Gao XS. Geometric constraint satisfaction using optimization methods. Comput-Aided Des 1999;31(14): 867–79. [8] Owen JC. Algebraic solution for geometry from dimensional constraints. Proceedings of the First Symposium on Solid Modeling Foundations & CAD/CAM Applications, New York: ACM Press; 1991. p. 379 –407. [9] Bouma W, Fudos I, Hoffmann CM, Cai J, Paige R. Geometric constraint solver. Comput-Aided Des 1995;27(6):487–501. [10] Lee JY, Kim K. Geometric reasoning for knowledge-based parametric design using graph representation. Comput-Aided Des 1996;28(10): 831–41. [11] Lee JY, Kim K. A 2-D geometric constraint solver using DOF-based graph reduction. Comput-Aided Des 1998;30(11): 883–96. [12] Fudos I, Hoffmann CM. A graph-constructive approach to solving systems of geometric constraints. ACM Trans Graphics 1997;16(2): 179–216. [13] Solano L, Brunet P. Constructive constraint-based model for parametric CAD systems. Comput-Aided Des 1994;26(8): 614–22. [14] Chou CS. Mechanical geometry theorem proving. The Netherlands: Reidel; 1988. [15] Ait-Aoudia S, Hamid B, Moussaoui A, Saadi T. Solving geometric constraints by a graph-constructive approach. Proc IEEE Int Conf Inform Visual 1999;250–5. [16] Aldefeld B. Variation of geometries based on a geometric reasoning method. Comput-Aided Des 1988;20(3):117–26. [17] Fudos I. Editable representation for 2D geometric design. MSc Thesis. Department of Computer Science, Purdue University; 1993. [18] D-Cubed Ltd. Examples of ruler-and-compass non-constructible configurations. http://www.d-cubed.co.uk. [19] Bruderlin B, Roller D. Geometric constraint solving and applications. Berlin: Springer; 1998. [20] D-Cubed Ltd. The dimensional constraint manager, 68 Castle Street, Cambridge, England; 1995. [21] William HP, Saul AT, William TV, Brian PF. Numerical recipes in C. Cambridge: Cambridge University Press; 1992.