## 3 Methodology
### Extracting Parameters for Clipping  
Details about clipping representation in IFC is stored in the \(IfcBooleanClippingResult\) class. Each clipping entity has two components, i.e., a first operand and a second operand. The first operand can be a swept solid or another clipping entity. If the first operand is a swept solid, then the clipping is referred to as one-clipping in this study. Otherwise, if the first operand is another clipping, then, the clipping is referred to as multi-clipping. Thus, the clippings in a clipping representation, then, form a cascading system (see Figure 3). The number of clippings included in a clipping entity is referred to as clipping depth in this study. The second operand is a half space, which can be either a bounded half space or an unbounded half space.  
In this study, the swept solid in the last clipping is referred to as the main body, while the second operands are referred to as clipping parts. From this point of view, one-clipping is a clipping entity with one main body and one clipping part, while multi-clipping has one main body and multiple clipping parts. Figure 3 presents the structure of a multi-clipping entity with a clipping depth of \(n\).  
Parameters for the main body include sweeping profile, sweeping direction, and sweeping depth; parameters for unbounded half space include a base surface (defined by a normal direction and a point on the surface) and an agreement flag (a Boolean value, either true or false). Since bounded half space (IfcPolygonalBoundedHalfSpace) is a subclass of unbounded half space (IfcHalfSpaceSolid), apart from the base surface and the agreement flag, it additionally includes two more parameters, including position and the polygonal boundary. The parameters for each type of half space are presented in Figure 4, which represents the relationship between unbounded half space and bounded half space using unified modeling language (UML) [39].  
The primary challenge in parameter extraction is to identify all the second operands (half spaces) and the first operand of the last clipping (the main body) from the cascading system. The following algorithm was developed to solve this problem (see Figure 5), and the pseudocode for this algorithm is given in Appendix A. This algorithm was used to process both multi-clipping entities and one-clipping entities.  
Figure 4: Unified modeling language (UML) for IfcHalfSpaceSolid, IfcPolygonalBoundedHalfSpace, and IfcBoxedHalfSpace [40].  
Figure 3: Structure of multi-clipping, i.e., the clipping chain.  
In this algorithm, after inputting a clipping entity, the first step is to determine the type of clipping. If the first operand is a swept solid, then, the clipping is a one-clipping. In this case, only one main body and one clipping part should be retrieved and processed. If the first operand is another clipping entity, then, the initial clipping is a multi-clipping. In this case, the second operand is first retrieved and processed; then, the first operand of the next clipping in the clipping chain should be iteratively checked until the main body has been acquired. During this process, the second operands are iteratively retrieved and processed.