## 4 Technical Analysis
### Redundancy Removal of Component Geometry Information  
#### 4.2.1 Geometry Alignment  
Although the same components derived from different types of software may have different geometric representations, the geometric shapes remain unchanged in the local coordinate system. Therefore, by aligning the components into a certain coordinate system, the similarity among them can be obtained. An appropriate placement of instance should be determined according to the features of the data themselves. PCA [59] and ICP [60] are two common alignment algorithms that are usually employed for the coarse alignment and fine alignment in point cloud alignment. However, for the errorless model, it is unnecessary to perform ICP analysis to avoid errors in measurement, such that only PCA is available. The coordinate, which can best express the data feature in the reduced dimensionality, can be achieved by PCA. Generally, after aligning the same data in different orientations into this coordinate, the geometry topology remains unchanged. This fact lays the foundation of similarity comparison among different objects.  
Figure 2: IFC file structure.  
In the PCA method, the dataset X can be obtained by sampling the centroid of every patch. Suppose there are \(n\) points in point set \(X\), and \(x_{i}\), \(y_{i}\), and \(z_{i}\) are the coordinates of the \(i\)-th point. The coordinate matrix can be expressed as:  
\[X=\begin{bmatrix}x_{1}&y_{1}&z_{1}\\ x_{2}&y_{2}&z_{2}\\ \vdots&\ddots&\vdots\\ x_{n}&y_{n}&z_{n}\end{bmatrix} \tag{1}\]  
First, the point set needs to be normalized:  
\[X_{std}=\begin{bmatrix}\frac{x_{1}-y_{x}}{\sigma_{x}}&\frac{y_{1}-y_{y}}{ \sigma_{y}}&\frac{z_{1}-y_{z}}{\sigma_{z}}\\ \frac{x_{2}-y_{x}}{\sigma_{x}}&\frac{y_{2}-y_{y}}{\sigma_{y}}&\frac{z_{2}-y_{ z}}{\sigma_{z}}\\ \vdots&\ddots&\vdots\\ \frac{x_{n}-y_{x}}{\sigma_{x}}&\frac{y_{n}-y_{y}}{\sigma_{y}}&\frac{z_{n}-y_{ z}}{\sigma_{z}}\end{bmatrix} \tag{2}\]  
where \(X_{std}\) is the normalized form of point set \(X\); \(\mu_{x}\), \(\mu_{y}\), and \(\mu_{z}\) are the average values of the \(x\), \(y\), and \(z\) coordinates; and \(\sigma_{x}\), \(\sigma_{y}\), and \(\sigma_{z}\) are the standard deviation of the three coordinates. Equation (1) can be written in the following transformation form:  
\[X_{qua\ std}=X_{qua}\begin{bmatrix}\frac{1}{\sigma_{x}}&0&0&0\\ 0&\frac{1}{\sigma_{y}}&0&0\\ 0&0&\frac{1}{\sigma_{z}}&0\\ -\frac{\sigma_{x}}{\mu_{x}}&-\frac{\sigma_{y}}{\mu_{y}}&-\frac{\sigma_{z}}{\mu _{z}}&1\end{bmatrix} \tag{3}\]  
where \(X_{qua}\) is the quaternion form of the point set and \(X_{qua\ std}\) is the normalized form of \(X_{qua}\).  
Then, the covariance matrix of the point set is calculated as:  
\[\Sigma=\frac{1}{n}\sum_{i=1}^{n}X_{std}X_{std}^{T} \tag{4}\]  
Generally, singular value decomposition can be employed, and eigenvectors of the covariance  
\[U=\begin{bmatrix}U_{x}&U_{y}&U_{z}\end{bmatrix} \tag{5}\]  
where \(U_{x}\), \(U_{y}\), and \(U_{z}\) are the axes directions in the new coordinate placement.  
Finally, the point set is projected into the new placement, and a transformation operation can be simply performed:  
\[X_{new}=X\begin{bmatrix}U_{x}&U_{y}&U_{z}&0\\ 0&0&0&1\end{bmatrix} \tag{6}\]  
where \(X_{new}\) is the coordinate of the transformed point set. After the above process, the point set is transformed into a coordinate system determined by its data characteristics. Even if the point sets of the same component are in different positions and orientations, they can also be aligned to the coincident state, so the aligned point set data can be used for redundant component identification.