1. Validity of the Mesh
One of the objectives of the internship was to use KSR output as a mesh for emulation with the finite element method. For this purpose the mesh meet several constraints, such as being triangulated, closed, and oriented.
After generating the mesh with KSR, we need to verify if it meets these requirements. CGAL provides functions to check the quality of the mesh, so we simply need to pass the mesh through these functions and attempt to repair it with other CGAL functions if necessary.
Additionally, we want to determine if the resulting mesh is close enough to the initial mesh. We can’t directly compare surfaces or volumes because the KSR algorithm might fix or fill holes in the mesh, altering volumes or surface areas. One option is to compare the bounding boxes of both meshes. This would indicate if both meshes could fit in the same spaces and generally have a similar size.
To be even more precise, we could examine each distinct element composing the mesh, label them differently, and compare their respective bounding boxes. This way, we can identify which elements are well represented.
To verify the validity of the mesh by examining the bounding boxes, we will:
-
Extract a point set from the output and input for a given marker.
-
Calculate the bounding box of each point set.
-
Determine the relative distance between both bounding boxes and estimate the difference.
-
Count how many bounding boxes have a difference greater or less than 10~20%.
Here an example of the comparaison of bounding box
% of marker correct | Three Zones | ACJasmin |
---|---|---|
<5% |
22/57 |
3/82 |
between 5 and 10 % |
11/57 |
7/82 |
between 10 and 20 % |
13/57 |
9/82 |
Based on the following result :
Three zones input |
Three zones output |
ACJasmin input |
ACJasmin output |
The result is disappointing, but we can see in the images the poor representation of all doors, windows, leading to a small correspondence when comparing the bounding boxes, even if the shapes seem very familiar. Another explanation for the poor correspondence of ACJasmin could be a scaling issue in width, as we can see the height increased from 8.51 to 8.94, for example