Decision criteria for computer-aided parting surface design B Ravi and M N Srinivasan
A scientific approach is presented and the related logic developed for design of parting surfaces of patterns, moulds and dies used in the manufacture ot cast, forged, injection-moulded and die-cast components. This has enabled computer-aided generation of parting surfaces and the determination of projected area, flatness and draw for a parting surface, identification of surfaces to which draft is provided, recognition of component segments causing undercuts, testing for dimensional stability, and location of flash, machined surfaces and feeders. Influencing criteria for parting-surface design have been formulated and developed into algorithms implemented on a personal computer. This approach greatly aids the engineer in rational decision making, paving the way for a systematized code for parting-surfac e design. computer-aided design, boundary representation, die castings, forging Castings are manufactured by pouring molten alloys into various shaped mould assemblies. Moulds are in turn prepared by compacting sand around patterns in segments or halves, one each for the bottom and the top mould. A forged component is manufactured by compressing a heated blank between two shaped dies. In die-casting and plastic injection-moulding the material is forced under high pressure into a cavity formed by bringing together two die-halves. In all these manufacturing processes, the design of patterns, moulds and dies, the crucial tooling, directly affects productivity and component quality. The most significant design aspect is the choice of the surface separating the two halves of the mould or die, referred to as the parting surface (Figure 1). A combination of several mechanical, metallurgical and process parameters influences parting-surface location, rendering the design exercise complex. Parting surfaces for typical components are suggested through illustrations in technical literature 1'2. A few broad recommendations for locating the parting surface are available. Matousek 3 discusses the effect of locating the parting plane at different positions on a lever handle Department of Mechanical Engineering, Indian Institute of Science, Bangalore, India 560 012 Paper received: 25 July 1988. Revised: 19 July 1989
volume 22 number 1 jan/feb 1990
...----- - - " - ~ - ~ "
p•sPS
PS
Ps
Figure 1. Parting surface-': flat (top left), stepped (top right), profiled (bottom left) and complex (bottom right) and indicates the one that allows the part to be 'forged most satisfactorily'. Pye4 states that the 'parting line must occur along the line round the position of maximum dimension when viewed in the draw direction'. Sergeichev ~suggests that the contour along which lines from the boundary of the projection of the solid meet the component would be the parting surface. The importance of locating the parting surface so as to minimize the number of cores and achieve dimensional stability has been emphasized in literature 12. Guidelines such as these have not been logically collated. Computer-aided component and tool design enables analysis of several design options, and offers many other advantages 6. In mould-making, the application of CADCAM has so far been for solid modelling, addition of shrink factors, mould base design, flow analysis for gating design, thermal analysis and the determination of tool paths for NC manufacture of the mould 7'~'~. Rouse~ describes the various software packages that perform one or more of the above tasks. At the present time, there appears to be no published work regarding decision support systems for the design of mould parting surfaces. An attempt has been made to recognize various criteria influencing parting-surface design and develop
0010-4485/90/010011-08 $03.00 c: 1990 Butterworth & Co (Publishers) Ltd
11
a design code based on scientific rationale. Algorithms for generating several parting-surface alternatives and for evaluating them by assessing the influencing criteria have evolved for implementation on a computer. It is hoped that this approach will provide a better insight on the design exercise and enable rational solutions for complex components, which hitherto needed considerable intuition and design skills.
PARTING SURFACE For purposes of computer modelling, a component is represented by its boundaries l°u. The solid is defined by a set of nonovertapping face patches; each face patch is a closed loop of linear or curved edges and belongs to a plane or continuously curved surface. Curved boundaries are decomposed into approximating linear edges and planar face patches for display and analysis. A database of the solid consisting of geometric (vertex coordinates), topological (vertex-edge-face relationships) and technological (machining allowance, dimensional tolerance and location of flash) information is used for parting-surface generation and analysis. The parting surface may be flat or irregular- stepped, profiled or complex, depending on the geometrical complexity of the part being manufactured (Figure 1). To minimize tooling and manufacturing costs, the parting surface is usually designed flat and is graphically denoted by section lines passing through the orthographic views of the component. An irregular parting surface, for which this notation is inadequate, is defined here as a compound surface consisting of a set of connected face patches. The flat parting surface is essentially a special case in which there is only one plane face patch in the set. The draw vector n for a parting surface is defined as the unit vector in the positive coordinate direction along which the mould halves are separated during manufacture (Figure 2). The orthographic plane normal
f \
to the draw direction is the corresponding view plane VP. Design alternatives for the parting surface are either computer generated or interactively input. A flat parting surface is produced parallel to an orthographic view plane at the section having the maximum crosssectional area. For a given view plane, if several sections have the same area, then the parting surface is located so as to minimize the draw. Algorithms for computing the section area and draw are described later. Interactive input involves specifying the vertices, edges and face patches belonging to the parting surface. The parting surface alternatives are analysed by evaluating the decision criteria described in the following section.
DECISION CRITERIA Nine influencing parameters for decision making in parting-surface design for a component have been identified:projected area, flatness, draw, draft, undercuts, dimensional stability, flash, machined surfaces and directional solidification. Algorithms for the assessment of these criteria are discussed here. (The notation employed is shown in Table 1.)
Projected area To facilitate removal of the pattern from the mould or the manufactured component from the die, the crosssectional area should gradually decrease from the parting surface to points farthest from the parting surface. The basal plane of an upright cone or the diametrical plane of a sphere satisfy this requirement. This condition is applicable to flat as well as irregular parting surfaces. The following decision criterion is
Table 1. Notation
Symbol
Meaning
Q S, PS~ F, E, V X,
Solid= [Si:S,c Q} Compound surface j = {F,: F, c Sj} Parting surface j = { F,: F; c PS,} Face patch i Edge i Vertex i Primitive i, which can be a vertex, edge, face patch, surface or the solid Draw vector for PSi Normal to face patch i in a direction away from the interior of the solid Orthographic view plane normal to ni Distance of primitive X, from VP along draw vector Area of primitive X, Projected area of primitive X, on VP Solid intersected by surface/(result: surface) Surface/intersected by surface j (result: edge) Surface i intersected by edge j (result: point) Number of primitives produced by the intersection of primitive X, with Xi Criterion i for parting surface j
n~
ti
VPj h(Xi)
t"
z
X
Figure 2. View plane VP and draw vector n
12
VP
A(X) P(X,) Qr~S, S i W Ss S,c~Ei N(X, r~ Xi) Ci,
computer-aided design
undercuts have been considered in developing the algorithm.
proposed to evaluate the parting surface alternatives. Minimize Cli = P(Q)/P(Q r~ PSi) A surface that has the projected area of its intersection with the solid the same as the projected area of the solid represents the parting surface with the least value of this criterion. Because the projected area in Figure 3 of the flat parting surface 2 - 2 ' is smaller than that of the stepped parting surface 1-1 '-1 "-2', the criterion favours the stepped parting surface. For a flat parting surface normal to draw direction, the projected area is equal to the area of intersection, in effect suggesting the suitability of the parting surface located at the section of the component with the maximum area.
Draw Draw is the minimum distance through which a component is linearly translated in order to clear it from the mould (Figure 4). Design considerations such as application of draft to the vertical surfaces of mould and metallurgical and technological problems such as grain flow in forgings, flask size in castings and machine draw capability in injection moulding, as well as increase of cycle time and reduced productivity, are caused by deep draw. Taking these into consideration, the logical expression developed for the design of parting surfaces is stated as follows:
Flatness Considering technological aspects such as side thrust, dimensional stability, sealing off, flash, and complexity in tooling and mould-making, a flat parting surface is preferred over an irregular one 12. The decision criterion developed for selecting the parting surface that has the highest degree of flatness is: Minimize C2j = A(Q r~ PSj)/P(Q r~ PSi) The extent of irregularity in the form of curvature or steps is expressed as the ratio of the area of intersection of the solid with the parting surface to the projected area of the parting surface on the view plane normal to the draw vector. For the flat parting surface 2 - 2 ' (Figure 3), the criterion evaluates to 22'/BD = 1, whereas for the stepped parting surface 1 - 1 ' - 1 " - 2 ' , the criterion assessment is greater than 1. The criterion also favours a parting surface with the least inclination to the orthographic view plane normal to the draw vector. A flat parting surface normal to the draw direction is considered the most suitable. To compute the value of C2i an algorithm for determining the area of intersection of a surface with the solid has been developed and implemented (see Appendix). Geometric complexities such as hollows and
I
1 Minimize C~i = ~ max I h(V,) - h(PSi) [ where L is the maximum dimension of the solid. The draw is computed by comparing the distance of each vertex of the solid from the parting surface along the draw vector and taking the maximum value. The rms value of heights of vertex points from the parting surface has also yielded interesting results in assessing the draw.
Draft A conical or pyramidal part is drawn along its axis from a mould with ease compared to a straight cylinder or rectangular part. Surface quality, interracial interaction between the pattern or component and the mould or die, the extent of draw and related factors also contribute to this effect. All such faces of the component that are parallel to the draw vector are given a small taper or draft to aid in easy withdrawal. Surfaces that are not parallel to the draw direction are considered to have a natural draft or form undercuts (Figure 5). Application of draft results in the alteration of the part geometry and additional machining may be required to restore the shape of the component. Considering the above factors, the criterion is given by: inimiz
3I
where the face patches Fi are such that ti.n i = 0.
~° z .........
C
,S oO
.~,~,* . . . . . . . . . .
I" S ' I° S " S 1 2
'
Ps
S° o o~ °mS j~
I ¸I::I
: ir
3
A
B
I
I
In
C |
Figure 3. Projected area and flatness criterion
volume 22 number 1 january/february 1990
vP
I Draw
I
In
Figure 4. Draw
13
time and tooling and manufacturing costs. Fhe following algorithm is proposed to recognize an undercut face. F, is an undercut face if and only if
/
((t'n;)<0
and
((h(F,)--h(PS))>0))
( ( t ' n i > 0)
and
((h(F,)-- h(PSi)) <0))
or
PS
n
VP Figure 5. Draft criterion: surface 1, draft required; 2 and .3, natural draft; 4, undercut
All the faces of the solid are tested to find those with normals perpendicular to the draw vector. The sum of the areas of such faces is computed and divided by the total surface area of the solid to evaluate this criterion for a given parting surface. The parting surface that has the least value is considered to produce components with the highest geometric fidelity to the original design.
Undercuts Projections or recesses in the component unfavourably inclined with respect to the draw vector hinder the removal of the pattern from the mould or component from the die (Figure 6). It is not always possible to design the parting surface to avoid undercuts completely, so to overcome this, cores or other manufacturing devices like inserts and loose-pieces have to be incorporated. This directly affects the process cycle
As an example, consider the section of a solid. Let the numbered edges denote the end projections of faces normal to the plane of paper (Figure 6). Faces that are not vertical with respect to the parting surface in Figure 6 are: 2, 3, 5, 7, 9, 10 and 11. Face 7 lies along the parting surface and does not interfere in draw; hence it is discarded. Of the remaining faces, those that lie above the parting surface are 2, 3 and 5. Of these three, only faces 2 and 3 have the face normals in a direction opposite to that of the draw vector and, according to the algorithm, form undercuts. Faces below the parting surface to be considered are faces 9, 10 and 11. Of these only face 11 has a face normal in the direction of draw, and forms an undercut. The parting plane is designed from the standpoint of undercuts to have minimal volume of undercut. This is expressed in the form: 1 Minimize C~i= ~,,~ P(F,)Ih(F i ) - h(S~)l where F, is an undercut face, Sk is the parting surface or an intermediate face nearest to F, and V is the volume of the solid given by ]', ]'F z(x, y) dx dy. To determine the volume of undercut, the distance of the undercut face F, from the parting surface is determined. Other faces of the solid are tested to find if any lies in between. The distance of F, from the nearest face multiplied by the projected area of F~ gives the undercut volume associated with the face (see Appendix).
Dimensional stability
81
7
14
61 ._~.._P.s_,
9,t
PS
12
I
11
N
VP
VP
Figure 6. Undercut volume (left) and undercut lace recognition (right)
14
Tile possibility of mismatch between the cope and drag portions of the mould, or at the joint between two die halves, results in dimensional reliability across the parting surface being considerably lower compared to that in the portions of the mould lying on one side of the parting surface (Figure 7). Hence the parting surface is designed such that any two points between which high dimensional tolerance is required occur on the same side of it. In a given component, there are several dimensions demanding high levels of dimensional stability as dictated by functional and related aspects. The suitability of a parting surface for this requirement has been assessed using the following criterion: 1 Minimize C~ =--n ,~ N(E, r~ PSi)
computer-aided design
using the criterion proposed below:
PS A A
1 Minimize Csj = ~ ~ P(Fi)(h(F,)- h(Vk))
.Ps......... . _[--t_-I
i
I[. Vp
[n
Vp
c
II
[n
Figure 7. Dimensional stability: parting surface passing through the component (left) and parting surface lying on one side of the component (right) where E~ are edges connecting the points between which high-dimensional stability is required; and n is the number of pairs of such points. Pairs of points that have tight tolerance between them are specified in the input file of the component. The parting surface producing the least number of intersections with edges connecting such points is considered superior. The limiting case of zero intersections is produced when the whole solid lies on one side of the parting surface (Figure 7), giving the highest possible dimensional stability. Flash
Material flowing into the gaps at the plane of separation of the two mould halves or the interface between mould and a core produces fin-like protrusions or flash. This is generally trimmed after manufacture. However, flash leaves surface imperfections, and in some cases trimming may not be feasible or economically viable. The designer may also specify certain surfaces to be free of flash. Such surfaces must not intersect the parting surface. The criterion is stated in the form:
where F~ are faces such that ((AIIowance(F~)#= 0) and (ti'ni>0)), Vk is the bottom-most vertex of the component such that for all i h(V k) ~< h(V~), and V is the volume of the solid. The projected area of a face patch on the view plane, as influenced by its orientation, is indicative of the casting surface quality. Horizontal surfaces, which have projected area the same as their surface area, are most susceptible to defects. Vertical surfaces, on the other hand, have zero projected area and are the least susceptible. Surfaces that have face normals in a direction opposite to that of the draw vector produce dense defect-free regions and are excluded from consideration. Susceptibility to defects is also influenced by the distance of the surface from the bottom of the casting. Thus horizontal surfaces at the mould top are most prone to defects. The quality of surfaces obtained in a casting as indicated by numbers ranging from 1 for the best to 5 for the worst, is suggested in Figure 8. Interchanging the top and bottom halves of the mould of a casting, or in other words, pouring it in reverse, results in a different set of manufacturing conditions. Hence the criterion for machined surfaces is evaluated twice for each parting surface. F e e d e r s and directional solidification
Solidification of metal in a mould is accompanied by shrinkage, which can manifest in the form of micropores or cavities. This is prevented by promoting controlled solidification initiating in thin sections to proceed
where Fi are faces on which flash should be avoided; and n is the number of such faces. All the face patches F~on which occurrence of flash has to be avoided are specified in the input file of the component along with associated technological information. The parting surface that produces the least number of intersections with such faces is considered the most suitable.
/
/
1 Minimize C7~=-n ~, N(Fi r~ PSi)
PS I
I
I
!
I
!
•
•
!
I
•
i
I
I
i
i
Location of s u r f a c e s to be m a c h i n e d
Critical surfaces of a cast component requiring machining are preferably located as the bottom or the vertical walls of the mould, which are relatively free of defects. In general, a casting may have several machined faces, all of which cannot be located as the bottom or vertical surfaces in the mould. When several alternative parting surfaces are considered, their relative merits are quantitatively assessed for location of machined surfaces
volume 22 number 1 january/february 1990
tl
VP
Figure 8. Susceptibility to surface defects
15
towards thicker sections. The last freezing section is fed by a reservoir of molten metal (a feeder). This introduces definitive conditions on geometric interfaces and interactions between component sections, from which a number of design recommendations on variation of cross-section and joining sections have emerged. Geometry of the casting and its disposition in the mould, particularly on access to the feeder, is considered an important parameter. The parting surface is chosen so that the hot spots (regions of mass concentration) are at the top of the casting. The graph of cross-sectional area against distance along the draw vector provides an effective indicator of hot spots and directional solidification (Figure 9). A sharp variation in the cross-sectional area suggests a hot spot, necessitating a feeder or chill, depending on the magnitude and location of the hot spot 12. Directional solidification is indicated by the variation in crosssectional area from the end towards the heavy sections. To test the parting-surface alternatives from the consideration of feeder location and directional solidification, the following criterion is proposed:
16
,A
14
13
Minimize C~j = % where % is the angle made by the best linear fit in the graph with the axis along which area is plotted. A small angle implies greater variation of the crosssectional area from top to bottom favouring feeding of the casting. When ~ > x/2, the area increases from top to bottom making directional solidification impossible.
RESULTS
I
J
/
7-
o o •Z I / . Z I
In
Figure 9. Cross-sectional area graph
16
Table 2. Test component technological data Machining faces
4-5-18-17 5-6-19-18 1-12-25-13 9-8-21-22 hole
Critical dimensions
4-9, 5-8, 18-21, 17-22, 1-13, 12-25, 11-24, 10-23, 9-22, 8-21
No flash on f a c e
7-8-21-20
AND DISCUSSION
Algorithms written in Pascal for evaluating the partingsurface alternatives for the nine decision criteria identified in this investigation have been implemented on an IBM PC running on MS-DOS. The input to the program is a file containing geometrical, topological and technological information of the component. A cast block (Figure 10) with geometric features encountered in a wide range of mechanical components was modelled to test the algorithms for the generation and analysis of parting surfaces. The technological data for the test component is given in Table 2. Three flat parting surfaces parallel to orthographic planes xy, yz and zx are generated by the program and a stepped
VP
Figure 10. Test component
mo
x
parting surface is interactively input by specifying the face patches (Figure 11). The values of decision criteria C1-C9, computed for each of the four parting surfaces, are given in Table 3. The parting surface with the minimum value of the assessed criterion between the four alternatives can be considered the most appropriate choice. The location of the three flat parting surfaces at the section with maximum area results in the value of the first criterion being equal to 1. Parting surface 1 has the minimum draw as the dimension of the component is the least along the z direction. Area of the faces to which draft has to be applied is a minimum for the case of parting surface 2, effecting the least alteration to component geometry. The stepped parting surface produces no undercuts and is superior in this respect to the three flat parting surfaces. From the point of dimensional stability, parting surface 2 is preferred, since it does not intersect any of the lines joining the pairs of vertices between which high tolerance is required. The two parting surfaces 2 and 4 do not intersect the face on
computer-aided design
8
S
E
//
0 ,,/
2I 2" i
4"
A/Area =
I"
]
4~ III
3'
j~
3" E
I
%
N
/
I I
./
I 0
Figure 11. Parting-surface alternatives Table 3. Computed criteria values for four parting surfaces of test component
Parting surface
A / A max
0
F /
AlAmo x
Figure 12. Cross-sectional area graphs for test component
products is obtained. The parting surface PSi is selected such that for all k, w,c,i <~ ~ w,c,k
View plane Draw vector axis Criterion Projected area Flatness Draw Draft Undercuts Dimensional stability Flash Location of machining faces component upright component inverted Directional solidification component upright component inverted
1 xy z
2 yz x
3 zx y
4 zx y
1.00 1.00 0.44 0.65 0.03 0.60 1.00
1.00 1.00 0.67 0.60 0.12 0 0
1.12 1.00 0.56 0.64 0.02 0.40 1.00
1.00 1.11 0.56 0.64 0 0.40 0
0.04 0.10
0.50 0.49 0.49 0.10 0.83 0.83
0.94 2.51
0 . 9 6 2.19 2.19 2 . 5 3 0.62 0.62
which occurrence of flash is considered deleterious. In terms of location of critical machined surfaces, parting surface 1 is the most appropriate choice. The cross-sectional area graphs generated for the component (Figure 12) suggest that favourable feeding characteristics can be obtained either in parting surface 3 or in parting surface 4 with the component inverted. It can be seen from the above that different decision criteria suggest different design choices. A parting surface with the least value for every decision criterion could not be obtained for the component investigated. This is expected to occur for most, if not all, engineering items encountered. An optimization exercise is therefore required. In order to find the optimal parting surface, the assessed value of each criterion is multiplied by a preassigned weight coefficient, and the sum of the
volume 22 number 1 january/february 1990
i
i
where cii is the assessment value of criterion Ci for parting surface j, and w~ is the weight coefficient for criterion C~. Here, the weights are assigned based on a scientific and technological rationale. This necessitates extensive knowledge of the geometric, technical and process parameters influencing each criterion, apart from the stated requirements and imposed constraints of the user. A separate expert system is under development to perform this task. CONCLUSION
A decision-making scheme on a scientific basis has been developed to assess the design of a parting surface for components manufactured in moulds or dies. Nine different criteria influencing the design have been identified and delineated to allow them to be analysed by computer. The logic developed has been implemented in algorithms on a PC and tested on typical mechanical components. Assessment of parting-surface alternatives using the proposed criteria enables the design engineer to make a rational choice. An investigation is currently under way to develop algorithms for generation by computer of stepped, profiled and complex parting surfaces, and an expert system for assigning weights to the criteria is being built.
REFERENCES 1 Bralla, J G (ed.) Handbook of Product Design for Manufacturing McGraw-Hill (1986) 2 American Society for Metals Metals Handbook (Vol 5, Forging and Casting) ASM (1970)
3 Matousek, R Engineering Design - A Systematic Approach Blackie, London, UK (1974)
17
4 I~/e, R G W Injection Mould Design for Thermoplastics Iliffe, London, UK (1968) 5 gergeichev, N F 'Finding the parting lines on patterns and core boxes' RussianCastingsProduction (December 1962) p 567
6 Westlund, D R and Anderson, G R 'Applying C A D / C A M to foundry tooling' Modern Casting (January 1984) pp 20-24 7 I-Iodgson, G D ' C A D / C A M takes the guesswork out of mold-making' Machine Design Vol 56 No 2 (1984) pp 4 0 - 4 4 8 Rouse, IN E 'CAD software takes the pressure off mold makers' Machine Design Vol 57 No 11 (1985) pp 82-9O 9 Smith, C T and Lee, K 'Computer aided pattern design for casting processes' Trans.Am. Found. Soc. Vol 94 (1986) preprint 8 6 - 0 8 10 Requicha, A A G 'Representation for rigid solids: theory, methods and systems' A C M Comput. Surv. Vol 12 No 4 (1980) pp 437-464
11 Braid, I C 'The synthesis of solids bound by many faces' Commun. ACM Vol 18 No 4 (1975) pp 201 216 12 Ravi, B and Srinivasan, M N 'Hot spot detection and modulus computation by computer graphics' 56th World Foundry Congr. (Dusseldorf, FRG, May 19-23, 1989) pp 12.1-12.8 APPENDIX
- SAMPLE
PROCEDURES
PROCEDURE CrossSection (PS:surface); BEGIN edgeSet:= ~ }; loop := O; REPEAT found1 := false; edge:= 0; REPEAT edge := edge + 1 ; IF checklntersection (edge, PS) THEN IF not (member (edge, edgeSet)) THEN BEGIN edgeSet : = edgeSet + edge; startEdge := edge; found1 := true; END; UNTIL (found1 OR (edge > -- maxEdge)); IF found1 THEN BEGIN loop:= loop + 1; i:=0; REPEAT i:=j+l; p[Ioop, }]:= findlntersectionPoint (edge, PS); nextFace:= findNeighbourFace (edge); ' found2 := false; k:=0; REPEAT k:=k+l; IF checklntersection (faceEdge[k], sectionPlane) THEN BEGIN edge:= faceEdge[k]; edgeSet : = edgeSet + edge;
18
found2 : = true; END; UNTIL found2; UNTIL edge = startEdge; END; UNTIL NOT(found1 ); END; [of procedure} PROCEDURE UndercutVolume (PS: surface); BEGIN ucutVol: = 0; FOR face;= 1 TO maxFace DO BEGIN dist:= height (face, VP(PS)) - height (PS, VP(PS)); orientn := dotProduct (faceNormal(face), drawVector(PS)); IF ((dist > 0 AND orientn < 0) OR (dist < 0 AND orientn > 0)) THEN BEGIN pa:= projectedArea (face, VP(PS)); nearestFace := PS; minDist: = dist; FOR testFace:= 1 TO maxEace DO BEGIN dist := height (testFace, VP(PS)) height (PS, VP(PS)); 1F sameSign (dist, minDist) THEN IF abs (dist) < abs (minDist) THEN IF checklntersection (faceNormal(face), testFace) THEN BEGIN nearestFace : = testFace; minDist : = dist; END; END; ucutVol := ucutVol + pa*abs(minDist); END; END; END; {of procedure} PROCEDURE mcFaces (PS : surface); BEGIN vert := 1; minHeight : = height (vert); maxHeight := minHeight; FOR vert:= 2 TO maxVert DO BEGIN h := height (vert); IF h < minHeight THEN minHeight:= h ELSE IF h > maxHeight THEN maxHeight := h; END; FOR face:= 1 TO maxFace DO BEGIN IF mcAllowance (face) > 0 THEN BEGIN d p : = dotProduct (faceNormal(face), drawVector(PS)); pa: = prolectedArea (face, VP(PS)); IF d p > 0 T H E N mcVol: = mcVol + pa*(height(face)minHeight); ELSE mcVol: = mcVol + pa*(maxHeight height(face); END; END; END; {of procedure}
computer-aided design