<<< Boolean Operations | Chapters | Sectioning >>> |
This chapter explains how you combine a pattern of entities using instancing and/or patterning to produce the models you require.
Instancing and patterning are a special case of boolean operations and thus, it is assumed that you are familiar with the behavior and concepts of Booleans as explained in Chapter 9, "Boolean Operations"
The behavior of the instancing function PK_FACE_instance_tools is altered via the contents of an option structure passed to the function. The option structure is the same structure that is input to PK_FACE_boolean - refer to Chapter 9, "Boolean Operations" for a description of the options.
The performance of the instancing operation can be improved by using the instancing options in the
configuration
option sub-structure. The options are as follows:
Figure 10-1 Tool bodies that do not intersect each other, but intersect edges on the target
Figure 10-2 Tool bodies that have intersected each other but not the edges on the target
Figure 10-3 Identically positioned intersection loops on the instance tool body (cylinder) when it is united with an inclined planar face
Option | Description |
---|---|
when one tool intersects a target face then all tool faces intersect that same target face. |
An example of this situation is when a set of parallel, solid cylinders are united to an inclined planar face forming elliptical intersection loops, satisfying the first condition. To satisfy the third condition, the vertical positioning of each instanced cylinder would be dependent on its position on the incline.
In addition to the previous configuration options, the following receive options are available to:
Option | Description |
---|---|
specifies the boolean operation to be performed: union, subtraction or intersection |
|
a local boolean receives a subset of the faces of a target body. If the imprinting phase of the boolean results in incomplete loops of imprinted edges, then additional target faces are used. |
|
stop self intersection, after imprinting, tool faces which survive the boolean are compared against all faces of the target body. |
|
this option sub-structure is used to identify regions of the tool to be included or excluded in the boolean result. See "Select regions in boolean operations (local)" in Chapter 9, "Boolean Operations" for a description of the options. |
If the
tracking
field within the option structure is set to PK_LOGICAL_true, the instancing function returns tracking information. This tracking information includes:
Patterning is very similar to the instancing operation, although it is not actually a Boolean operation as it only operates on a single body.
The patterning function, PK_FACE_pattern takes a set of faces and an array of transforms, each transform being applied to a copy of the face set to create a new instance of the faces.
Figure 10-4shows a simple example. The set of faces given to PK_FACE_pattern contains the faces in both the pocket and the boss. There is only one transform specified and the result is shown on the right. Notice that this particular example could not be executed by a single Boolean instancing operation, as that would imply an operation which would unite and subtract simultaneously.
Figure 10-4 Patterning example of one transform of both a pocket and a boss
Not all face sets make sense, so there are restrictions on which collections of faces are allowed. The restrictions are similar to those imposed for instancing. The patterning function is only able to copy the faces it is given and can only affect a restricted set of topology changes. The patterning operation may split non-pattern faces and edges on the target body to enable the patterning operation. The geometry and topology of the pattern interface with the target body must remain constant over the patterning operation. For a more detailed explanation of the restriction on topology change, please refer to the PK_FACE_pattern documentation.
Figure 10-5 Patterning example that involves constant topology and geometry over the patterning operation
Apart from these restrictions, the form of the face set is relatively free: it may be disconnected, it may be closed or open (or a mixture of closed and open components), and it may be from a solid, sheet or general body.
Although the function only changes the topological data structure of a body, it has options for making geometric checks on the result. These are:
Option | Description |
---|---|
The first check is in two stages. Before any copying takes place, a simple test is carried out which always detects cases in which the transformed loop is completely outside the face, but may not always detect cases were the new loop is partially outside the face. If it is discovered that a loop would leave the face, then the face copies corresponding to that particular transformation are not created.
The second check takes place after the copying and transformation have taken place. The new loop's edges are intersected with the original edges of the face: if an intersection is found then the new faces corresponding to the transform are deleted. In both cases, the returned information indicates that the instance has not been created and the body should remain valid. Figure 10-6 illustrates this. If the check has not been requested, then all instances are created and the resulting body may be invalid.
Figure 10-6 The effect of the loop checking option
Option | Description |
---|---|
Ensure that the copied faces do not intersect with other faces in the body |
The second check intersects the new instance faces with existing faces of the body to detect any clashes which may have occurred. Figure 10-7 illustrates how this might happen. Note that there are never any mutual checks between all the new faces - it is assumed that the faces are transformed far enough to separate the individual instances. Unlike when an instance fails the loop check, if it fails the face clash the instance is not removed so the body remains invalid as a result of the clashing face. The returned information does, however, contain the tags of faces which have clashed so that the location of the problem may be ascertained.
Figure 10-7 The effect of the face checking option
The returned data from the patterning function contains:
<<< Boolean Operations | Chapters | Sectioning >>> |