CSG Model of an Object:
Actually the whole design procedure often began with a simple block that might have simple shapes cut out of it, possibly other shapes added on etc. in producing the final design.
This simple component could be generated through gluing two rectangular blocks together and after that drilling the hole. Or the union of two blocks would be taken in CSG terms and then the difference of the resultant solid and a cylinder would be taken. In performing these operations the basic primitive objects, the blocks & the cylinder, would need to be scaled to the correct size, probably oriented and then placed in the correct relative positions to each other before performing the logical operations.
The Boolean Set Operators utilized are following:
- Union: A + B is the set of points which are in A or B.
- Intersection: A. B is the set of points that associate to A and B.
- Difference: A - B is the set of points that belong to A but not to B. Note down that the above definitions are not rigorous and have to be refined to define the Regularised Boolean Set Operations to avoid impossible solids being generated.
Then A CSG model is held as a tree structure whose terminal nodes are primitive objects together with suitable transformation and whose other nodes are Boolean Set Operations. It is illustrated below for the object above that is constructed by using cube and cylinder primitives.