Analysis of din' neions and tolerances in computer- aided mechanical design RC Hillyard and IC Braid The paper sets forth a theory to explain how dimensions and views combine to specify the shape o f a mechanical component. It provides o method to determine whether a component is under, over, or exactly defined by a given dimensioning scheme. Measures for assessing the quality o f e scheme are proposed. A solution is offered to a problem o f tolerancing: given a toleranced dimensioning scheme, find the resulting tolerances between undimensioned ports of o component.
Engineers specify the shape of mechanical components and assemblies by means of drawings showing one or more views, usually as plane parallel projections. Hidden lines are removed or dotted and visible portions of objects are annotated with dimensions that fix lengths and angles. Interpreted in the context of the views, the dimensions serve to define fully the shape of a component. If a dimension is toleranced, it is allowed to deviate by a small amount from its nominal size; in consequence the shape will vary too. The annotations must be chosen and disposed in such a way that the object is neither over- nor underdefined. A dimensioning scheme that meets this condition is termed admissib/e. In selecting one from many admissible schemes, much depends on how a component will be made, measured and assembled, and on what is thought to constitute a good dimensioning scheme. The intended effect of tolerances in defining the shape of a component also influences the choice of a dimensioning scheme. Fitting the dimensions conveniently onto the drawing itself, a problem not considered here, may be a further factor. This paper sets forth a theory to explain how dimensions and views combine to specify a shape. It provides a method for determining whether a given dimensioning scheme is admissible. Measures for assessingthe quality of an admissible scheme are proposed. A solution is offered to a common tolerancing problem; that is, given a toleranced admissible scheme, find the resulting tolerances between undimensioned parts of a component. A way is also provided of discovering what tolerances should be applied to given dimensions to achieve a desired precision elsewhere. The results are developed for polytopes in ] D, 2D and 3D, although they would extend to spaces of higher order. This work is intended to lead to the production of dimensioned views from stored shape descriptions. So long Computer Laboratory, Corn ExchangeStreet, CambridgeCB2 3QG UK
volume 10 number 3 may 1 9 " 7 8
as the shape description specifies an object explicitly in terms of faces, edges and vertices, and meets.the definition of a shape model given below, the particular method used to build up the shape description is not important. In the prototype dimensioning system, the shape model is obtained from a volume-based design system in which shapes are made by adding and subtracting such polyhedra as cubes and wedges~. The designer can then simply indicate where dimensions are to be placed; the lengths or angles for the dimensions are computed direct from the model. If a tolerance on any dimension is wanted, the value of the tolerance must be supplied by the designer. The system will draw the dimensioning scheme, and will assist the designer to analyse it using the methods described below.
DEFINITIONS Shape model First of all, a model for the shape of an object is required. It is convenient to store a description of its boundary. For an isolated engineering component, this is the interface between two materials, usually metal and air. The boundary is split up into pieces, termed feces. In each face, a single equation suffices to record the s•rface in which the face lies. Faces meet at edges and edges lie in curves. Edges meet at vertices which are at coordinate points. An object obeys Euler's rule: f+v-e = 2 where f, v and e are the numbers of faces, vertices and edges. The description of how faces, edges and vertices connect is termed (loosely) the topology of an object. The general topological entity, which can be face, edge, vertex or object is called an element. If ALGOL 68 is used
mode element = union (face, edge, vertex, object) The equations of curves and surfaces and coordinate points are stored as real numbers, and together constitute the geometry of an object. In a drawing, the views tend to convey the topology of an object, while the dimensions fix its geometry. However, views and dimensions interact in subtle ways and the matter is further complicated by the curious conventions of dimensioning where, for example, absent dimensions are sometimes quite as significant as those that are present.
Stiffeners For the purposes of dimensioning, an object is regarded as an engineering frame structure whose members and joints
0010-4485/"78/1003-0161 $02.00 © 1978 IPC Business Press
161
correspond to the edges and vertices of the object. The members are initially unconstrained in length; the joints are pinjointed, that is, the angles in which members meet are unconstrained. The members and joints of a face are free to move out of the plane in which they initially lie. Adding a dimension is analogous to adding a stiffener to the frame. Dimensions fix either a distance, an angle or a plane; the equivalent stiffeners, termed struts, webs and plates respectively, prevent strain, shear and torsion in a part of the frame. A simple stiffener is a strut, web or plate; a composite stiffener is a combination of simple stiffeners, one of which is termed the primary stiffener, the others secondary stiffeners. A stiffener runs between two elements, one at each end, which determine how it is attached to the object. Information carried by a stiffener includes the separation, stored as a unit vector and a magnitude, together with a real number for the tolerance, that is, the maximum variation permitted in the magnitude of the primary stiffener. Tolerances for secondary stiffeners can be computed from the primary stiffener tolerance. Three integers record the number of struts, webs or plates that form the stiffener (simple or composite). Their sum is the information content of the stiffener measured in items," for composite stiffeners, this sum is greater than unity. On occasion, a composite stiffener will be found to contribute less than its full information potential. Thus in ALGOL 68 mode stiffener = struct (element to, from vector separation
real length, tolerance int struts, webs, plates)
Figure 1. A strut
jlt f
L_
P
@~'
• = -
o
O
= II ~c
b
&
d
R
Figure 4. Stiffening a chain Figures 1, 2 and 3 are graphical representations of the constraints given by simple stiffeners. The arrows show the direction of the separation vector, except in Figure 2 where the separation vector is perpendicular to the paper. In each case the tolerance is +r. Table 1 gives a list of possible types of stiffener. STIFFENING
A CHAIN
In the simple case of a 1D polytope, here termed a chain, there are v vertices and e edges ranged along a line. The chain has a single face associated with it and Euler's equation is e=v-1. The first and last vertices are joined once to edges; the other vertices each meet two edges. Initially, the vertices of a chain are free to move along the line. Each needs one item of information to fix its position. Hence a total of v items are required. The position of some point in the chain such as its mean point must be fixed to prevent solid-body motion; the remaining v-1 items are supplied by adding an equal number of struts (code A), the only type of stiffener available in 1D. However, unless the struts are correctly positioned, the frame will not be stiff. In Figure 4, section abe is overconstrained while cd is underconstrained, yet the number of struts is equal to the number of edges. In this example, it is evident thatP and Q imply R. When stiffeners combine linearly, redundancies like this can be detected using topological methods. The test is equivalent to finding cycles in a graph 2 . We choose, however to use a method that also takes geometrical factors into account, since this method can be extended to cover 2D and 3D, and has the further advantage of providing an analysis of tolerances. 1.at the positions of the vertices be given by x 1, x2, • •., x v. A strut joining vertex i to vertex j has length I/j, where x i - xj = li]. Differentiating, 6xj - ~xj = $tij or, denoting ~x i by d i and alij by uij (-Tij ~ u i j ~ r/j, where ~ij is the tolerance) di - d / = u i / (1)
fl
11
Figure 2. A web
The v-1 struts give rise to v-1 equations of the form (1) in the unknowns dl, d2 . . . . . dr. A further equation is obtained by fixing the mean point in the chain 1 v
- - ~, x i = c (a constant) v i'--1 and differentiating to get 1
-
V
V
~. di = 0
(2)
i=1
Equations (1) and (2) may be written in matrix form Rd=u
Figure 3. A plate
162
(3)
where R is the rigidity matrix, d the displacement vector and u the variation vector. Considering the case where u is null, that is where all the tolerances are zero, it is observed
computer-aided design
Table 1. Summary of stiffeners Type
Simple or composite
Elements at ends
Strut Strut Strut Web Strut Strut Strut Strut Web Web
S S C S C S C C S C
v-v e-v e-e e-e e-e f-v f-e f-f f-e f-f
Plate
S
f-f
Used for dimensioning in 1D 2D 3D * * * * * * * * * *
Number of structs webs
Number of items of information
Code
plates
1 1 1 0 1 1 1 1 0 0 0
0 0 0 0 0 0 0 1 0 1 1
1 1 2 1 3 1 2 m 1 m-1 m-3
A B C2 G Ca D E F H J K
0 0 1 1 2 0 1 2 1 2 0
Note: mis the number of sides of the plate
that if R is singular, a nontrivial solution for d exists; some or all the vertices are free to move and the chain acts as a mechanism. For the example above, ,
\
\
•
I
¼ ¼ ¼ ¼
da
0
1
-1 0
db
0
1
-1 0
uoi (strut P) u/~ (strut Q)
1
0
-1 0
0
dc
uo( (strut R)
dd .
=
(fixed mean point)
.
By inspection, the determinant is zero, corresponding to the redundancy noted above. In the nonsingular case, equation (3) can be inverted to find the effect of variations expressed as displacements of the joints; d = F u, where F = R -I is the flexibility matrix. By examining the elements of F; the contribution of each variation to the displacement at any joint can be found. We do not know the actual variations, but we do know their bounds: these are the tolerances which we make use of in the assessmenttechniques described later. STIFFENING
A POLYGON
The four types of stiffener available for a polygon (or 2D polytope) are shown in Figure S. The vertex-vertex and edge-vertex stiffeners are struts and fix a length. The edge-edge stiffener, code G, is a web that fixes the angle between two edges, usually but not always adjacent in the polygon. The edge-edge stiffener, code Cz, is composite. It implies that the edges are everywhere separated by L, that is, that they are parallel. Hence the stiffener fixes a length and an angle, and comprises a strut and a web. The tolerance on the strut will be found to govern the separation and the parallelism of the edges. A polygon has two faces, obverse and reverse, and hence Euler's equation is v = e. It has 2v degrees of freedom, since each vertex is free to move in the plane. The 2v items needed to fix and stiffen the polygon are made up of two items to fix the position of some point in the polygon, one item to set its angle of orientation in the plane, and 2v-3 items to be supplied by stiffeners. As before, to check a stiffening scheme, it must first be established that the number of items supplied by the stiffeners is correct. Then the rigidity, matrix is formed.
volume 10 number 3 may 1978
/a
d
Figure 5. 2D stiffeners: (a) vertex-vertex (code A), (b) edge-vertex (code B), (c) edge-edge (code G), (d) edge-edge (code C2) The terms of the matrix are 2D vectors. Stiffeners each cor~tribute one (codes A, B, G) or two (code C2) rows of terms. The position of the solid body and rotation equations of the solid body add a further three rows. Each column corresponds to a vertex of the polygon. For a strut from vertex i at xi to vertex j at xj, of length lij, (xi - xj) • (xi - xj) = Ii] 2 . Differentiating, denoting 6xi, ~xj ~/ij, xi--xj by, respectively, di, dj, u/j, sij (the separation vector)and dividing by 21i/= 21s//I,
(di-d/) = ui/
(4)
For a strut joining an edge to a vertex, the midpoint of the edge is used. If the edge runs from xi to xj and the vertex is at x/c, then
((tit+d/) / 2 - dk) = ui/k
(S)
The separation vector of a web between edges given by vectors el and e2 is defined by il= = 6 where the normal to the plane n = dz X e2, and Is12 I = arctan (let X e21 / el • e2) To find the equation for a web, the single 601j turned through by an edge whose vertices at Xl, x/move by small amounts d/, dj must be determined, that is
6el/= (n X x/j)- (di - dj) / xi/' where xij = xi - xj.
163
v3
This section concludes with an example. Figure 6 shows a polygon for which v=e=5. Of a total of 10 items of information needed to define the polygon, seven must be supplied by the stiffeners. The six stiffeners are given by the following declarations (see earlier section for definition of mode stiffener). stiffener sa = (vl, v2, i, 140, 2, 1,0, 0)
sb= (el, e3,j, 80, 1, 1, 1,0) sc = (e3, v5, j, 40, 1,1, O, O)
sd= (vl, v5, 5"i +12"j, 130, O, 1, O, O)
"L
A= 140£2
'--
"7
se = (el, e2, h, orcton(4, 3)~ 1, O, 1, O)
I"
s f = (el, e4, k, arctan(4,-3), 1, O, 1, O)
F/gum 6. A dimensioned and toleranced polygon For a web between two edges, (xi, xj) and (xh, x/), the net variation in angle uijkl = 6Oij - 60kl is given by x xq. (d/-
d/)lx=ij-
,~ X xk/" (dk - d l ) / X k l = =
uij#/
i
0
0
0
0
Idl
~
(6)
j
0
0
0
0
'O~
0
o
i
0
0
0
O~
0
rotation
i ½j
-i ~j
0 -½j
0 -½j
0
!d4
ua
'A' (strut)
0
_ds. =
ub
'B' (strut)
Pl
-Pl
P2
--P2
0
o
0
0
½j
~j
'C' (strut)
0
0
0
4 P3
Uc
--P3
Ud
'D'(strut)
P l - P 4 P4
0
0
Ue
'E' (web)
-Pl
Ps
-Ps
Uf
'F' (web)
A composite stiffener (code C2) has one equation for a strut and one for a web. A representative point on each edge'is required and again the midpoints may be chosen. Thus for two edges (xi, x]), (xh, x/) for the strut
~'jM" ((di + dj)/2 - (dh + d/)[2 = uijkl
The identifiers i, j, and k denote the unit vectors in the directions X, Y and Z in the figure (i X i = k). The total number of items is seven, which is correct. Next the rigidity matrix is formed. The vertices are at (xr, Yr), r = 1 , . . . , 5. It is found that
(7)
where -~-~-uijkl~ 1" in which ~" is the stiffener tolerance; for the web, equation (6) Is used with ui]hl suitably chosen. To fix the solid-body position of the polygon, the centre of area is chosen as a representative point in the polygon. Hence
-Pl Pl
0
u
translation
(web)
B
where Pl = -- i/A, P2 = i/(x3 - x 4 ) , P3 = ( x s - x : , Y s - Y l ) / D
1 v
-~- ~ Xi = c (a constant) i11
P4 = w/w 2 where w = (Y3-Y2, x 2 - x 3 ) , Ps = w/w2 where w = (Ys --Y4,
X4--Xs
).
and differentiating 1 v
-- ]~ di = 0 v i11
(8)
To form the two rows of the rigidity matrix, one resolves along any two nonparallel directions in the plane of the polygon, say p and q, and obtains two equations v
1 . v 1 ¢~.~; d i = 0 -~ p . F, di= v i=1 i=1
164
((-2.4 u b - 45 0
xi'xi)~ =0 i=1
(9)
--
] .65 Uc + 2.6 Ud + 62.5 Uf),
(Ub + 60 0)) A POLYHEDRON
There are six more stiffeners in 3D: the face-vertex, faceedge and face-face struts (D, E, F); the face-edge and face-face web (H, J) and the plate (K). Also, the edge-edge strut is used in its 3D form (C3). The generalized strut and web stiffener equations for 1 D, 2D and 3D are now preserved. The symbol • represents an element. Subscripts 1 and 2 refer to the 'from' and 'to' elements ~,~ • (f(e.) - f ( e , ) ) = . , =
v
(fiX x i ' d i ) / ( Z ; i=1
d4 =
STIFFENING
Finally, to prevent solid-body rotations, it is enough to prohibit rotation of any vector in the polygon, just as solid-body translation is prevented by fixing any point. A vector, for example xi, does not rotate if the area swept out is zero, xi X di" fi = 0 where fi is the unit vector out of the plane of the polygon. In general, a normalized, symmetric equation is prefered by analogy with the translation equations v
To simplify the matrix for this example, the position of just one vertex and the orientation of one edge have been fixed. In this case we can invert the matrix. A sample displacement from the inverted matrix is
(10)
1 m(4
where f(e)
=
~
~ di i=1
computer-aided design
13" (f(e,~) -- f(e, )) = 81,
(11)
where f(e) = v(e) X z (e) / v(e)'v(e) I~" (f(e2) - f(el )) = ~ 12
(12)
,'-1
where f(e) = z (e) / Iv(e) I
(O)
-1,
(E)
B
where us2,812 and ¢12 are the variations. For webs p = s12, and for struts, p = a X s12 is used. =12 is the separation vector of the stiffener. For a face-edge or edge-edge strut, a is given by a = i(r/) where t/is an edge at an end of the strut; otherwise a is an arbitrary vector such that a'st2 = O. For an edge e from vertex Xp to vertex Xn, v(e) = Xn - xp whereas, for a face e,
h (F) Figure 8. A cuboid
m(e) v(e)=
~ xiXxi+l i=1
m C=2
Similarly, z(e) = dn - dp for an edge and
(xi X d/+l - X i + l X di)
for a face. re(e) is the number of vertices in element e. Equation (10) is a generalization of equations (1), (4), (5) and (7), while equation (11) is a generalization of equation (6). The use of the strut and web equations is shown in Table 2. The appropriate stiffener for preventing torsional deformation is the plate which constrains a face to remain planar. A plate may be considered to control the flatness of a face. The separation vector is the unit normal to the face and the magnitude may be defined as the square root of the area of the face. The information potential of a plate is m-3, where m is the total number of vertices in the face. A plate has only one 'end'; the other (usually 'to') is unset. The plate equations are formed by considering displacements at m - 3 sets of four vertices chosen from the vertices of the face. Thus, for i = 1, m - 3 1 4:~
((-1 ~/n(xp, Xq, Xr)" ds) = ui
~; x h ' x k h=l
where x h is the position of the hth vertex in the face, is included so that the(ui)which represent movements out of the plane of the face are correctly scaled.
m(e) z(e) = ~ i=1
~---,
r---
(13)
/=1 where p =hi, q = h i + l , r=hj+2, s = h i * 3 in which the subscripts/+1 etc. are computed modulo 4. hi = i is set, and h2, h3, h4 are formed usinghh+l = (hh + 1) modulo(m) • n(a, b, c) = a X b + b X c + e X a is a vector normal to the triangle (a, b, e), and of a magnitude twice its area. The division by
Table 2. Use of stiffener equations
Type
Codes
Equations
Strut Strut Strut Strut Web
A, B, D C2, E C3 F G, H
(10) (10) (11) (10)-(12) (10)-(13) (11)
Web
J
(11)-(13)
Plate
K
(13)
The translation and rotation equations are the 3D equivalents of equations (8) and (9) and are not written down. INFERENCES
The engineering drawing conventions referred to in the section on definitions allow the draftsman to leave certain stiffeners out of a drawing. Experience shows what information may be omitted while preserving an unambiguous description of the object. The interpreter of a drawing is left to infer the existence of such stiffeners. Those stiffeners which should be omitted by an algorithm must be untoleranced and fall into one of the four following categories (where r is the viewing direction and s is the separation vector) • zero-length struts (even composite struts) where r~=0 •
right-angle webs (even composite webs) where rx==O
• plates where r-s=0
r--"
B
,ll kgo _1 "7
Figure 7. Inferred stiffeners
volume 10 number 3 may 1978
Figure 7 shows examples of the first two categories in a 2D object with the stiffeners to be inferred shown in the right-hand picture. Simple 3D objects can sometimes be shown in just two views. The third view may be omitted when the only undefined stiffener is a web which can be deduced from the other views. The cuboid, a deceptively simple object, illustrates the point (Figure 8). It has six faces, 12 edges and eight vertices,
165
Figure 9. Dotum dimensions
in any dimension on the displacements can be discovered; displacements for different sets of variations can be evaluated; and other indicators can be constructed. One such is the worst-case indicator W, the maximum possible displacement at any vertex when all the variations conspire together in their effect. Normally, the effects will cancel to some degree. W is thus a safe but pessimistic indicator. It is defined by W = max (el), (i=1 ,v)
and requires 24 equations. Six of these are accounted for by the rigid-body equations for translation and rotation. Three face-face struts (A, B, C) (four items each) and three face-face webs (D, E, F) (two items out of a possible three each) are employed. The stiffeners, therefore, provide 18 equations giving the required total. Those stiffeners in parentheses would not normally be shown and the broken-line view would be left out altogether.
where e = Gt. t is the tolerance vector and G is formed from the flexibility matrix F: gij = Ififl. As a simple illustration, W is found for two contrasting styles of dimensioning in 1D: datum dimensioning (Figure 9) and chained dimensioning (Figure 10). For an object of v vertices and a tolerance of ¢ on each dimension, Wdatum = ¢ and Wchained = ½(v+l - 2/v)r. The smaller value for W in the datum case (when v~2) supports the intuitive view that datum dimensions give a more rigidly defined shape.
ASSESSMENT
CONCLUSIONS
To compare different dimensioning schemes, a single figure of merit for any scheme must be found. The figure should give an overall indication of the sensitivity of the defined shape to small changes in dimensions. A poor dimensioning scheme will be highly sensitive and, at worst, a mechanism. The problem is equivalent to finding a measure of how well conditioned is the system of equations given by the rigidity matrix. As a first step the matrix is normalized. Plate and strut equations are divided by their stiffener magnitudes. It should be noted that the terms on the right-hand side now correspond to relative tolerances. Next all stiffener equations are multiplied by a characteristic length such as the cube root of the volume of the (3D) object, so as to make the terms of the matrix nondimensional and of roughly unit magnitude. A right-hand side is formed by setting the variations to the maximum values permitted by their (relative) tolerances, given or assumed. Whilst solving the equations, illconditioning is checked for. If the solution is successful, the determinant of the (normalized) matrix can be used as an indicator. Alternatively, the actual displacements obtained can be combined into a figure of merit by averaging, or by finding the greatest among them. If the solution fails, the dimensioning scheme is rejected. In the well-conditioned case the inverse F of the rigidity matrix can also be formed and then the effect of variations
The theory given above explains how dimensions and tolerances act in engineering design, and should make it possible for computers to assist designers in correctly dimensioning components and in setting tolerances. More remains to be done to build a practical system based on these ideas; in particular, curved objects must be handled and the automatic positioning of dimensions on views must be improved. If this can be achieved, it will end the confusion caused by redundant and conflicting dimensions, and will ensure that tolerances are no finer than they need to be, thereby leading to considerable savings in manufacturing costs.
Figure 10. Choined dimensions
166
ACKNOWLEDGEMENT The authors thank Charles Lang who encouraged them to tackle the problem.
REFERENCES 1 Braid, I C 'The synthesis of solids bounded by many faces' CACM Vol 18, (April 1975) pp 209-2i6 2 Voelcker, H Bet al. An introduction to PADL Rep. TM-22, Production Automation Project, University of Rochester (December 1974)
computer-aided design