SVD-based MLS point-to-mesh interpolator with uniform-grid neighbor search (sphere & circle support)#176
Conversation
… added point-to-mesh MLS interpolation support
abhiyanpaudel
left a comment
There was a problem hiding this comment.
Overall looks good — just a couple of minor comments.
| const double max_coord = pt[d] + cutoff; | ||
|
|
||
| min_idx[d] = static_cast<int>((min_coord - grid_obj.bot_left[d]) / cell_size(d)); | ||
| min_idx[d] = (min_idx[d] < 0) ? 0 : (min_idx[d] >= grid_obj.divisions[d]) ? grid_obj.divisions[d] - 1 : min_idx[d]; |
There was a problem hiding this comment.
This appears to clamp indices to the range [0, grid_obj.divisions[d] - 1]. Adding a comment to clarify the intent would improve readability.
| cell_id = x; | ||
| } | ||
|
|
||
| if (cell_id >= num_cells || cell_ptrs[cell_id] == cell_ptrs[cell_id + 1]) return; |
There was a problem hiding this comment.
is cell_ptrs.size() == num_cells + 1?
|
@MohammadElahiNU @abhiyanpaudel now that the |
Just one change in point_to_mesh_mls.cpp: drop the test_interpolation_point_to_mesh and replace it with a direct call to mls_interpolation. |
I think there are some which are not needed. |
|
I just went through this and I think there are still some remaining issues to resolve before this gets merged. |
• Uniform-grid neighbor finder (sphere & circle)
• New point-to-mesh test using SVD-MLS solver for the MLS interpolation