# Analytic Form Fitting in Poor Triangular Meshes
## 5 Conclusions and Future Work  
This manuscript presents the implementation of an algorithm to identify user-requested analytic forms (cone, cylinder, sphere) and their triangle support subsets \(S\), in a connected manifold triangle set \(M\). \begin{table}
\begin{tabular}{l l l l l l l} \hline \hline
**Approach** & **Preprocessing** & **B-Rep** & **Extraction of \(S\)** & **Fitting** & **Extraction + Fitting \({}^{\ddagger}\)** & **Overall** \\ \hline \([7]\) [PERSON] et al. & \(O(n^{2})\) & - & \(O(n^{2})\) & \(O(n^{2})\) & \(O(n^{4})\) & \(O(n^{4})\) \\ \([6]\) [PERSON] et al. & \(O(n^{2})\) & - & - & - & \(O(n^{3})\) & \(O(n^{3})\) \\ \([3]\) [PERSON] et al. & \(O(n^{3})\)\({}^{*}\) & - & - & \(O(n^{2})\)\({}^{**}\) & - & \(O(n^{3})\) \\ \([12]\) [PERSON] et al. & \(O(n^{2})\) & - & \(O(n)\) & \(O(n^{3})\) & \(O(n^{4})\) & \(O(n^{4})\) \\ \([4]\) [PERSON] et al. & \(O(n)\) & - & - & \(O(n^{3})\) & - & \(O(n^{3})\) \\ Our approach & \(O(n)\) & \(O(n^{2})\) & \(O(n)\) & \(O(n^{2})\) & \(O(n^{3})\) & \(O(n^{3})\) \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Complexities of existing approaches and of our algorithm (\(n\) is the number of points or triangles of the input set). \({}^{*}\) Obtaining initial guess of \(g()\). \({}^{**}\) Applying optimization to \(g()\). \({}^{\ddagger}\) Segmentation and fitting are codependent. Figure 25: Execution times for B-Rep construction with and without previous spatial hashing. The statistical quality of \(M\) is low as it is a heterogeneous and anisotropic, with a poor aspect ratio triangulation. This characteristic aligns with specific industrial applications in which low-polygon sets are purposely preferred at the expense of mesh quality. Our algorithm favors a one-by-one progressive estimation of the parameters of the \(g()\) form, based on local probing. Our approach does not favor the application of generic statistical multi-parameter fittings, which renounce the exploitation of \(g()\)-specific properties and require a dense, good quality input \(M\). Three different types of primitives (cylinder, cone, and sphere) were fitted. Two methods were implemented for the extraction of \(g()\) support subset \(S\), depending on the \(C\)-continuity level at the border \(\partial S\) with \(M-S\). The results are consistent and accurate in obtaining \(g()\) for statistically poor triangulations. The precision in the parameters of each analytical form was sufficient for our industrial application, presenting (for example) a maximal error of \(\approx 0.1\) % in the opening angle of the cone. As expected, fitting-based extraction presents higher execution times than a dihedral angle-based one. The iterative process of calculating the primitive parameters introduces an additional cost to the identification of the \(g()\) support subset \(S\). In contrast, real-time execution was achieved for all cases of dihedral angle-based \(S\) extraction. Both methods are accelerated by the connectivity information provided by the B-Rep. The spatial hashing is central in accelerating the B-Rep construction, and thus the \(S\) support subset extraction and \(g()\) primitive fitting. Our approach takes advantage of the B-Rep benefit of constant-time access to VERTEX, EDGE and FACE neighborhoods. Spatial hashing reduces time complexity but adds storage complexity. Therefore, it is not a theoretical advantage. In practice, however, spatial hashing dramatically speeds up B-Rep construction because it delivers bounded neighborhood search times as it (B-Rep construction) acts in a constant search space. Future work is required on the acceleration of fitting-based extraction. A natural upgrade of our method is envisioned for cases in which the primitive sought type \(\mathscr{T}\) is not specified but instead is one out of a given finite set. Conceptualization, J.C., O.R.-S., D.A.A. and C.R.-C.; investigation, J.C., O.R.-S., D.A.A. and C.R.-C.; methodology, J.C., O.R.-S., D.A.A.