Here we apply geometric optimization to a mesh using a variety of boundary constraints. We start with a mesh of the Enterprise that has 1,438 nodes and 4,926 elements. (The following commands can be executed in stlib/examples/geom/mesh
. The stlib/results/geom/mesh/3/enterpriseBoundarySurvey
directory contains a makefile which generates the figures in this example.)
cp ../../../data/geom/mesh/33/enterpriseL50.txt enterprise.txt
The initial mesh. The minimum modified condition number is 0.069 the mean is 0.82.
cp ../../../data/geom/mesh/32/enterpriseL20.txt enterpriseBoundary.txt
A higher resolution surface mesh of the Enterprise.
optimization/geomOptBoundaryCondition3.exe -function=c enterpriseBoundary.txt enterprise.txt enterpriseImplicitSurface.txt
The mesh after optimization using the implicit surface method. The minimum modified condition number is 0.19 the mean is 0.85.
The mesh after optimization using the implicit surface method. View from the back.
Next we try using a content constraint. That is, when moving boundary nodes the volume of the object remains constant.
optimization/geomOptContentConstraint3.exe -function=c enterprise.txt enterpriseContentConstraint.txt
The mesh after optimization using the content constraint method. The minimum modified condition number is 0.31 the mean is 0.87.
The mesh after optimization using the content constraint method. View from the back.
To rectify this problem, we utilize the edge features of the boundary mesh. We define any edge with a dihedral angle which deviates more than 0.5 from to be an edge feature. In the figure below we see that this choice is large enough to capture the edge features of the boundary mesh and small enough to not introduce spurious edge features. Intersecting edge features are corner features (shown in red).
utility/extractFeatures32.exe -angle=0.5 enterpriseBoundary.txt enterpriseEdges.txt enterpriseCorners.txt
The edge and corner features of the boundary mesh for a dihedral angle deviation of 0.5.
The mesh after optimization using the manifold with features approach. The minimum modified condition number is 0.10 the mean is 0.85.
The mesh after optimization using the manifold with features approach. View from the back.
For this example, it is difficult to see how the mesh changed when using the manifold with features approach. One might ask whether the shape of the model was preserved because the nodes were moved well or whether they just were not moved. The following figures show the edges for the initial mesh in red and the edges for the optimized mesh in blue. They show that nodes on surface features were allowed to move along the surface and nodes on edge features were allowed to move along edge features.
The edges of the initial mesh (in red) and the edges of the optimized mesh using the manifold with features approach (in blue).
Close-up view.