Koemi wrote: ↑
Thu Sep 19, 2019 1:33 pm
Out of curiousity (maybe for others too): how did you do this? Small description maybe?
A part of my PhD research is to develop open-source software for reverse engineering CAD models
. I am looking now how to reconstruct freeform (sculptural) geometries from STL meshes. Here is how it generally works:
- Prepare triangulation (decimate, fill gaps). For that, VTK is a good fit.
- Retopologize it with quads. For now, I tried Instant Meshes
, but it has severe limitations: the grid it produces is not adaptive (it gives uniform size distribution regardless of surface curvature), and feature lines are not preserved (this has a negative impact on the quality of reconstruction). Retopology consists in constructing a dual quad mesh (the job of Instant Meshes), then projecting the edges and vertices back on the original triangulation.
- The projected edges are approximated with B-curves, then quad cells are fitted with Coons patches converted to NURBS. Here two extensions are possible: refine the surfaces by least-squares + smoothing approximation to better fit the underlying mesh nodes; join Coons surfaces smoothly by making the corresponding B-surfaces compatible along their natural boundaries (knot insertion and poles alignment are done) to achieve G1 continuity.
- Finally, the deviation between the reconstructed curved model and the initial mesh can be checked by sampling the curved part and projecting each sample point to the initial triangulation.
Here is the process (cut to speed up):
The corresponding code will be available in a dedicated software package once I polish a few things (the link is below in my signature).