profile along an axis.
2.4.5.2 Composition Operations
In CSG, an object is constructed from solid primitives by composition operations. Eligible composition operations are the Boolean operations on sets, i.e. union (∪), intersection (∩), and difference (\), as well as associated geometric transformations of those sets.
For a pair of solid primitives with given postures, different composition operations lead to different outcomes of assembled objects. Figure 2.30 shows three different objects from the compositions of a rectangular cuboid and a cylinder primitive.
Figure 2.30 Differences of Boolean operations. (a) Two primitives at given positions. (b) A∪B. (c) A∩B. (d) A\B. (e) B\A.
Other than the Boolean operations among solid primitives, a coordinate transformation can be applied to individual primitives before a Boolean operation takes place. Common operations of coordinate transformation include translating, copying, rotating, mirroring, and scaling. Figure 2.31 shows some examples of these operations.
Figure 2.31 Common operations of coordinate transformation. (a) Translating. (b) Rotating. (c) Mirroring. (d) Scaling.
2.4.5.3 CSG Modelling
Two basic elements of a solid model are (i) elemental geometric solids Ti (i = 1, 2, 3, …, N), where N is the number of available solid primitives of the object, and (ii) the set of composition operations ⊗ for a Boolean operation (‘∪’, ‘∩’, or ‘\’) of geometric solids.
A series of composition operations can be expressed as
(2.19)
where TC stands for the assembled object, Ti (i = 1, 2, 3, …, N) are the primitives in the object, and ⊗ is one of the Boolean operations (‘∪’, ‘∩’, and ‘\’).
2.4.5.4 Modelling Procedure
The procedure of CSG modelling is as follows:
1 Define a set of solid primitives.
2 Create dimensional variables and constraints of solid primitives.
3 Transform each solid primitive into the appropriate position, applying the generalized set operations.
4 Finally, combine elemental solids to generate a unique and legal solid model.
The above procedure shows that the resulting solid model is affected by (i) the set of solid primitives and dimensions, (ii) locations and orientations of solid primitives, and (iii) the types and orders of the Boolean operations of solid primitives. Figure 2.32 shows different solid models from the same set of solid primitives.
Figure 2.32 Different solid models from the same set of solid primitives.
2.4.5.5 Data Structure of CSG Models
Figure 2.32 shows that a CSG model consists of geometric and topological data, which is similar to a model from the B‐Rep modelling process. A data structure of a CSG model does not give the model shape directly; instead, it consists of a number of solid primitives and combines them through a procedural description. More specifically, the data structure corresponds to a graph and tree as the history of applying the Boolean operations on solid primitives, in such a way that:
1 The topological information is stored in a binary tree format.
2 The outer leaf nodes correspond to solid primitives.
3 The interior nodes are the Boolean operations over solid primitives or components.
Figure 2.33 shows the data structure of an example CSG model. It consists of two data types: (i) three solid primitives, i.e. two blocks with different dimensions and one cylinder, and (ii) a topological tree, i.e. one union operation of two blocks and then one difference operation of the united component with the cylinder.
Figure 2.33 Data structure example of a CSG model.
Since CSG modelling begins with solid primitives, CSG models are always valid and they have complete and unambiguous information of solids. In addition, the primitives are defined directly at the volume level and low‐level entities such as vertices, edges, and faces are defined implicitly. However, an entity at any level of solid can be utilized and accessed readily when it is needed. The advantages of CSG modelling are:
1 It constructs a solid model with the minimized steps.
2 It leads to a concise database with less storage since the entities at the low level are represented implicitly.
3 It provides a complete history of the model, which is retained but can be altered at any phase of product design.
4 A CSG model can be easily converted to the corresponding boundary representation.
The tools for CSG modelling were introduced in the 1980s. However, early CSG modelling tools suffered from a number of limitations as follows:
1 They can only provide far fewer types of basic solid primitives in modelling than the vast number of varieties that would be required in engineering practice.
2 CSG modelling does not adequately support engineering thinking. It implies that a final solid model is created from a theoretical sketch through continued modifications. In other words, traditional CSG modelling is rather used to reconstruct solid models than to actually design.
3 CSG modelling does not provide a comprehensive description of solids to be modelled. Early CSG models do not cover the information on microgeometry,