Recognising symmetry in solid models

Recognising symmetry in solid models

Computer-Aided Design 35 (2003) 673–692 www.elsevier.com/locate/cad Recognising symmetry in solid models S.J. Tate*, G.E.M. Jared SIMS, Cranfield Uni...

2MB Sizes 0 Downloads 42 Views

Computer-Aided Design 35 (2003) 673–692 www.elsevier.com/locate/cad

Recognising symmetry in solid models S.J. Tate*, G.E.M. Jared SIMS, Cranfield University, Cranfield, Bedfordshire MK43 OAL, UK Received 4 December 2001; revised 23 March 2002; accepted 26 March 2002

Abstract Although the symmetry of solids has been studied for over 50 years, it is still not easy to find a method for detecting symmetry in objects represented by B-rep solid models documented in the literature. The need for such a method comes from the requirements of an environment for ‘Assembly Oriented Design’ which includes ‘Design for Assembly’ analyses. This paper begins with definition of terminology used to describe the different types of symmetry that may occur in components and then gives a detailed review in which the benefits and limitations of the many existing methods used for symmetry detection in other applications are discussed. Since none of the methods appear to provide a solution, which can be easily adapted to the Assembly Oriented Design application, the requirements of any new method are then more precisely identified. It appears that human perception of symmetry is considerably more robust than any computational method in existence and therefore the cognitive processes involved in human symmetry detection are examined to attempt to identify promising directions for an alternative approach. As a result of this study, a new method for symmetry detection, which uses the comparison of face loops has been devised. This proves to be an effective technique for the detection of symmetry, which also satisfies the requirements of the particular application. One implementation of a procedure is described in detail together with results of its use on several test cases. Finally, since this method has a demanding practical application, the computational efficiency of the method is examined at length. q 2003 Elsevier Science Ltd. All rights reserved. Keywords: Symmetry; Solid models; Design for assembly

1. Introduction Our starting point is that the detection of symmetric or near symmetric objects is an important function of design for assembly (DFA) since simple assembly requires exact symmetry, parallel and perpendicular to the direction of insertion, or marked asymmetry. Further discussion of this and a detailed description of associated work can be found elsewhere [1]. Here we focus solely on the problem of detection of symmetry from boundary representation (B-rep) solid models. The problem of detecting symmetric shapes has been the focus of interest for many research communities for some considerable time. However, the specific problems posed by support of DFA do not seem to have been adequately addressed as yet. This paper describes recent work carried out on this topic within the OPHIR project [2]. Much of the relevant research on symmetry detection has been usefully summarised by Martin and Dutta [3]. * Corresponding author. Address: School of Engineering, University of Hull, Hull HU6 7RX, UK. Tel.: þ44-1482-466527; fax: þ44-1482466664. E-mail address: [email protected] (S.J. Tate).

However, the need to address the specific requirements of DFA and the passage of time suggests that a further review of the current state of the art would form a useful part of this paper. The remainder gives a presentation of the procedure developed, an analysis of its behaviour and some examples of its use.

2. Definitions of symmetry The primary objective here is the identification of symmetry with respect to assembly planning since simple assembly requires exact symmetry, parallel and perpendicular to the direction of insertion, or marked asymmetry. By identifying those elements of the shape that are symmetric and ranking the different symmetries present, the features that corrupt the symmetry can also be identified and quantified. This interpretation of the symmetry detection problem is also relevant when considering shape complexity, reverse engineering applications and engineering analyses such as finite element analysis (FEA). In this

0010-4485/03/$ - see front matter q 2003 Elsevier Science Ltd. All rights reserved. PII: S 0 0 1 0 - 4 4 8 5 ( 0 2 ) 0 0 0 9 3 - 3

674

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

Fig. 3. Examples of exact rotational symmetry. Fig. 1. Types of n-fold rotational symmetry: (a) C3, cyclic symmetry, (b) D3, dihedral symmetry.

particular context symmetry detection is required only to address symmetry by rotation, reflection and translation. This section provides definitions of symmetry appropriate for the purposes of this study. The relationships between the different types of symmetry are discussed in the theory of symmetry groups presented by Weyl [4] (and later by Rosen [5]). N-fold rotational symmetry about a central point in a plane figure (or an axis through the central point in a solid) is called ‘cyclic’ symmetry. The set of transformations which leave the figure invariant is denoted Cn ; consisting of repetitions of the rotation through an angle, a ¼ 2p=n: An example of this is the triquetrum (Fig. 1(a)). When reflective symmetry also exists in the same figure (or more specifically, rotation through 1808 in space leaves the figure invariant) there will be n further axes of symmetry passing through the central point and forming angles a/2 with one another. This is known as ‘dihedral’ symmetry and the set of transformations is denoted Dn (Fig. 1(b)). Thus C1 means no symmetry at all whilst D1 symmetry denotes bilateral symmetry. When the three-dimensional (3D) analogue of this situation is considered, Weyl describes the reflective symmetries (in planes through the central axis at equal angles of b=n to one another) as improper rotations and the set of transformations is denoted D0n Cn : It is these types of symmetry that will be dealt with in this paper. It can be shown that if n-fold reflective symmetry is found then n-fold rotational symmetry is implied. In constructing an algorithm for the detection of symmetry, therefore, it would seem logical to exploit this property since a method capable of identifying both types of symmetry is desirable.

The following definitions of symmetry have been developed based upon the strict mathematical definitions originally compiled by Weyl [4]. 2.1. Exact reflective symmetry This includes prismatic solid or thin-wall parts that exhibit bilateral reflective symmetry ðD1 Þ in one or more planes. A typical example is shown in Fig. 2. 2.2. Exact rotational symmetry This covers parts whose envelope is a solid of revolution and also those parts with n-fold rotational symmetry, where portions of the object are seen to repeat at angular intervals in the same plane around an axis (Cn and D0n Cn ). Typical examples of exact rotational symmetry are shown in Fig. 3. The first example here demonstrates D06 C6 symmetry, exhibiting both six-fold rotational symmetry and six planes of exact reflective symmetry. The second example demonstrates D01 C1 symmetry. 2.3. Partial symmetry Partial symmetry describes parts whereby portions of the boundary can be identified as symmetric. These will fall into three categories of part:

(a) those where the part would have exact rotational symmetry but for the existence of additional features which corrupt that symmetry, Fig. 4(a); (b) those where the part would have exact reflective symmetry but for the existence of additional features which corrupt that symmetry, Fig. 4(b); (c) those parts whose basic overall shape is not symmetric but which contain repeated features at intervals around the boundary, Fig. 4(c).

2.4. Scale and skew symmetries

Fig. 2. Example of exact reflective symmetry.

Scale and skew symmetries, which change the geometry of an object, are considered as asymmetries in the context of assembly and as such will not be considered.

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

675

Fig. 5. Parui’s method for symmetry detection.

Fig. 4. Examples of partial symmetry.

3. State of the art The concept of symmetry has been of major interest in many fields of research over many years, from human psychology [4,6] and medical imaging [7] to crystallography and atomic physics [5]. The detection of symmetry is also an issue in many aspects of design. Besides its potential use in assembly analyses it is also useful for sectioning prototype or FEA models to reduce the size and hence the required resources and analysis times. It has also been proposed for the correction of unintentional asymmetry in sketched or digitised input [3,8]. Hence, methods for the detection of symmetry are many although their crossdisciplinary relevance is often limited due to the domainspecific interpretation incorporated in each technique. 3.1. Pattern matching Many methods exploit pattern-matching algorithms to search for exact symmetry and will conclude that a component has no symmetry if this is not found. These methods are often based on analysis of point sets or line segments and are most often applied to 2D problems. Since detection of exact symmetry is the target, these algorithms tend to start by assuming that the axis of symmetry passes through the centroid of the set. A string can be constructed based on the properties of the set and a pattern-matching algorithm is then used to identify symmetry patterns in the string. The most commonly used method of pattern matching is the Knuth – Morris –Pratt algorithm [9] (KMP) due to its low running time. The methods of Highnam [10] and Atallah [11] typify this approach, whilst Wolter et al. [12] and Jiang and Bunke [13] address symmetry detection in polyhedra using

extensions of the technique. These and similar algorithms are reviewed more thoroughly by Eades [14]. This type of algorithm tends to be efficient but the disadvantage is that the entire boundary is not considered. The vertices of an object may be symmetrically located but the edges between may be curved and may therefore not comply with that symmetry. However, methods for symmetry detection have been developed that do address curved boundaries. To identify the reflective symmetry of 2D shapes, Parui and Dutta Majumder [15] used a segmentation approach to account for a curved boundary. Using a coarse resolution, the figure is first segmented by perimeter length so that there are 2n vertices (or sides) and n candidate symmetry axes, each passing through two vertices on the perimeter so that the perimeter length is equal on either side. For each candidate axis a set of local axes are defined by pairing opposite sides of the polygonal approximation (Fig. 5). For each pair, the acute angle between the local axis and the candidate axis is used to find the ‘cost’ of symmetry. The total cost for each candidate axis is then compared to find the most likely axis of symmetry. The process is repeated at increasingly high resolutions to refine the position of the global axis. Exact symmetry is indicated by a total cost of zero. The algorithm concludes that asymmetry exists if no axes fall below the threshold cost. In their work on image analysis, Curwen et al. [16] devised an algorithm to recognise symmetry of planar curves in different orientations. When a 3D curve is projected on to a surface it produces a curve, which is a transformation of the original. Hence identical curves in different orientations will produce different projected images. However, they will both be a transformation of the original and therefore a transformation of each other. By parameterising the curves and equating the points (in particular key points can be matched such as points of inflection) the transformation matrix can be determined and a match established if one exists. This algorithm will find a transformation matrix for any two sets of points and

676

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

partial symmetry recognition is also possible. Unfortunately, the algorithm is, being based upon sampling, very computationally expensive. The previous methods highlight another aspect of symmetry detection: the notion of partial symmetry. Indeed, ‘all-or-nothing’ symmetry is not a useful conclusion in many applications where partial symmetries or the strongest symmetry is required. Several researchers have adopted an alternative approach to address this issue by defining a ‘measure’ of symmetry, which will quantify the symmetry of an object accordingly. Kulkarni et al. [19] define the symmetric difference (SD) as the sum of the non-overlapping areas of two figures that have been superimposed as shown in Fig. 6. Written mathematically: SDðA; BÞ ¼ {ðA < BÞ 2 ðA > BÞ}

Fig. 6. Symmetric difference of a figure reflected about an axis.

therefore to avoid the detection of symmetry where none exists, a ‘saliency’ metric is calculated to eliminate curves that are not good candidates for a match. For curves that are approximately symmetric, this is, in effect, a measure of the degree of symmetry. Although these methods satisfy the requirement for detection of symmetry of curves as well as vertices, there still exists the possibility that intermediate surfaces will not comply with the symmetry. In addition, these methods only apply to planar curves and an engineering environment is likely to generate much more complex 3D objects. One method which does consider the entire boundary of a 3D model is based on ‘Woodwark’s Algorithm’, a multidimensional template-matching algorithm for set-theoreric (CSG) models presented by Parry-Barwick and Bowyer [17, 18]. Using this technique, a template can be compared with the model at all locations, orientations and where appropriate at different scales. When a 3D model and template are tested in all possible configurations this equates to 10 dimensions: the x, y and z of the model; the three translation directions, x, y and z; the three rotations ux ; uy and uz ; and the scale, s. By varying the template with respect to all these dimensions in all possible combinations, this is effectively testing ‘hypermodels’ in ‘hyperspace’. When searching for reflective symmetry, partial or exact, the template is the mirror image of the object itself about an arbitrary axis. When searching for rotational symmetries the template is simply a copy of the original object. Several criteria can be used to validate a match such as area/volume and/or perimeter length/surface area, depending upon the dimensionality of the original object. The particular method chosen in this implementation is called ‘recursive subdivision’, which identifies boundary elements that occur in both the model and template. In this way, those portions of the boundary that exhibit exact symmetry are identified and thus

If the second figure is a reflection or rotation of the first figure about some axis or point then the symmetric difference can be used to calculate the degree of symmetry (DoS) of that object such that: DoS ¼ 1 2

SD TotalArea

Thus, perfect symmetry has a degree of exactly 1. This method can be extended to calculate a measure of symmetry for 3D objects by considering reflection or rotation about a suitably defined plane or axis and substituting volume for area in the calculation of the symmetric difference and the degree of symmetry. An alternative metric, based on a similar idea, has been defined by Marola [20], with the coefficient of symmetry (CoS) given as: CoS ¼ 1 2

AreaðR 2 LÞ 2½AreaðLÞ þ AreaðRÞ

where R indicates the portion of a planar shape to the right of the candidate axis and L indicates the portion to the left. This similarly results in a score of exactly 1 for perfect symmetry and can also be adapted for 3D objects, substituting volume for area. Zabrodsky et al. [21] approached the problem differently with their method for continuous symmetry detection, based on the folding technique of Lin [22]. This involves gauging the symmetry of a set of points relative to a ‘symmetry transform’, a symmetric set of points produced by ‘folding’ and averaging the original set (Fig. 7). The method gives a symmetry ‘score’ based on the ‘symmetry distance’, the sum of the squared distances of each point from its equivalent in the symmetry transform. A zero score indicates exact symmetry. Although Zabrosdky’s method conveniently produces a symmetric equivalent of a shape, it suffers from the same flaw as many other algorithms when applied to 3D problems. The surface geometry is not considered and may not correspond to the symmetry identified. In addition,

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

677

Fig. 7. Symmetry transform of a six-sided figure.

Fig. 8. Zabrodsky’s method overlooks lower order symmetry.

as Kanatani [23] notes, lower order symmetries will not be found. An example of this is the case of a rectangle, which has a square as its symmetry transform and a correspondingly high symmetry distance to this D4 symmetry. In fact, the rectangle has exact D2 symmetry but this would never be found (Fig. 8). This highlights the problem of this and other methods, which require that the user specify the type of symmetry to search for, whether that is reflective or rotational, and if rotational, the angle of rotation. It must also be noted that a measure of symmetry is only credible when an optimum axis or plane of symmetry has been chosen.

all three eigen values are equal then spherical symmetry is implied and the octree is tested accordingly. As a further step, a measure of symmetry called the ‘symmetry degree’ may be calculated as the ratio of the symmetric mass to the total mass of the object. This indicates the existence of partial, as opposed to exact, symmetry but does not give an indication of the relevant portions of the boundary. The efficiency of this algorithm is of course dependent on the octree resolution and the number of octree nodes, but this type of representation has the added benefit of tolerating ‘noisy’ input. Sun and Sherrah [25] used an alternative model representation in their method based on the ‘extended gaussian image’ (EGI). Calculation of the EGI involves mapping points from the original object onto the corresponding facets of a tessellated sphere, according to the face normal. A spherical histogram is constructed according to the number of points from the original object, which map to each facet of the sphere. The principal axes are calculated and used as the starting point to test for reflective or rotational symmetry by a matching algorithm. The highest correlation is deemed to be the ‘strongest’ symmetry axis or plane. However, a non-symmetric object may generate a symmetric histogram and therefore the algorithm may detect symmetry where none exists. Also, the accuracy of the algorithm is dependent on the resolution of the tessellated sphere and the accuracy of the principal axis calculations. Davis uses an alternative method for determination of candidate axes [26]. The notion that an axis of symmetry passes through a vertex bisecting the angle, or bisects, at right angles, the line joining two vertices, is used to determine candidate axes of symmetry between pairs of edges in polygons (Fig. 9). The ‘cost’ associated with each axis is calculated according to a measure of symmetry of the two edges about this axis. Axes that are closely located and orientated, according to dynamically defined tolerances, are then grouped and averaged. Hierarchies of symmetry that exist in the polygon are extracted according to a process that ranks the axes by associated perimeter length and cost of symmetry. The method is extended to deal with objects possessing curved edges, categorising them as straight, convex, concave or s-shaped (positive or negative).

3.2. Identification of candidate axes In their work on symmetry detection for the correction of unintentional or inappropriate asymmetry, Martin and Dutta [3] summarise the key issues: † identification of the most likely type of symmetry, † location of the most suitable axis or plane of symmetry. Calculation of the principal axes has been used by some research groups to address these issues. Principal axes are unique for all objects and it can be shown for a symmetric body that any plane of symmetry lies perpendicular to a principal axis, and that an axis of symmetry is a principal axis. Minovic et al. [24] tackle objects of any shape in any orientation using principle axes, basing their method for detection of symmetry in 3D objects on an octree representation. The input octree is used to calculate the principal axes of the component and is then recalculated so that it aligns with them (the ‘principal octree’). Elements of the octree are then compared to confirm that symmetry exists. The type of symmetry that is sought is dependent on the eigen values of the inertia matrix (set of central moments). If all eigen values are distinct then simple (3608 rotational) symmetry is implied and the principal octree is checked only for bilateral, axial and central symmetry. If two eigen values are equal then rotational symmetry is implied and the 2D cross-section, perpendicular to the unique principal axis, is examined for symmetry. If

678

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

Fig. 9. Davis’ candidate axes of symmetry.

In an entirely new approach, Kulkarni [19] proposed the reduction of a 3D shape to its 2D skeleton using the Medial Axis Transform. Indeed, the medial axis of a figure is commonly referred to as the ‘symmetric axis’ [27]. The medial axis of a 2D/3D object can be simply described as ‘the locus of the centres of all its maximal inscribed circles/ spheres’ (Fig. 10). Kulkarni experimented with this method for the automatic rectification of asymmetry and established rules to relate the medial axis with the symmetry of the object. It was observed that: † The convex polygonal profile, P, is symmetric if the skeleton is symmetric. † If P is symmetric then the axis of symmetry will lie according to the number of vertices. If there are an odd number of vertices then the axis will contain a limb segment of P. If there are even numbers of vertices, the axis will either contain a spine segment of P or will lie perpendicular to a spine segment of P. † If the skeleton is not symmetric then the object is asymmetric and therefore a candidate for asymmetry rectification. Unfortunately, the method has several shortcomings. Kulkarni only deals with the identification of the global reflective symmetry of 2D objects and the extension to 3D is a complex task. In addition, although the algorithm itself is simple, calculation of the skeleton is very computationally expensive. Also, as the author acknowledged, small changes to the boundary may cause large disruption of the skeleton and therefore symmetric elements of the object are not necessarily represented in the skeleton. The latter problem is not restricted to the medial axis method, as Martin [3] notes. Any process that considers the entire boundary in the course of symmetry detection may lead to the incorrect calculation of the symmetric axis. This is particularly easy to see in the calculation of a symmetry measure where a single asymmetric element may considerably affect the result. In some situations, as in assembly planning, it may be required that the symmetric portions of the boundary are recognised, and axes defined accordingly. In this way those portions of the boundary that do not

Fig. 10. Construction of the medial axis transform.

comply with the symmetry can also be identified and treated appropriately. More akin to these requirements is the method proposed by Kilani and Sturges [28] for the identification of symmetry and orientation features for assembly planning. The technique is based on the identification of a candidate set of axes, which are subsequently evaluated using a pointby-point comparison. Features that corrupt the symmetry are then identified by the rotation or reflection of the object about the chosen axis. The portions of the object that intersect are the symmetric portions. The remaining elements are the asymmetric ‘features’ for which an orientation ‘index of difficulty’ (ID) is then calculated. The ID is defined according to the relative dimensions of each feature when compared with the original object, such that ID ¼ log2 ðs=wÞ where w is the size of the feature and s is the overall size of the original shape (Fig. 11). When the ID exceeds an appropriately defined threshold value, redesign is recommended. The rules for identification of candidate axes are as follows:† An axis of symmetry passes through a vertex bisecting the angle, or bisects an edge at right angles. † The number of vertices to the left of an axis of mirror symmetry is equal to the number on the right. † The centre of rotational symmetry is located at the centre of gravity (CG). † The minimum angle of rotational symmetry is equal to the minimum angle between two vertices at the same radius from the centre. † The maximum number of axes of symmetry is equal to the number of edges.

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

Fig. 11. Identification of symmetry axis and features for nearly symmetric object [28].

Although these rules apply only to symmetry of 2D shapes they are easily extensible to 3D. Wolter et al. [12] addressed the problem of symmetry detection in polyhedra by doing just that. They note, in addition that:† An axis of symmetry may intersect a vertex, bisect an edge, or pass through the centroid of a face. Once a set of likely axes has been established, the existence of symmetry of particular types can be confirmed using an appropriate technique. Although several researchers [12,24] have discussed the interdependence of reflective and rotational symmetries in terms of symmetry groups, the algorithms developed do not exploit the detection of one type of symmetry to infer the existence of the other. Rather, independent searches for both types of symmetry are more customary. 3.3. Symmetry in mechanical assembly planning As stated earlier, assembly planning requires consideration of symmetry and several researchers have addressed the detection problem in this context, using methods similar to those described above. The Boothroyd– Dewhurst DFA methodology [29] defines a and b symmetry as rotational symmetry, perpendicular and parallel to the axis of insertion, respectively, and this notation has frequently been adopted. Rosario [30] extracted cycles of edges from orthogonal views of a wire-frame CAD model. Strings generated according to the lengths and angles of the edges are used to evaluate the rotational symmetries of each cycle. By comparing the properties of the cycles, including cycle centres and elemental properties, concentricity and n-fold rotational symmetries of the cycles are also evaluated. a and b symmetry can then be identified according to a predefined

679

direction of insertion, assuming that this coincides with the orthogonal axes (i.e. if the z axis is the direction of insertion then b is the rotational symmetry identified in the x– y orthogonal view). Myers et al. [31] (and later Ong et al. [32]) devised a method for the detection of a and b symmetry based on mass properties. The method starts by locating the CG at the origin, with the axis of insertion along the y-axis, and its principal axes aligned with the x- and z-axes. The subroutine for detection of a symmetry compares the top and bottom halves of the object in terms of their individual CG’s and moments of inertia. The subroutine for detection of b symmetry involves the grouping of vertices with a common y co-ordinate and radius from the y-axis, to determine candidate angles for n-fold rotational symmetry. Findings are confirmed by performing a Boolean subtraction of an appropriately transformed object, from the original component. Ma et al. [33] used ray detection to solve the same problem. The axis of insertion is aligned with the z-axis of the system, with the centroid at the origin. Rays are then systematically passed from the centroid of the part to the outside. The numbers of times the ray is segmented by the object, the length of the segments and the classification (in, on or out of the object) are then used to make comparisons between portions of the object boundary. The weakness of these methods is that the insertion direction and hence the search space is predefined by the user. In addition, these methods are aimed only at the detection of exact symmetry. Sturges and Hunt [34] address the issue of partial symmetry and the associated orientation difficulty by quantifying the features that disrupt the symmetry. In this way, it becomes possible to identify portions of the boundary that may require modification, either to conform to the symmetry or to emphasise the asymmetry. The technique is based on that of Kilani [28], but is extended to address the 3D problem. A 3D-object model is reduced to a set of 2D abstractions by consideration of imprints, silhouettes and slices. The rules for selection of candidate axes are invoked to identify the potential symmetries in the 2D shapes. These axes are adjusted until the coefficient of symmetry (CoS, as defined by Marola [20]) is maximised and thus the best axis is found in cases of partial symmetry. The solution can be related back to the 3D model by projecting the axis as a plane and calculating the CoS and orientation ID using volume instead of area. Although the last method satisfies many requirements of symmetry detection and component orientation for DFA, it has not been tested on 3D CAD models. The reduction from a 3D representation to a 2D representation will inevitably mean loss of data and may result in the omission of a significant global symmetry from the considerations. In addition, the use of a symmetry measure that accounts for the whole boundary inevitably means that the exactly symmetric elements are lost.

680

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

4. Requirements for symmetry detection algorithm None of the methods described thus far satisfies all requirements of a symmetry detection algorithm for assembly analyses for several reasons. Many require that the axis of symmetry be predefined by the user, which may or may not occur during construction of the object. Also CAD files may be imported to different CAD systems or by applications where data cannot be added to the original file. In such cases, an algorithm that does not find the axes of symmetry will not be appropriate. In addition, it is often necessary to recognise the symmetric elements of an object, as distinct from the asymmetric elements of an object in order to make decisions regarding orientation during assembly, or to highlight areas for redesign where exact symmetry is desirable. A further requirement of the algorithm is the analysis of B-rep solid models, since it is this representation that is most commonly used in commercial CAD systems. Hence, a novel method is required to establish axes of symmetry, and those elements of the boundary surface that corrupt the symmetry. In summary, an efficient algorithm that operates on the boundary representation of a solid model, should ideally: † Identify and rank axes of symmetry according to the ‘strongest’ symmetries. † Identify the symmetric portions of the boundary associated with each axis. † Utilise symmetry group theory to identify the type of symmetry, reflective or rotational and the degree of symmetry where relevant, within a single operation. † Isolate asymmetric portions with respect to the symmetry axes for subsequent quantification or modification. † Enable automatic correction of slight asymmetries. In seeking an alternative approach to the symmetry detection problem the processes associated with the human recognition of symmetry were examined. Human symmetry detection mechanisms are ‘remarkably robust’, as noted by Wagemans [35] in his review of experimental evidence. Tests have shown that the effects of colour, lighting effects, the number of elements, the orientation and even the exposure time of samples had little effect on the ability of subjects to detect symmetry. The experiments also demonstrated that subjects were able to grade the degree of symmetry rather than discriminate only between discrete all-or-nothing symmetry patterns. The contribution to symmetry recognition of different zones within the visual field was also examined [36]. These tests demonstrated that, although the restricted area around the axis is most critical and that symmetry is more easily recognisable when the axis coincides with the ‘point of fixation’ [35], the edge of the pattern is also highly significant in the global detection of symmetry.

In general, however these studies have been inconclusive in formulation of a single symmetry detection process and as such the whole issue of symmetry detection in humans has been classified as ‘preattentive’. In layman’s terms this can be interpreted as the unintentional, automatic recognition of symmetry, not requiring a directed search where ‘attention’ is drawn to the task at hand. There is no such luxury available in the process of computational symmetry detection and so it is interesting to try to break down the underlying preattentive processes involved. Palmer and Hemenway [37] proposed a dual process model as follows: 1. Extract the potential axis from a crude analysis in all orientations, which is fast, holistic and preattentive. This yields a frame of reference for the second stage. 2. Detailed evaluation based on a point-by-point comparison of the two halves, which is slow and methodical. This theory is based on the evidence that elements of the patterns are grouped together in the first stage, reducing considerably the number of elements to be compared. This is confirmed by the work of Barlow and Reeves [38] which considered a distribution of dots about a central axis and concluded that the first stage of symmetry detection was based on relative areas of dot density rather than exact position. Wagemans ‘bootstrapping’ model builds on this theory with two further rules which state that: † Single symmetry is easier to detect when supported by a second symmetry along an orthogonal axis, † Midpoint colinearity (i.e. many elements all contributing to the same axis) enhances symmetry detectability. However, most of these studies have been based upon 2D patterns of dots and, occasionally, lines, which have different properties to 3D solid shapes. Hence, the comparisons that can be made are limited. It is probably fair to conclude that the more elements of a shape contributing to an axis, the easier that axis will be to detect and the more symmetric the object will be perceived to be. It is probably also fair to conclude that long lines and large spaces will rank more highly than short lines and small spaces, which in turn will rank more highly than single dots, in patterns of mixed elements according to the dot density theory of Barlow and Reeves [38]. In the light of these conclusions and the inherent robustness of the human symmetry recognition process it would seem logical to base any computational algorithm on the relative lengths of edges, and the space separating these edges, in terms of face area. The relative importance of each axis identified in this way can then be established according to the number of elements contributing to each axis. Geometric reasoning techniques can be employed to extract this information from a solid model produced using a 3D CAD system during the product design process. In

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

† † † † †

681

calculate loop properties; identify matching loops; construct axes and planes of symmetry; rationalise axes and planes of symmetry; extract the primary symmetry axes from the resulting set.

5.1. Step 1—Calculation of loop properties

Fig. 12. Symmetry based on bounded surface area of shaded faces.

summary, the following rules will be used to rank the importance of shape elements within the whole component:1. Periphery shape is more significant than internal detail. 2. Large face areas are more significant than small face areas. 3. Long edges are more significant than short edges. One way to compare the area of 3D boundary representation solid models is by a comparison of faces. A face is a bounded portion of a surface and continuous ‘loops’ of edges are used at the boundaries to define the ‘active’ portion of the surface that constitutes the faces [39]. Therefore loops have been identified as appropriate entities by which to compare elements of a solid shape. Loops are readily available in most boundary representation solid modelling systems and enable multiply connected faces to be compared without disruption by intersecting features. The general principle of the proposed technique primarily involves the calculation of the surface area bounded by each loop of a face, for each face belonging to the part. This enables the association of faces, whose only difference is the type of feature, which they contain. Further comparisons regarding the type of surface, the type of loop (internal or external) and the number of edges may be used to ensure that matching loops are identified correctly. Fig. 12 illustrates this concept. Once identical loops have been identified subsequent reasoning can determine whether reflective symmetry, rotational symmetry and/or repeated features exist.

5. Implementation In this section, one implementation of a heuristic for the detection of symmetry is presented. The procedure aims to fulfil the requirements detailed in Section 4, whereby the symmetric portions of a boundary representation solid model are identified and axes constructed accordingly. The method described primarily addresses the detection of reflective symmetry in the object although D01 C1 rotational symmetry is also identified. The process is broken down into 5 steps, which are described in greater detail in the following sections:

To enable comparisons, properties of the face loops must be considered, in particular the relative location and orientation of identical loops. Thus, for every loop of each face the following properties must be calculated; surface type, loop type, loop area, loop centroid, surface normal at the loop centroid and the number of edges in the loop. However, calculation of several of these properties is dependent on not only the surface type, but also the particular implementation used in the solid modelling system. The different implementations result from the many possible interpretations of geometry and geometric terminology. This lack of precision is one of the main target areas that the Djinn solid modelling Application Procedural Interface (API) addresses [40]. This section describes extraction of loop properties with particular reference to the Spatial Technology ACIS Solid Modeller. Specifically, the type of surface is found first since the method for the subsequent determination of loop type is dependent on the surface type. Once the surface and loop types have been established, the remaining properties can be calculated. These can then be written to a database for storage and subsequent manipulation. 5.1.1. Determination of loop type ACIS considers a loop as a continuous set of edges marking a boundary of a face and can be defined as ‘internal’ or ‘external’. For planar faces, there always exists an external loop, intersecting features resulting in internal loops. The same is true for all occurrences of non selfintersecting B-spline surfaces. In many b-rep modellers it is a simple matter to identify the nature of each loop in this respect, either through its explicit representation or use of a ready-made function. Unfortunately, the distinction is not clear for some commonly occurring face types of major importance in manufacturing and hence further interrogation is required in order to classify the loops defining each face. A cylinder can be considered as a special instance of a cone and hence these two surface types can be treated similarly. The loops of these types of face cannot be distinguished as internal or external because the distinction is not valid. For example, a complete cylindrical face (i.e. closed around its circumference) generally possesses two circular loops bounding the ends. In such cases it is therefore necessary to differentiate between those ‘end’ loops and the internal loops belonging to intersecting features in order to calculate the area of the cylindrical face without those intersecting features. Similar judgements can

682

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

Fig. 13. Loop properties for an external cylindrical face loop.

be made about other ambiguous face types and these are defined elsewhere [41]. Hence, it is necessary to first identify the type of face so that each face can be treated according to its particular properties. In many modellers this can be determined by examination of the surface equation. ACIS provides a simple function call to enable identification of particular face types; cylindrical, conical, spherical and toroidal in addition to planar and spline surfaces. 5.1.2. Calculation of loop area Once the nature of the loops in each face has been established, it is then possible to calculate the ‘correct’ area of each portion of bounded surface. It is possible to construct an algorithm to calculate surface area directly, by integration of the surface equation [39]. However, most solid modellers will provide the functionality to compute surface area. The accuracy of the area calculation has serious implications for the recognition of symmetry since identical loops are identified by matching loop area. It was found that area calculation to an accuracy of 0.1% (according to ACIS) provides a satisfactory compromise between accuracy and algorithm efficiency.

consideration of the central axis, in place of the surface normal, and the point on the central axis which is closest to the centroid, in place of the centroid itself. With the ACIS implementation, these can be found using the root point and direction used to define the cylindrical surface. It is logical to consider these alternative properties when considering symmetry since the axis of a cylinder is likely to form the basis of any associated symmetry. Again, equivalent criteria are used as appropriate for ambiguous configurations in other surface types and again these are defined elsewhere [41]. 5.2. Step 2—Identify matching loops Once calculated, the properties of all loops for each face in the component are written to a database. The loops can then be ranked according to specific criteria so that matching loops can be identified with the minimum number of comparisons. Firstly, the loops are ranked according to the associated loop area, highest first. Subsequent sorting groups the loops according to face type, loop type and number of edges. All database sorting is based on alphanumeric ordering. At this stage, an iterative process is used to compare loop area. If the area of each consecutive loop is identical within ^ 0.1% then the other criteria are used to validate the match and the loop is added to a linked list of matching loops. As soon as the loop area does not match or the other criteria indicate that the match is not valid, a new linked list for the next group of matching loops is started. As matching loops are grouped, any unique rotational face loops are also grouped. Cylindrical, spherical and toroidal face loops may form the overriding symmetry of the component, as discussed earlier, and hence a record of these is maintained for construction of symmetry axes in Step 3. 5.3. Step 3—Construct axes and planes of symmetry

5.1.3. Calculation of loop centroid and normal The centroid (CG) of a loop is the point in space about which second moments of area of the bounded surface are minimised. The normal is the vector perpendicular to the surface at the centroid, or the point on the surface closest to the centroid. The type of surface dictates the method required for calculation of the centroid and surface normal. For a planar face this is a straightforward matter and most solid modelling systems will provide the functionality for these calculations. However, the same properties with reference to other types of surface require further definition. The centroid of a curved face may not lie on the surface itself and therefore may be equidistant from many (or all) points on the surface. The surface normal will vary according to the chosen position on the surface. Thus, the simple definitions of centroid and surface normal are not sufficient to provide a useful basis for subsequent comparisons and manipulation. This is easily demonstrated by a simple cylinder as shown in Fig. 13. For cylindrical face loops that are complete about the circumference (i.e. external), this problem is addressed by

For each matching pair of loops a plane of symmetry can be constructed. Hence, for a group of n matching loops there will be n! candidate planes of symmetry: ðn 2 2Þ!2! To define each plane of symmetry a point and a surface normal is required. The point, p, is defined as that which bisects the centroids, c1 and c2, of the two matching loops. Given two unit vectors, v1 and v2, which represent the normals to the matching loops, the face normal to the symmetry plane can be defined as vn ¼ v1 2 v2 ; as shown in Fig. 14. The result is then normalised to obtain a unit vector. The example shows the case for two matching planar surface loops but the same method is used for all types of surface. This definition is satisfactory in most cases apart from the situation where the matching loops have the same orientation and thus v1 and v2 are identical. In such cases the resultant vector is zero and the symmetry plane cannot be defined in

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

683

Fig. 16. Symmetry plane definition for ‘coplanar’ loops.

5.4. Step 4—Rationalise axes and planes of symmetry Fig. 14. Construction of symmetry planes.

the same way. Three possible scenarios can occur: † The two loops are coaxial. If the vector, vd ; joining c1 and c2 is parallel to the loop normals, v1 and v2, then the two loops are coaxial. In this situation there is not sufficient information to define a plane of symmetry. An axis of symmetry is defined instead which passes through p in the direction of vd (Fig. 15). † The two loops are coplanar. If the vector, vd ; joining c1 and c2 is perpendicular to the loop normals, v1 and v2, then the two loops are described as ‘coplanar’, regardless of surface type. In this case, the normal of the symmetry plane is equal to a unit vector in the direction of that vector (Fig. 16). † The two loops are parallel but neither coplanar nor coaxial. If the vector, vd ; joining c1 and c2 is neither parallel nor perpendicular to the loop normals, v1 and v2, then the two loops are parallel but neither coplanar nor coaxial (Fig. 17). In this situation, the required vector, vn ; can be calculated as follows: * Find u ! Use either a·b ¼ ab cos u ¼ ax bx þ ay by þ az yz or modeller supplied function * Calculate vq ! vq ¼ v1 p lvd lsin u * Calculate vn ! vn ¼ vd 2 vq In addition, further axes of symmetry are defined in relation to rotational face loops that exist in isolation, with no matching loops. It is important to construct candidate axes of symmetry for cylindrical, spherical and toroidal surface type loops since a large loop area may indicate that this surface forms the basis of symmetry of the component. In all these cases, the axis is constructed parallel to the loop normal, passing through the centroid as calculated in Step 1.

Fig. 15. Symmetry axis definition for ‘coaxial’ loops.

As a result of the symmetry plane and axis construction stage of the process there may be several identical planes and axes in existence. The more loops associated with a plane or axis of symmetry and the greater their cumulative area, the stronger the symmetry about that plane or axis is considered to be. By elimination of all duplicate planes and axes, the associated loops can be grouped accordingly and their cumulative area can be calculated. This minimises the complexity, and enables candidate planes and axes to be ranked in Step 5 and incidentally reduces the size of the input data. Duplicate planes and axes can be eliminated by an iterative comparison of their location and orientation. Two entities are first checked for parallelism. The default accuracy of the ACIS modeller is used and this is based on the ratio of the smallest meaningful quantity representable to the largest, which in this application is 10210. If that criterion is satisfied, a point on the first entity is checked for its proximity to the second entity. Again the default accuracy of the modeller is used which in this situation is the smallest meaningful quantity representable, 1026, which represents the distance below which two points are considered to be coincident [42]. If many loops are symmetric about an identical plane or axis then this is one indication of the importance of that particular plane or axis. The other significant factor is the total area of those loops that are symmetric about a plane or axis. For this reason, as the duplicate symmetry entities are eliminated, their associated entities are grouped accordingly and the cumulative area is associated with that symmetry item. In the case of a symmetry axis, all contributing loops

Fig. 17. Symmetry plane definition for parallel loops (neither coaxial nor coplanar).

684

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

are grouped together in a list. In the case of symmetry planes, those loops which fall on the same side of the plane, are grouped together in a list and hence repeated features can be identified. A loop may belong to more than one list if it contributes to more than one symmetry plane. These lists remain linked with their associated symmetry entity so that the most significant features can be highlighted according to the significance of each symmetry found. 5.5. Step 5—extract the primary symmetry axes Candidate planes and axes of symmetry, as stated earlier may be ranked according to the number and cumulative area of their associated loops. A set of symmetry axes can then be constructed according to the intersections of these entities. The particular set of axes extracted, and the method employed to identify them, is dependent on the requirements of the application. In this particular implementation the primary orthogonal axis set is identified, although the extraction of primary orthogonal axes that do not intersect at an ‘origin’, or the primary symmetry axes in any orientation, are alternative options based on a similar technique. The rationalised set of symmetry planes and axes are ranked according to the total area of their associated loops as calculated in Step 4. Where more than one symmetry entity is associated with the same loop area, they are further sorted according to the number of pairs of loops that they bisect. The primary symmetry axes can then be defined by the intersections of these ranked planes. The axis of strongest symmetry, or ‘major’ symmetric axis, will be defined by the intersection of the plane associated with the maximum cumulative loop area, with the plane associated with the next largest cumulative loop area. Axes resulting from subsequent intersections with the following symmetry planes are tested for coincidence and perpendicularity with the major axis. The iterative comparison continues until an orthogonal set has been defined or until all possible comparisons have been made. Candidate symmetry axes are ranked alongside the symmetry planes in the list of rationalised entities. If the subsequent symmetry entity is an axis then it is tested for coincidence and parallelism with the candidate plane. If the axis is found to lie in the plane then it may belong to the orthogonal set if it fulfils the other criteria of coincidence and perpendicularity with the major axis. Where the maximum cumulative loop area is associated with an axis, that axis represents the strongest symmetry and can be classed as the major symmetric axis of the component. This ranking and consideration of axes alongside the equivalent planes enables rotational symmetries to define the major symmetry when appropriate. This is important since, as discussed earlier, a large proportion of manufacturing parts have rotational symmetry. [N.B. An alternative method to reduce the number of comparisons and the associated computational cost entails

calculation of the third axis once the first two have been found. However, sometimes it is more appropriate that only two axes are found, as a third axis may indicate a symmetry that does not exist.]

6. Aspects of implementation The procedure described earlier has five steps which incorporate many comparison processes and will inevitably be computationally complex. Complexity is always an issue with geometric reasoning techniques and therefore if the method is to be used in an application, we must ensure it is not practically prohibitive. 6.1. Computational complexity This section evaluates the computational complexity of the method described in this paper. The five steps described are interdependent, and thus the input size for later steps depends upon the output from previous steps. Hence, the computational complexity of the individual steps is calculated below and the combined computational complexity is discussed at the end of the section [43]. As a general point, in order to control the computational run time associated with the process, information is sorted in the database, whenever appropriate, to reduce the number of comparisons which need to be made and surplus information is discarded at the earliest possible stages. 6.1.1. Step 1—Calculation of loop properties ¼ OðnÞ This step comprises a single iteration through every loop of every face. The order in which the faces and loops are addressed is determined by the default ordering of the solid model, which stores similar entities in lists. The lists have no particular structure. The total number of loops is defined as n and thus the computational complexity is OðnÞ: Despite only being O(n ) there is a large constant associated with this step because of the time required to calculate the loop area and centroid to the required accuracy of 0.1%, particularly for complex surfaces. 6.1.2. Step 2—Identification of matching loops ¼ Oðn log nÞ † Database sort. The first operation, once loop properties have been calculated, is to rank the loops according to their associated surface area. Within these categories, loops are then further sorted by face type, loop type and the number of edges. The default Microsoft Accesse database sorting algorithm has been used in this instance and therefore the computational complexity is uncertain. However, Oðn log nÞ complexity is typical for an efficient sort algorithm [43] and so this has been assumed for this calculation. † Group identical loops. The next stage involves iteration through the sorted list to group matching

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

685

eliminated. Thus, the length of the list is reduced. The worst case occurs when there are no duplicates and every symmetry entity is compared with every other in the list. If there are m items in the list then there are mðm 2 1Þ=2 comparisons and therefore the computational complexity is Oðm2 Þ: The best case occurs when all symmetry entities are identical, as would occur for bilateral symmetry, and therefore all but one are eliminated on the first pass. In such cases, a single iteration of the list results in ðm 2 1Þ comparisons and the computational complexity is OðmÞ: 6.1.5. Step 5—Extraction of primary symmetry axes ¼ Oðp2 Þ In this step, p indicates the number of candidate symmetries remaining after the rationalisation process in Step 4.

Fig. 18. The platonic solids: (a) tetrahedron, (b) hexahedron, (c) octahedron, (d) dodecahedron, (e) icosahedron.

loops. A non-matching loop indicates the start of a new group and hence the list is only traversed once. There are n items in the list associated with n loops and so the computational complexity is OðnÞ:

† Database sort. The set of rationalised symmetry entities is stored in the database and is sorted in descending order of associated surface area. Again, the Microsoft Accesse database sort algorithm is used and so a computational complexity of Oðp log pÞ has been assumed, as previously, where p is the number of rationalised symmetry planes. † Calculate symmetry axis set. This step is dependent on the choice of method and the required axes of symmetry. In the current implementation, an orthogonal axis set is the target of the search and the process will continue until two axes have been found and the third can be calculated. The worst case occurs when the second axis cannot be defined and the search runs to completion, intersecting every entity with every other entity. This requires pðp 2 1Þ=2 operations and has a computational complexity of Oðp2 Þ: 6.2. Combined complexity

6.1.3. Step 3—Construction of symmetry axes and planes ¼ Oðn2 Þ The maximum number of symmetry planes and axes occur when all loops have identical characteristics. In this situation every loop is paired with every other loop for construction of a symmetry entity, resulting in a maximum of nðn 2 1Þ=2 combinations. This number of operations results in a worst case computational complexity of Oðn2 Þ: When there are no matching loops in the component, the iterative process passes through all n groups of matching loops once and the computational complexity is OðnÞ: The best case occurs when bilateral symmetry of the component exists with no other duplication of any particular loop. One operation for each pair of loops results in n/2 operations giving a computational complexity of OðnÞ: 6.1.4. Step 4—Rationalisation of symmetry axes and planes ¼ Oðm2 Þ The number of symmetry planes and axes resulting from the previous step is indicated by m. The symmetry entities are stored in two lists, one for axes and one for planes, and every plane or axis must be compared with every other entity in its list. Starting at the top of the list, the entity is compared with all subsequent entities and duplicates are

An initial evaluation concludes that the worst case scenario at Step 3 produces approximately m ¼ n2 =2 symmetry entities and so the combined effect of Steps 3 and 4 would be approximately n 4/4 operations and Oðn4 Þ computational complexity. However, this situation can never arise. To obtain n 2/2 symmetry entities at Step 3 requires that the component be a regular polyhedron or a combination of several polyhedra of the same type. The Platonic Solids, shown in Fig. 18 are the prime examples of regular polyhedra and Fig. 19 shows some alternative examples of components with identical face loops. In all cases, with the exception of a single tetrahedron (requiring only 15 operations at Step 4 , n 2), the inherent symmetries of these solids ensure that many duplicate symmetry planes occur and so Step 4 never runs to its worst case complexity. In conclusion, the worst-case scenarios for Steps 3 and 4 can never occur simultaneously. Hence, calculating the worst case complexity for all steps combined becomes an arduous task. The average case complexity must lie between the ‘best’ case scenario of Oðn2 Þ and the impossible worst case scenario of Oðn4 Þ: However, this is also difficult to define. Graphs 1 and 2 show the maximum possible number of operations

686

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692 Table 1 Summary data for case studies

Fig. 19. Components with uniform faces.

required for the Platonic solids and a set of solids based on Fig. 19(a), respectively. In all cases it is assumed that the duplicate planes are at the end of the list for each iteration in Step 4. Typical running times for a selection of components are shown in the examples in Section 7. The tests indicate that even for components with over 100 loops, running times are not prohibitive.

7. Test cases The following examples show a range of objects exhibiting properties to test all aspects of the symmetry detection method. The first object is a simple object containing only nine loops for illustrative purposes. The tables show the extracts from the database at each stage of the procedure and demonstrate the processes at work. The remaining examples, taken from the NIST Design

Test case

1

2

3

4

No. of faces No. of loops Total no. of symmetry planes Total no. of symmetry axes No. rationalised symmetry entities Running time (s) Step 1 Step 2 Step 3 Step 4 Step 5 Total running time (s)

7 9 4 1 4

70 82 61 23 15

84 86 19 19 13

421 540 1304 78 161

0.336 0.046 0.231 0.105 0.092 0.810

2.729 0.206 3.220 1.445 0.113 7.713

11.436 0.145 1.641 0.784 0.993 14.999

18.687 1.134 46.410 63.160 2.424 131.815

Repository [44], show components of increased complexity with a range of surface and symmetry types. Table 1 summarises the number of entities at each stage and the associated running time, in each case. The figures show the major symmetry axes extracted, with the primary, secondary and tertiary axes (where calculated) identified accordingly. The procedure also highlights matching loops to provide additional feedback. The test cases were performed on a Dell Dimension XPS B1000r personal computer with a 1 GHz Processor and 512 MB RDRAM. The CPU time for each step of the process is shown.

Graph 1. Number of Step 4 operations for the platonic solids.

Graph 2. Number of Step 4 operations for Fig. 19(a) type objects.

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

7.1. Test case 1—Illustrative example

687

688

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

Fig. 20. Test case 2, piston head.

The tables in the illustrative example show the properties calculated for each face and each loop of the object, respectively. As construction of the symmetry planes and axes progresses data relating to each is stored in one of the following two tables as appropriate. It can be seen from the diagram that faces 2 and 4 and faces 6 and 7 share the same plane of symmetry and this is reflected in the ‘SameAs Plane’ column of the ‘Symm Planes’ table. This results in a total of only four symmetry entities after rationalisation, as shown in the final database table. The second example shows a piston head (Fig. 20) exhibiting a combination of rotational and reflective symmetries. It may be surprising that the secondary and tertiary axes of symmetry, parallel and perpendicular to the hole, do not actually coincide with the hole. This may be due to two factors. The depressions associated with the piston rings generate planes of symmetry with greater associated area than the cylindrical faces of the hole. In addition, the symmetry entity generated by a pair of matching cylindrical faces is dependent on their relative directions. If the direction is the same for the two cylindrical holes in the above example

Fig. 21. Test case 3, camera.

Fig. 22. Test case 4, electrical wiring block.

then an axis will be generated. If their relative directions are opposed then a plane of symmetry that bisects the two will be generated. In the above example, it happens that the directions of the two cylindrical holes are identical and so it is the first factor that determines the location of the secondary and tertiary axes in this instance. The camera shown in Fig. 21 demonstrates the procedure applied to an object that exhibits only partial symmetry. The primary symmetry axes are determined, based only on the symmetric elements of the boundary. The final example shown in Fig. 22 demonstrates the procedure applied to a complex object with many faces and loops.

8. Limitations Although testing of the method with models of ‘every day’ engineering components has not highlighted any particular problems, there are clear shortcomings in this implementation. Four examples are described here, the latter three of which consist of cases where loop areas are equal but the faces still do not match. Thus throughout this paper the use of the term ‘algorithm’ has been avoided in relation to the technique developed, and in fact it may be more precise to describe this implementation as a heuristic. The first of these limitations relates to those faces where the intersecting features do not result in internal loops, but instead disrupt the external boundary of the face. An example is shown in Fig. 23. Where identical loops are similarly disrupted then symmetry will still be detected. However should the boundaries of, what would otherwise be, identical loops be changed differently by intersecting features, the symmetry will not be identified. In the example, the slot disrupts the boundaries of two faces that would otherwise form symmetric pairs with faces on the opposite side of the rectangular prism. However, in

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

689

Fig. 23. Asymmetry due to intersecting feature.

this particular case, a plane of symmetry would still be defined by the two undisturbed faces. This limitation does not cause significant disruption to the technique because if the plane of symmetry is of sufficient importance then it will be identified by other pairs of matching loops. The second limitation, however rare, is more easily addressed. As Fig. 24(a) and (b) demonstrate, the process may identify a pair of loops as symmetric, which actually are not. This may happen by chance in any type of face although it seems intuitively more likely to occur in planar and cylindrical faces where the loop area directly correlates with the standard variables, height and width. For instance, doubling the height of a cylinder doubles its area, and similarly if its diameter is doubled (Fig. 24(b)). The same is not true of spheres, tori or spline faces as demonstrated in Fig. 25, where in the case of a sphere doubling the radius actually increases the surface area fourfold. This limitation is due to the loss of information incurred in the mapping from a ‘real’ object to a set of loop properties. The obvious way to address the issue is to retain as much information as possible. In this particular instance,

Fig. 24. Mistaken symmetry of asymmetric loops: (a) asymmetric planar faces with matching loop area, (b) asymmetric cylindrical faces with matching loop area.

Fig. 25. Surface area calculations for spheres and tori.

by calculating and storing the length of the loop perimeter, further validation of matched loops can be performed. However, for the frequency with which this problem occurs, it is debatable as to whether the additional calculations warrant inclusion. The loss of information leading to this limitation may cause further difficulties with the technique. The following limitations are further examples of the problems that may be encountered. The third limitation relates to skew faces. The symmetry detection method has not been defined to identify skew symmetries since for the purposes of DFA and assembly sequence analyses, skew symmetry is effectively asymmetry. However, as the object in Fig. 26 shows, there may be some situations where an object gives rise to identical faces at skewed angles and thus the symmetry detection process will include these faces in its considerations. The different orientation of these faces, due to the relative rotation about the centroid of each face, will not be identified and the symmetry plane that is constructed will not reflect this characteristic. The calculation and comparison of the principle axes associated with each loop may provide a solution to this problem, but again the symmetries of the adjacent faces within the object will override the effects of a single ‘skewed’ face in the determination of overall symmetry.

Fig. 26. Symmetry of skewed faces.

690

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

Fig. 27. Intuitive vs. actual symmetry of spherical faces.

The final limitation that will be discussed here relates to the sense of features in terms of protrusions and depressions. Fig. 27(c) shows the symmetry plane constructed according to two identical semi-spherical faces, one of which is a protrusion and the other of which is a depression in the solid. Intuitively in this situation, a symmetry axis parallel to the surface normals, n, would seem a more appropriate construction, as would have been obtained from just one of the spheres in isolation (Fig. 27(a)). The construction of a plane perpendicular to the surface normals is due to their relative directions, which are calculated such that they always point away from the solid region. This convention must be sustained in order to maintain the consistency of the results in respect of other situations that may occur. For example, Fig. 28(b) shows a situation where the plane bisecting the features, according to the adopted convention, is intuitively more correct than the plane which runs parallel to them (Fig. 28(a)). Similar scenarios can occur with other types of face although intuitively, the risk of occurrence is less for planar and cylindrical/conical faces. When features made up of planar faces form identical protrusions and depressions, there are often loops within the features that give rise to symmetry planes and axes with overriding

Fig. 28. Construction of symmetry planes: (a) contrary to convention, (b) according to convention.

significance, unaffected by the difference in sense. When the intersecting feature is a cylindrical face, the problem is not likely to occur since, for external loops, the surface normal is defined as the cylinder direction (Section 5). When an internal cylindrical loop is present in the feature the problem will arise but be of little significance due to the smaller area of the internal loop, compared with the external loop(s). Given the potential failings of the method, there is obviously scope for further work on the subject. In the context of DFA and assembly sequence generation, however, the additional overhead required for the calculation, storage and comparison of further loop properties is deemed unnecessary.

9. Conclusions and further work This paper has reviewed existing methods for detection of symmetry in CAD models and has described one implementation of a symmetry detection technique which uses a comparison of loop properties to identify candidate axes and planes of symmetry. This approach enables the requirements of symmetry detection for assembly analysis to be fulfilled. In particular it enables the symmetric and asymmetric elements of the object boundary to be isolated and provides criteria by which the most significant symmetries can be identified. Depending upon the application the implementation can be adjusted accordingly. For instance, a measure of symmetry may be calculated according to the surface area and number of loops associated with each axis/plane of symmetry detected. It is also possible to group all loops, which are symmetric about a common axis/plane and thereby isolate the asymmetric portions of the boundary for further consideration. A further application of the methodology may involve the relaxation of the tolerances used during the comparison of loops to identify approximate symmetries, which occur, for example, in digitised input. Finally, those symmetry planes and axes that are found using this technique may form patterns themselves and this enables the relationship

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

between reflective and rotational symmetries to be exploited so that simultaneous identification of both types of symmetry is possible. Thus the detection of n-fold rotational symmetry provides scope for further development of this particular implementation. It was found that a major obstacle to implementation of this technique is the imprecision of geometric and topological definitions in solid modelling systems. Therefore the paper has described the properties required for appropriate comparisons to be made between loops. Determination of these properties using a ‘typical’ boundary representation solid modelling system has been described with reference to the Spatial Technology ACIS Solid Modelling system. The loop-based approach has potential not only for the detection of symmetry and the major symmetry axes, but can be adapted and extended for use in other geometric reasoning procedures. A major requirement of assembly analysis is the determination of shape complexity. In DFA, an engineering component is classified as being largely a solid of revolution, a rectangular or cubic prism or a thin wall section part. The properties of the loops represented in the solid model can be used to identify the category of part. The symmetry analysis can then be used to further refine the complexity rating, according to the number of different axes found.

Acknowledgments The authors would like to express their thanks to Ken Swift at the University of Hull, and Carlos Rodriguez-Toro at Cranfield University for their assistance and invaluable advice. This research has been carried out under EPSRC Grant Numbers GR/K 74401 and GR/M 55145.

References [1] Tate SJ, Jared GEM, Brown NJ, Swift KG. An introduction to the Designers’ Sandpit. DETC/DFM-14014. Proceedings of the Fifth ASME Design for Manufacturing Conference, Baltimore, Maryland; September 2000. [2] Barnes CJ, Dalgleish GF, Jared GEM, Mei H, Swift KG. Assembly oriented design. Proceedings of the IEEE Symposium on Assembly and Task Planning (ISATP 99), Porto, Portugal; 1999. p. 45–50. [3] Martin RR, Dutta D. Tools for asymmetry rectification in shape design. J Syst Engng 1996;6:98–112. [4] Weyl H. Symmetry. Princeton, New Jersey: Princeton University Press; 1952. [5] Rosen J. Symmetry in science—an introduction to the general theory. New York: Springer–Verlag; 1995. [6] Davis ST, Jahnke JC. Unity and the golden section: rules for aesthetic choice? Am J Psychol 1991;104(2):257 –77. [7] Fukushima S. Division-based analysis of symmetry and its application. IEEE Trans Pattern Anal Mach Intell 1997;19(2):144–8. [8] Introduction to Pro/ENGINEERw Training Guide, Parametric Technology Corporation; 1998.

691

[9] Knuth DE, Morris JH, Pratt VR. Fast pattern matching in strings. SIAM J Comput 1977;6(2):323– 50. [10] Highnam PT. Optimal algorithms for finding the symmetries of a planar point set. Information Process Lett 1986;22:219– 22. [11] Atallah MJ. On symmetry detection. IEEE Trans Comput 1985;C34(7):663– 6. [12] Wolter JD, Woo TC, Volz RA. Optimal algorithms for symmetry detection in two and three dimensions. Visual Comput 1985;1:37– 48. [13] Jiang XY, Bunke H. A simple and efficient algorithm for determining the symmetries of polyhedra. CVGIP: Graph Models Image Process 1992;54(1):91–5. [14] Eades P. Symmetry finding algorithms,. In: Toussaint GT, editor. Computational morphology. Amsterdam: Elsevier/North-Holland; 1988. [15] Parui SR, Dutta Majumder D. Symmetry analysis by computer. Pattern Recogn 1983;16(1):63– 7. [16] Curwen RW, Mundy JL, Stewart C. Recognition of Plane Projective Symmetry. Proceedings of 1997 40th Midwest Symposium on Circuits and Systems, Part 2 of 2, vol. 2; 1997. p. 896–900. [17] Parry-Barwick S, Bowyer A. Woodwark’s method for feature recognition. Technical Report 099/1992, University of Bath, School of Mechanical Engineering; 1992. [18] Parry-Barwick S, Bowyer A. Symmetry analysis and geometric modelling. Proceedings DICTA’93, Digital Image Computing— Techniques and Applications, Pub. Australian Pattern Recognition Society, Sydney; 1993. p. 39– 46. [19] Kulkarni P, Dutta D, Saigal R. An investigation of techniques for asymmetry rectification. Trans ASME J Mech Des 1995;117:620 –6. [20] Marola G. On the detection of the axes of symmetry of symmetric and almost symmetric planar images. IEEE Trans Pattern Anal Mach Intell 1989;11(1):104–8. [21] Zabrodsky H, Peleg S, Avnir D. Symmetry as a continuous feature. IEEE Trans Pattern Anal Mach Intell 1995;17(12):1154–66. [22] Lin J-C, Chou S-L, Tsai W-H. Detection of rotationally symmetric shape orientations by fold-invariant shape-specific points. Pattern Recogn 1992;25(5):473 –82. [23] Kanatani K. Comments on “symmetry as a continuous feature”. IEEE Trans Pattern Anal Mach Intell 1997;19(3):246–7. [24] Minovic P, Ishikawa S, Kato K. Symmetry identification of a 3-D object represented by octree. IEEE Trans Pattern Anal Mach Intell 1993;15(5):507–14. [25] Sun C, Sherrah J. 3D symmetry detection using the extended gaussian image. IEEE Trans Pattern Anal Mach Intell 1997;19(2):164– 8. [26] Davis LS. Understanding Shape: II. Symmetry. IEEE Trans Syst, Man Cybernetics 1977;204–12. [27] Lee DT. Medial axis transform of a planar shape. IEEE Trans Pattern Anal Mach Intell 1982;PAMI-4(4):363–9. [28] Kilani MI, Sturges RH. Detection and evaluation of orientation features for computer-aided design part models. J Engng Design 1991; 2(3):231– 45. [29] Boothroyd G, Dewhurst P. Product design for assembly. Rhode Island, USA: Boothroyd Dewhurst Inc; 1989. [30] Rosario LM, Knight WA. Design for assembly analysis: extraction of geometric features from a CAD system data base. Annals CIRP 1989; 38(1):13– 16. [31] Myers WL, Dixon JR, Simmons MK. Computer analysis of mechanical assemblies from a CAD data base: manual handling times. Proceedings of ASME Computers in Engineering Conference, New York; 1987 p. 167 –72. [32] Ong N-S, Chua C-K, Lee E-W. Geometric analysis of parts from a 3-D solid model for manual assembly times. Integrated Manufact Syst 1997;8(3):137–46. [33] Ma R, Yang J, Qin P, Chen R. New method for part symmetry automated recognition in DFA. J China Textile Univ (Engl Ed) 1997; 14(3):16– 20. [34] Sturges RH, Hunt DO. Detection and evaluation of planes of partial symmetry in CAD models. ASME 20th Design Automation Conference 1994;DE-69-1:443 –51.

692

S.J. Tate, G.E.M. Jared / Computer-Aided Design 35 (2003) 673–692

[35] Wagemans J. Detection of visual symmetries. Spatial Vision 1995; 9(1):9–32. [36] Locher P, Cavegn D, Groner M, Muller P, d’Ydewalle G, Groner R. The effects of stimulus symmetry and task requirements on scanning patterns. In: d’Ydewalle G, Van Rensbergen J, editors. Studies in visual information processing. Vol. 4: Perception and Cognition, Advances in Eye Movement Research, Amsterdam: Elsevier Science/ North-Holland; 1993. p. 59–69. [37] Palmer SE, Hemenway K. Orientation and Symmetry: Effects of multiple, rotational and near symmetries. J Exp Psychol: Human Percept Perform 1978;4:691–702. [38] Barlow HB, Reeves BC. The versatility and absolute efficiency of detecting mirror symmetry in random dot displays. Vision Res 1979; 19:783–93. [39] Timmer HG, Stern JM. Computation of global geometric properties of solid objects. Comput-Aided Des 1980;12(6):301–304. [40] Armstrong C, Bowyer A, Cameron S, Corney J, Jared G, Martin R, Middleditch A, Sabin M, Salmon J. DJINN: a geometric interface for solid modelling—specification and report. Information geometers, Winchester, UK, ISBN 1-874728-13-5; 2000. [41] Tate SJ. Symmetry and shape analysis for assembly-oriented CAD. PhD Thesis, Cranfield University; August 2000. [42] ACIS Geometric Modeler 7.0 Applicatio7 Guide, Spatial Technology Inc.; 2001. [43] Weiss MA. Data structures and algorithm analysis. California: Benjamin/Cummings; 1992. [44] Regli W. NIST Design, Process Planning and Assembly Repository, http://www.mel.nist.gov/pptb/; June 1997.

Susan Tate is a researcher in the School of Industrial and Manufacturing Science at Cranfield University, UK, where she recently completed her PhD. She is currently colocated in the Department of Engineering at the University of Hull, developing geometric reasoning and concept design methodologies for the Designers’ Sandpit, a joint research project for development of an assemblyoriented design environment.

Graham Jared has been active in research in geometric computing since he joined the Cambridge University Computer Laboratory CAD Group in 1975. His current research interest is geometric reasoning. He is President of the UK Geometric Modelling Society for 2002.