## CHAPTER 6

## MORE GENERAL SCULPTURED SURFACE TYPES

In this chapter, the most general types of sculptured surfaces available in the system are described. Again, all the surfaces are biparametric in nature, but they range from single patches through surfaces consisting of a mesh of patches to complex surfaces built up out of previously defined simpler ones. In all cases, the constraints imposed in the surface definitions are more complex than those described in the two previous chapters.

## 6.1 INDIVIDUAL 'PATCH' DEFINITIONS

The 'PATCH' surfaces were the first parametric surfaces to be implemented in the Sculptured Surfaces System, and they were used primarily to test the feasibility of using parametric surfaces in an APT context. These surface types still have their uses, however. For example, they may be used - i) as a means for the part programmer to learn about and experiment with the concept of the parametric patch. ii) as a means of interfacing between various external design systems and the APT numerical control system and iii) as a means of describing very complex shapes with small number of patches. Greater flexibility and control is available to the user than with many other types of surface definition in the system, though he needs a good understanding of the underlying concepts to use the PATCH surfaces effectively. The general format for PATCH definitions is as follows: PNTVEC PLUS S = SSURF/PATCH, POLYGN , MINUS , Q1, Q2, ..., Q16, $ PNTSON PLUS MINUS , R1, R2, ..., R16, $ PLUS MINUS , S1, S2, ..., S16 143 144 This illustration shows the definition of a composite surface composed of three individual PATCH surfaces. It should be noted that the responsibility for matching boundaries and cross-boundary slopes between adjoining patches lies with the programmer, since the system does not perform the necessary checks. If automatic checks are desired then the individual patches must be assembled using the COMBIN definition described later in Section 6.4. In the illustration, the PNTVEC, POLYGN and PNTSON options distinguish between the three types of patch definition described in the following sections. The words PLUS or MINUS are merely markers between patches in the present version of the system. Each individual patch is defined in terms of sixteen entities which may be either points or vectors, depending on the type of patch. Specific examples follow.## 6.1.1 THE 'PNTVEC' PATCH

The PNTVEC patch is defined entirely in terms of information specified at the patch corners. At each corner the following values are required: corner point TANSPL direction vector CRSSPL direction vector twist or cross-derivative vector. With the corner points fixed, the four TANSPL vectors fully define the patch boundaries in the major direction, while the CRSSPL vectors define the boundaries in the minor direction. The twist vectors (see Chapter 1) do not affect the boundaries, but they do influence the surface slope across the boundaries and hence modify the interior shape of the patch. Both the directions and the magnitudes of the tangent and twist vectors have significance. As a general rule, an acceptable patch will result if corner tangent vector magnitudes are roughly equal to the distance between the corner points at the ends of the relevant curves. It is not easy to lay down guidelines for choosing twist vectors, but setting these to zero may give acceptable results. If not, they may be varied in a trial and error manner starting from zero. 145 Figure 6.1 146 The point and vector input to the PNTVEC definition is closely related to the canonical form of a surface patch, i.e. the final storage format of a patch specification in the system. This uses precisely the same sixteen entities, though they are expressed in a slightly different manner using four homogeneous coordinates rather than three cartesian coordinates. For a PNTVEC patch the sixteen input entities must occur in the following order: PT00, PT10, TN00, TN10, PT01, PT11, TN01, TN11, CR00, CR10, TW00, TW10, CR01, CR11, TW01, TW11 Here PT denotes a point, TN a TANSPL vector in the major direction, CR a tangent vector in the minor (cross spline) direction and TW a twist vector. The numerical suffices relate to the u and v parameter values at the patch corners; thus for example TN01 denotes the TANSPL vector at the patch corner with u = 0, v = 1 (note that u in the major and v the minor direction). The following example shows the definition of a single PNTVEC patch: P1 = POINT/0,0,0 P2 = POINT/3,0,0 P3 = POINT/0,0,3 P4 = POINT/3,0,3 V1 = VECTOR/2,1,0 V2 = VECTOR/0,1,3, V3 = VECTOR/1,1,1 V4 = VECTOR/0,-1,3 SP4 = SSURF/PATCH,PNTVEC,PLUS, $ P1,P2,V1,V1,P3,P4,V1,V1, $ V2,V4,V3,V3,V4,V2,V3,V3 The resulting surface is illustrated in Figure 6.1. The corner points and corner tangent vectors in the u and v directions are shown labelled on the Figure, but the twist vectors are not depicted, since their physical significance is more obscure. The verification listing for this surface is shown on the next page. The surface is of the mesh type and consequently point, tangent and twist vector information for the patch corners is output. The W (homogeneous) coordinate information may be ignored, and it is a simple matter to confirm that the X,Y,Z coordinate information tallies with the input information for the PNTVEC patch. 147 SCULPTURED SURFACE SPV PT = SURFACE POINT, TN = FIRST (SPLINE) DIRECTION, CS = SECOND (CROSS SPLINE) DIRECTION, NR = SURFACE NORMAL. EACH PATCH HAS FOUR CORNERS PT00, PT10, PT01, PT11. BOUNDARY B1 = PT00 - PT10, B2 = PT00 - PT01, B3 = PT10 - PT11, B4 = PT01 - PT11. NR50, NR05 ETC. REPRESENT SURFACE NORMALS AT INTERIM POINTS. NR05 REPRESENTS A NORMAL AT u = 0, v = 0.5 MIDWAY BETWEEN PT00 - PT01. POSITIVE RADII AND CURVATURES ARE CUPPED IN THE DIRECTION OF THE SURFACE NORMALS NRI, NRJ, NRK SS HEADER TABLE VALUE TABLE SIZE 49 TOPOLOGY TABLE SIZE 4 NUMBER OF PATCHES 1 SURFACE TYPE (MESH = 2) 1 PNTVEC,POLYGN,PNTSON 1 SIGN OF NORMAL (TN X CR) 1 TOTAL SIZE OF SURF 69 NUMBER OF SPLINES 0 NUMBER OF CROSS SPLINES 0 148 X Y Z W X Y Z W PATCH NUMBER 1 PT00 0.000 0.000 0.000 1.000 PT01 0.000 0.000 3.000 1.000 PT10 3.000 0.000 0.000 1.000 PT11 3.000 0.000 3.000 1.000 TN00 2.000 1.000 0.000 0.000 TN01 2.000 1.000 0.000 0.000 TN10 2.000 1.000 0.000 0.000 TN11 2.000 1.000 0.000 0.000 CR00 0.000 1.000 3.000 0.000 CR01 0.000 -1.000 3.000 0.000 CR10 0.000 -1.000 3.000 0.000 CR11 0.000 1.000 3.000 0.000 TW00 1.000 1.000 1.000 0.000 TW01 1.000 1.000 1.000 0.000 TW10 1.000 1.000 1.000 0.000 TW11 1.000 1.000 1.000 0.000 NRI NRJ NRK NROO 0.42857 -0.85714 0.28571 NR50 -0.14142 -0.98995 0.00000 NR10 0.42857 -0.85714 -0.28571 NR01 0.42857 -0.85714 -0.28571 NR51 -0.14142 -0.98995 0.00000 NR11 0.42857 -0.85714 0.28571 NR05 0.44721 -0.89443 0.00000 NR15 0.44721 -0.89443 0.00000 FLAGS=4,4,4,1,B1=0 B2=0 B3=0 B4=0 PT55 1.500 0.000 1.500 NR55 -0.3363 -0.9417 0.000 PATCH AREA = 8.86609 CURVATURES = 0.0287 -0.0287 MEAN & GAUSS = 0.0000 -0.008 RADII = 34.885 - 34.909## 6.1.2 THE 'POLYGN' PATCH

In the POLYGN form of patch definition, the sixteen input entities defining the patch are all points. They are the vertices of a control polyhedron, to which the surface itself is an approximation. In general, the defining points do not actually lie on the surface; the exceptions are the corner points, as will be shown. The control polyedron is an open polyhedron which could be flattened so that its facets form a 3 x 3 array of four-sided elements. The control points which are input are grouped into four groups of four: P1, P2, P3, P4 P5, P6, P7, P8, etc. These groups define four sets of three straight-line edges on the polyhedron as shown in Figure 6.2; the directions of these edges correspond to the major (or u-parameter) direction on the surface patch. 149 Figure 6.2 150 The language defining the POLYGN patch of Figure 6.2 is as follows: P1 = POINT/0,0,3 P2 = POINT/1,1,3 P3 = POINT/2,0,3 P4 = POINT/3,0,3 P5 = POINT/0,-0.5,2 P6 = POINT/1,0,2 P7 = POINT/2,0.5,2 P8 = POINT/3,0,2 P9 = POINT/0,1,1 P10 = POINT/1,1.5,1 P11 = POINT/2,1,1 P12 = POINT/3,-0.5,1 P13 = POINT/0,0,0 P14 = POINT/1,0.3,0 P15 = POINT/2,1,0 P16 = POINT/3,0,0 SPG = SSURF/PATCH,POLYGN,PLUS,P1,P2,P3,P4,P5,P6, $ P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 The physical significance of the control points is as follows. The corner points of the polyhedron and the patch coincide, so that these are fixed at P1, P4, P13 and P16. The boundary curves of the patch are determined by the set of three straight line segments forming the corresponding boundary of the polyhedron. In particular, the directions of the line segments which meet at the patch corners coincide with the TANSPL and CRSSPL directions of the patch boundary curves there. For example, at the corner point P1 the boundary curves have tangents in the directions of P1P2 and P1P5. Finally, the four interior polyhedron points P6, P7, P10 and P11 do not affect the boundary of the patch but, like the twist vector in the PNTVEC definition, control its interior shape. The precise relationships between the control points and the patch properties at the u = 0, v = 0 corner are as follows: Corner point = P1 TANSPL (u-tangent) vector = 3 (P2 - P1) CRSSPL (v-tangent) vector = 3 (P5 - P1) Twist vector = 9 ((P6 - P5) - (P2 - P1)) Similar relationships hold at the other patch corners. 151 152 Since the polyhedron and the patch may be regarded as approximations to each other, it follows that the patch can be modified by the user in a predictable way by movement of the control points. Such control does not require detailed knowledge of the mathematics of surface patches, and may be utilised intuitively. This fact was first exploited in the UNISURF system developed by the French automobile company Renault under the leadership of Pierre Bezier. Two special modes of input are provided for the POLYGN patch. These are - Ruled patch: if points P5 to P12 are all given identical values, the system will generate a ruled surface through the boundary curves defined by P1, P2, P3, P4 and P13, P14, P15, P16. - Patch with zero corner twist vectors: this will be generated if the four interior polyhedron points P6, P7, P10 and P11 are all given identical values. Note that in these cases the form of input is purely conventional; the geometry of the resulting patch no longer conforms completely to the relationships stated earlier between control points and patch properties.## 6.1.3 THE 'PNTSON' PATCH

The PNTSON patch is, like the POLYGN patch, defined by sixteen points. In this case, however, the surface constructed actually interpolates (i.e. passes through) all the specified points. The patch boundary curves are cubic curves which interpolate the sets of points P1, P2, P3, P4; P1, P5, P9, P13; P4, P8, P12, P16; and P13, P14, P15, P16. As with the POLYGN patch, the internal input points P6, P7, P10 and P11 control the twist vectors at the patch corners and hence the internal shape of the patch. 153 Figure 6.3 154 The following example generates a PNTSON patch: P1 = POINT/0,0,3 P2 = POINT/1,1,3 P3 = POINT/2,0,3 P4 = POINT/3,0,3 P5 = POINT/0,-0.5,2 P6 = POINT/1,0,2 P7 = POINT/2,0.5,2 P8 = POINT/3,0,2 P9 = POINT/0,1,1 P10 = POINT/1,1.5,1 P11 = POINT/2,1,1 P12 = POINT/3,-0.5,1 P13 = POINT/0,0,0 P14 = POINT/1,0.3,0 P15 = POINT/2,1,0 P16 = POINT/3,0,0 SPN=SSURF/PATCH,PNTSON,PLUS,P1,P2,P3,P4,P5,P6, $ P7,P8,P9,P10,P11,P12,P13,P14,P15,P16 The resulting patch is illustrated in Figure 6.3. Note that the set of points P1 - P16 is the same as for the POLYGN example given earlier; the fact that the surface now actually passes through all the specified points has the effect of amplifying the undulations in the data. The PNTSON patch is of limited use for defining more than one patch at a time. In the case of the PNTVEC and POLYGN definitions, it is fairly simple to construct composite surfaces with slope continuity between patches, since this results automatically if slopes are matched at adjoining patch corners. These corner slopes are explicit in the case of the PNTVEC patch and easily determined from the data of a POLYGN patch. In the PNTSON case, however, the calculation of corner tangent vectors is more difficult, and the construction of an adjacent patch sharing the same corner tangent values still more complex. As for the POLYGN patch, there are some special cases provided. These are - Ruled patch: if points P5 to P12 are given identical values a ruled patch results which inter- polates the boundary curves fitting points P1, P2, P3, P4 and P13, P14, P15, P16. - Patch with zero corner twist: This will result if the four interior points P6, P7, P10 and P11 are all given the same value. 155 - Patch with a straight-line boundary: Any patch boundary will be generated as a straight line if only two of the four defining points are distinct. As with the POLYGN definition, these cases are departures from the standard PNTSON definition from the mathematical point of view, in that all the specified points are not in general interpolated as they are in the standard case.## 6.2 'SMESH' SURFACES

The SMESH surface definition provides a means of constructing a multipatch surface in which surface smoothness across patch boundaries is automatically achieved. The user specifies a set of n x m points in space; the system regards these as being the corner points of a 'topologically rectangular' (n-1) x (m-1) array of 4 - sided curvilinear surface elements. Spline curves are interpolated through the defining points - n curves in one direction and m in the other - the two intersecting families of curves forming a mesh. The curve segments bounding each cell of the mesh are now regarded as patch boundary curves; the system uses the spline curves already constructed to obtain TANSPL and CRSSPL vectors at all the specified points, and then constructs a surface patch which interpolates the boundary curves of each mesh cell. If the curves forming the original mesh all have slope continuity then so will the SMESH surface which interpolates them. Apart from the RULED and REVOLV surfaces discussed in Chapter 4 and the ruled SMESH surfaces discussed in Chapter 5 there are two main variations of the general SMESH surface. One form is completely three-dimensional, and the other is based on a set of data which is regularly distributed with respect to one of the three coordinate planes. These are discussed in the two following sections.## 6.2.1 GENERAL 'XYZ' MESH

In the most general case the space points defining the surface can be specified quite arbitrarily provided they can be regarded as nodes of a spatial mesh as described earlier. The following example illustrates the form of the language used: S = SSURF/SMESH, XYZ, $ SPLINE,P1,P2,P3,P4,P5,TANSPL,VS, $ SPLINE,Q1,Q2,Q3,Q4,Q5, $ SPLINE,R1,R2,R3,R4,R5, $ SPLINE,S1,CRSSPL,VC,S2,S3,S4, $ NORMAL,VN,S5 156 The XYZ qualifier indicates that this is a completely general SMESH surface. Note that the surface definition includes specifications of four spline curves in the example given. These curves will form the patch boundaries in the major (u- parameter) direction of the composite surface. Each spline curve is specified in terms of the same number of points, five in this example. The system will compute cross-spline curves in the minor (v-parameter) direction through corresponding points from each list (e.g. a cross-spline curve will be computed through the points P1,Q1,R1,S1 in the example). These cross-curves will form the remaining patch boundaries, to give a 4 x 3 array of patches. In the spline specification TANSPL, CRSSPL and NORMAL vectors may be specified as explained earlier in Chapter 2. A TANSPL constraint determines a surface slope in the major spline direction and splits splining into two separate sections along the major spline direction. A CRSSPL constraint sets the direction of the cross-spline curve at the constrained point and also splits the cross-spline curve into two separate splines. A NORMAL constraint ensures that the final mesh surface does possess the specified normal at the indicated point. As a consequence, both major and cross- splines are perpendicular to this vector and this constraint causes a 'split' in splining both the major and cross spline curves through this point. Previously existing tangent and cross-tangent vectors are reset if necessary. WEIGHT and LIMIT information may also be specified with the defining points if some smoothing of the input data is required. However, it is a limitation with the present version of the system that smoothing can only be applied to the spline curves in the major direction; this can sometimes cause unwanted ripples or oscillations in the cross-spline direction, with consequent undesirable undulations in the surface generated. Enhancements are in progress to avoid this problem. 157 Figure 6.4 Figure 6.5 158 The following is a specific example of a general SMESH definition. No vector constraints are here imposed, but if they are required the appropriate language is illustrated in the general example given earlier. P1 = POINT/5.0,0.2,0.8 P2 = POINT/4.0,0.0,1.0 P3 = POINT/3.0,-0.1,1.5 P4 = POINT/2.0,-0.2,1.6 P5 = POINT/1.0,0.0,1.0 P6 = POINT/5.5,1.1,1.5 P7 = POINT/4.3,0.9,1.9 P8 = POINT/3.2,0.9,2.5 P9 = POINT/2.1,1.0,3.1 P10 = POINT/0.8,1.2,1.5 P11 = POINT/6.1,3.3,1.6 P12 = POINT/4.7,3.2,2.1 P13 = POINT/3.6,3.0,2.7 P14 = POINT/2.5,2.9,3.4 P15 = POINT/0.9,2.7,1.6 P16 = POINT/5.7,3.8,0.7 P17 = POINT/5.0,4.0,0.9 P18 = POINT/3.9,3.9,1.4 P19 = POINT/2.8,3.7,1.5 P20 = POINT/1.5,3.5,1.0 S = SSURF/SMESH,XYZ, $ SPLINE,P1,P2,P3,P4,P5, $ SPLINE,P6,P7,P8,P9,P10, $ SPLINE,P11,P12,P13,P14,P15, $ SPLINE,P16,P17,P18,P19,P20 The surface generated is shown in Figure 6.4, viewed from directly above (i.e. the viewing direction is the negative z- direction). If smoothing is desired then WEIGHT and LIMIT constraints may be used in the definitions of the splines in the major direction, as already mentioned. The language for the smoothing of individual curves was explained in Chapter 3. Certain extensions of this language have been made for convenience in surface smoothing, and these will now be detailed: - positive WEIGHT and/or LIMIT constraint specified after the word SPLINE but before any defining point of the spline: the constraint(s) apply to every point of the spline curve concerned. 159 - negative WEIGHT and/or LIMIT constraint specified in the same position: the absolute value of the constraint(s) apply to all remaining points in the SMESH surface definition. Both these global constraint settings may be overridden by setting WEIGHT and/or LIMIT constraints for individual points in the usual manner. The following example illustrates the definition of a smoothed SMESH surface. The points P1 - P20 are the same as for the previous example. S = SSURF/SMESH,XYZ $ SPLINE,WEIGHT,0.7,P1,P2,P3,P4,P5, $ SPLINE,P6,P7,P8,P9,P10, $ SPLINE,WEIGHT,-0.5,P11,P12,P13,P14,P15, $ SPLINE,P16,P17,P18,P19,P20,WEIGHT,1 The weights associated with the individual points in this definition are as follows: points P1 - P5 0.7 points P6 - P10 1.0 (default value) points P11 - P19 0.5 point P20 1.0 (individually specified) The smoothed surface is shown in Figure 6.5. Note that the nodes or intersections of the patch mesh now no longer coincide with the input data points, since the smoothing has moved the major spline curves away from these points. 160 One convenient use of SMESH surfaces is in the definition of fillet surfaces. It is first necessary to define two boundary curves, one on each of the surfaces to be filleted. Then CRSSPL vectors must be specified at each defining point of these boundary curves, which should both be specified in terms of the same number of points. The CRSSPL vectors should be in the tangent plane of the surfaces to be filleted. Finally, an SMESH surface is defined using just the two boundary curves as major splines - this will not result in a ruled surface because of the CRSSPL constraints on the boundary curves, which ensure tangency of the fillet surface with the two original surfaces. The user should be warned that the system is quite capable of generating SMESH surfaces with undesirable features if the input data is not well chosen. A general guideline may be stated as follows: - Data points may be unevenly spaced along the major and cross-spline curves, but the distribution of data points must be 'similar' for all the curves in each family. If this rule is followed, each patch of the surface will be close to a rectangle in form, as shown in Figure 6.6. In general, this will lead to a surface in which violent variations of curvature do not occur, and also one with a desirable distribution of parameter lines for machining purposes, as shown in Figure 6.7. Figure 6.8 shows an SMESH surface based on badly specified data; as shown in Figure 6.9 its constant parameter lines are closely spaced in some regions of the surface and widely spaced in others. It is possible to improve the distribution of constant parameter lines by imposing a FLOW structure on the defining curves and using the GENCUR facility described later in this chapter. But it is desirable whenever possible to define surfaces in terms of well-distributed data in the first place. 161 Figure 6.6 Figure 6.7 162 Figure 6.8 Figure 6.9 163## 6.2.2 SPECIALISED 'SMESH' SURFACES - THE

## 'XYPLAN', 'YZPLAN' and 'ZXPLAN' OPTIONS

In this section some specialisations of the general SMESH surface are described. These are subject to the restriction that the defining data points, when projected onto one of the three coordinate planes, must fall at the intersections of a regular rectangular grid, the lines of which are parallel to the axes. The use of this type of surface definition, when appropriate, saves on both storage requirements and execution time. From the language point of view the only difference is that the 'XYZ' qualifier of the general SMESH surface is replaced by one of 'XYPLAN', 'YZPLAN' or 'ZXPLAN'. These are appropriate, respectively, when the data points can project onto a regular grid in the x,y-plane, the y,z-plane and the z,x-plane respectively. The following part program section illustrates the specification of an XYPLAN surface: P1 = POINT/0,0,1 P2 = POINT/0,1,2.5 P3 = POINT/0,2,3 P4 = POINT/0,3,2.7 P5 = POINT/1,0,1.5 P6 = POINT/1,1,3 P7 = POINT/1,2,3.5 P8 = POINT/1,3,4 P9 = POINT/2,0,1.6 P10 = POINT/2,1,3.2 P11 = POINT/2,2,3.7 P12 = POINT/2,3,4 P13 = POINT/3,0,1 P14 = POINT/3,1,2.6 P15 = POINT/3,2,3 P16 = POINT/3,3,2.5 SXY = SSURF/SMESH,XYPLAN, $ SPLINE,P1,P2,P3,P4, $ SPLINE,P5,P6,P7,P8, $ SPLINE,P9,P10,P11,P12, $ SPLINE,P13,P14,P15,P16 The surface generated is shown in Figure 6.10. In this particular example the data points are specified on a square grid in the x,y-plane, it is also permissible for the spacing in the x and the y directions to be different provided both are regular. 164 Figure 6.10 165 Some important points to be noted in connection with XYPLAN, YZPLAN and ZXPLAN surfaces are the following: - no mesh surface of any of these types may have a TRFORM transformation applied to it, since the result would not in general be a surface satisfying the necessary criteria with regard to the (untransformed) coordinate planes; - smoothing may not be applied to surfaces of these types since it would have the effect of moving the data points away from the nodes of the regular grid; - it is always possible to define a general SMESH surface of 'XYZ' type on the same set of data, but this surface will differ in minor respects from that given by the restricted form of the definition.## 6.3 'GENCUR' SURFACES

Whereas the SMESH surfaces are based on networks of spline curves, the GENCUR surfaces (surfaces through GENeral CURves) are constructed on a framework of curves which may be of any of the valid Sculptured Surfaces curve types. Additionally, it is mandatory that the curves used have a FLOW structure imposed on them. The FLOW is used to control the parametrisation of the surfaces generated; specifically, it is possible to obtain the most desirable pattern of constant parameter lines for regional milling (see Chapter 7). A GENCUR surface, like an SMESH surface, is composed of one or more patches. The final boundaries of a GENCUR patch consist of synthetic flow curves each with a single FLOW segment. From the language point of view the definition of GENCUR surfaces is very simple, since the major complications are disposed of in the definition of the original synthetic FLOW curves (see Chapter 3). There are two types of GENCUR surfaces. The first is the spline-constrained surface, which may be used to construct a surface to fit a family of non- intersecting curves, for instance a set of cross-section curves. The second type is the cross-constrained surface, which fits a complete mesh composed of two intersecting families of FLOW curves. The simplest GENCUR surface is the ruled type which has already been described in Chapter 5; this is the simplest case of the spline-constrained surface, in which only two curves are interpolated. 166## 6.3.1 SPLINE-CONSTRAINED 'GENCUR' SURFACES

As previously mentioned, the spline-constrained 'GENCUR' surface is a surface fitting a set of previously defined curves which may be thought of as generalised section curves. These curves do not necessarily have to lie in parallel planes, however; indeed, they are not necessarily plane curves at all. The language input for a surface fitting previously defined curves C1,C2,....,CN is very simple: S = SSURF/GENCUR,C1,C2,...,CN The curves may be of any type, but the following rules apply: - all the curves C1,...,CN must have a FLOW structure, and - each curve must have the same number of FLOW segments (these segments become patch boundaries in the final surface). Additionally, - each curve may carry embedded CRSSPL or NORMAL constraint vectors which will constrain the surface generated. The GENCUR surface is constructed by the system as follows. Spline curves are interpolated through the sets of corresponding FLOW segment junction points of the family of previously defined curves. The arcs of these splines form the patch boundaries in the minor direction of the surface. Any CRSSPL or NORMAL constraints specified on the major curves are taken into account in constructing the minor curves. Finally, each cell of the resulting spatial mesh of curves has a surface patch fitted by means of a special technique which ensures slope continuity across boundaries between adjacent patches. One point to note is that isolated cross-spline or normal constraints on major curves should be carefully chosen, since the corresponding constraints at neighbouring points will be generated by the splining algorithm used to construct the minor curves. 167 Figure 6.11 168 An example of the spline-constrained GENCUR surface will now be given, and the same example will later be modified in various ways to illustrate further points concerning GENCUR surfaces. The assumption is that a mould is to be machined for one half of a Y-junction between three ducts, one of circular and two of elliptical cross-sections. The junction is symmetrical both with regard to its top and bottom halves but also its left and right-hand halves, and so only one-half the mould surface is designed initially. P1 = POINT/0,0,1 P2 = POINT/1,0,0 P3 = POINT/0,2,0.8 P4 = POINT/1.2,2,0 P5 = POINT/0,4,0 P6 = POINT/2,4,0 P7 = POINT/2,8,0 P8 = POINT/3,7,1.2 P9 = POINT/4,6,0 V1 = VECTOR/0,0,-1 V2 = VECTOR/0,0,1 V3 = VECTOR/1,-1,0 C1 = SCURV/CURSEG,P1,P2,TANSPL,V1, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C2 = SCURV/CURSEG,P1,P4,TANSPL,V1, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C3 = SCURV/CURSEG,P5,P6,TANSPL,V1, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 B1 = SCURV/CURSEG,P7,TANSPL,V2,P8,TANSPL,V3 B2 = SCURV/CURSEG,P8,TANSPL,V3,P9,TANSPL,V1 C4 = SCURV/COMBIN,B1,B2,FLOW,ARC,0,2,SEG,LENGTH,0,2 SSCG = SSURF/GENCUR,C1,C2,C3,C4 Note that the half-ellipse must be specified in terms of two CURSEG arcs since the only permitted case of parallel end tangents is the semicircle. The surface is shown from directly above in Figure 6.11. From bottom to top the major (section) curves are as follows: P1P2 : a quadrant of a circle, P3P4 : more than a quadrant of a circle, P5P6 : a complete semicircle, P7P8P9 : half an ellipse 169 Figure 6.12 170 These are all plane curves, in planes normal to the page. The system has constructed a reasonable-looking surface which fits all four major curves. However, this surface is not suitable for the desired mould, because in order to generate the complete Y-junction we need to reflect about the x,y-plane (which requires the spline P2P4P6P9 to lie in that plane, and also the segment P5P7) and about the y,z-plane (which requires the curve P1P3P5 to lie in that plane). It is clear that the last two constraints do not apply; in fact P1P3P5P7 is a twisted space curve, although P2P4P6P9 is a curve in the plane z=0 as required. We may impose the required constraints along the left-hand spline curve in Figure 6.11 by applying CRSSPL vectors on the major curves: at P1 and P2 on P1P2, at P5 on P5P6 and at P7 and P9 on P7P8P9. The definitions of C1,C2,C3 and C4 in the last example now become V4 = VECTOR/0,1,0 V5 = VECTOR/1,1,0 C1 = SCURV/CURSEG,P1,CRSSPL,V4, $ P2,TANSPL,V1,CRSSPL,V4, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C2 = SCURV/CURSEG,P3,P4,TANSPL,V1, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C3 = SCURV/CURSEG,P5,CRSSPL,V4,P6,TANSPL,V1, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 B1 = SCURV/CURSEG,P7,TANSPL,V2,CRSSPL,V5, $ P8,TANSPL,V3 B2 = SCURV/CURSEG,P8,TANSPL,V1, $ P9,TANSPL,V1,CRSSPL,V5 C4 = SCURV/COMBIN,B1,B2,FLOW,ARC,O,2,SEG,LENGTH,0,2 The revised surface is shown in Figure 6.12 (which shows that P1P3P5 is now a plane curve as required). In practice, however, it is often desirable to exercise even more control over the patch boundary curves in the minor surface direction than can be obtained by automatically constructed cross-spline curves, even with the use of CRSSPL constraints. The use of the cross-constrained GENCUR surface permits precise specification of curves in the minor direction, as shown in the next section. 171 172## 6.3.2 CROSS-CONSTRAINED 'GENCUR' SURFACES

The cross-constrained GENCUR surfces are surfaces based on a mesh formed by two families of intersecting curves, both sets of curves being completely under the user's control. If C1,...,CN are curves in the major surface direction and D1,...,DM curves in the minor direction, then the language for defining such a surface is S = SSURF/GENCUR,C1,...,CN,CROSS,D1,...,DM All the previously defined curves must possess a FLOW structure, and the mesh of curves must be defined in such a way that each mesh cell or surface patch is bounded by four FLOW segments so that the u and v parameters run from 0 to 1 in the major and minor directions respectively. This requirement imposes the following restrictions: - the major curves must all contain the same number of FLOW segments (as in the case of the spline-constrained GENCUR surface), - each minor or cross curve must intersect every major curve at corresponding segment junction points, these inter- section points also being segment junction points for the cross curves, - additionally, the cross curves in the order specified in the surface definition must intersect the major curves at increasing FLOW values. The restrictions imply that if there are N major curves then the cross-curves must all be composed of N-1 FLOW segments. Conversely, if each major curve is made up of K flow segments then K + 1 cross-curves should be defined, since each major curve will have K + 1 segment junction points. The following example illustrates the definition of a cross- constrained GENCUR surface. Again the intention is to define a mould for a Y-junction, but now the cross-curves as well as the major (section) curves are completely specified by the user. The point data are the same as for the previous example, but now the curve P1P3P5P7 has been reformulated as a COMBIN, with the part P1P3P5 lying in the y,z-plane (one of the reflection planes for the complete part) and P5P7 lying in the x,y-plane (the other reflection plane). A tangent discontinuity has been introduced at P5 to give more desirable characteristics at the junction point. Since there are four major curves each cross curve has been split into three FLOW segments. Each major or section curve consists of a single FLOW segment, so that only two cross curves can be specified. 173 Figure 6.13 174 Note that CRSSPL constraints need not now be specified on the major curves, since the full defintion of the cross curves supplies corresponding constraints automatically. P1 = POINT/0,0,1 P2 = POINT/1,0,0 P3 = POINT/0,2,0.8 P4 = POINT/1.2,2,0 P5 = POINT/0,4,0 P6 = POINT/2,4,0 P7 = POINT/2,8,0 P8 = POINT/3,7,1.2 P9 = POINT/4,6,0 V1 = VECTOR/0,0,-1 V2 = VECTOR/0,0,1 V3 = VECTOR/1,-1,0 V4 = VECTOR/0,1,0 V5 = VECTOR/1,10,0 V6 = VECTOR/1,1,0 C1 = SCURV/CURSEG,P1,P2,TANSPL,V1, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C2 = SCURV/CURSEG,P3,P4,TANSPL,V1, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C3 = SCURV/CURSEG,P5,P6,TANSPL,V1, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 B1 = SCURV/CURSEG,P7,TANSPL,V2,P8,TANSPL,V3 B2 = SCURV/CURSEG,P8,TANSPL,V3,P9,TANSPL,V1 C4 = SCURV/COMBIN,B1,B2, $ FLOW,ARC,0,2,SEG,LENGTH,0,2 B3 = SCURV/SPLINE,P1,TANSPL,V4,P3,P5,TANSPL,V1 B4 = SCURV/SPLINE,P5,TANSPL,V5,P7,TANSPL,V6 D1 = SCURV/COMBIN,B3,B4, $ FLOW,ARC,0,3, $ SEG,LENGTH,0,1,LENGTH,1,2,LENGTH,2,3 D2 = SCURV/SPLINE,P2,TANSPL,V4,P4,P6,P9,TANSPL,V6, $ FLOW,ARC,0,3, $ SEG,LENGTH,0,1,LENGTH,1,2,LENGTH,2,3 SCCG = SSURF/GENCUR,C1,C2,C3,C4,CROSS,D1,D2 A view of the resulting surface is shown in Figure 6.13. The slope discontinuity at P5 is clearly visible in the illustration. A further example of a cross-constrained GENCUR surface occurs in the next Section. 175 176## 6.4 THE 'COMBIN' SURFACE

Just as the user may amalgamate previously defined curves into a single entity using the COMBIN facility, so he may unite previously defined surfaces in the same way. In the case of the COMBIN curve an error results if two consecutive segments are not contiguous, and a warning message is issued if two segments do not have slope continuity at their junction point. Much the same situation holds for the COMBIN surfaces. The surfaces being joined must have one complete boundary in common. Furthermore, there must be the same number of patches on either side of this boundary, and the patch corners on both sides must coincide. Since surfaces in the Sculptured Surfaces System are based on regular patch meshes, this implies that any valid COMBIN surface will also have a regular patch mesh. Although surfaces being joined must share a common boundary there need not necessarily be slope continuity across that boundary. The following example shows the definition of a simple COMBIN surface. Initially the surfaces are defined. S2 is a quadrant of a circular cylinder and S3 is part of a plane which is inclined with respect to the cylinder axis. An elliptical curve is defined on S3 and a blending surface S2 constructed between this curve on the plane and the base curve of the cylinder. The blending surface is a single-patch cross-constrained GENCUR surface, with boundaries chosen to ensure slope contnuity of the blend with both other surfaces when they are combined in a COMBIN definition. The Part Program definining the COMBIN is as follows: 177 Figure 6.14 Figure 6.15 178 P1 = POINT/0,0,1 P2 = POINT/4,0,0 P3 = POINT/0,3,1 P4 = POINT/4,3,0 P5 = POINT/0,1,2 P6 = POINT/1,0,2 P7 = POINT/0,1,4 P8 = POINT/1,0,4 P9 = POINT/0,2,1 P10 = POINT/3,0,0.25 P11 = POINT/0,0,4 V1 = VECTOR/1,0,0 V2 = VECTOR/4,0,-1 V3 = VECTOR/0,-1,0 V4 = VECTOR/0,0,-1 V5 = VECTOR/0,0,1 C1 = SCURV/CURSEG,P5,TANSPL,V1,P6, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C2 = SCURV/CURSEG,P9,TANSPL,V2,P10,TANSPL,V3, $ FLOW,ANGLE,0,1,P1,V5, $ SEG,LENGTH,0.1 C3 = SCURV/CURSEG,P5,TANSPL,V4,P9, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C4 = SCURV/CURSEG,P6,TANSPL,V4,P10,TANSPL,V2, $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C5 = SCURV/CURSEG,P7,TANSPL,V1,P8 $ FLOW,ARC,0,1,SEG,LENGTH,0,1 C6 = SCURV/CURSEG,P1,P2 C7 = SCURV/CURSEG,P4,P2 C8 = SCURV/CURSEG,P3,P4 C9 = SCURV/CURSEG,P3,P1 C10 = SCURV/COMBIN,C8,C7, $ FLOW,PARAM,0,2,SEG,LENGTH,0,2 S1 = SSURF/GENCUR,C1,C2,CROSS,C3,C4 S2 = SSURF/GENCUR,C5,C1 S3 = SSURF/GENCUR,C2,C10 SCOM = SSURF/COMBIN,S2,S1,S3 Note that S1, S2 and S3 are all GENCUR surfaces, though S2 and S3 are of the ruled type. The COMBIN surface generated is shown in Figure 6.14. The slope discontinuity apparent in the v = 0.5 parameter line does not imply a surface slope discontinuity there - it is merely a feature of the way the overall surface is parametrised. Figure 6.15 shows a zigzag path along parametric lines of the whole COMBIN surface. The sharp corners in the parameter lines on the plane could have been avoided by interpolating a circular arc into the COMBIN curve P2P4P3. 179 180