emerald-geomodelling / EmeraldTriangles

Transformations for triangle meshes build on top of scipy.spatial.Delaunay
MIT License
1 stars 0 forks source link

Interpolate fails when connected only to holes with NaN values #3

Open Duke-of-Lizard opened 3 years ago

Duke-of-Lizard commented 3 years ago

the interpolate method fails when it's connected to points that are also being interpolated. Should this process be iterative such that they all eventually get valid values?

https://github.com/emerald-geomodelling/EmeraldTriangles/blob/cd8cc6b69b17baf413b95762b541db7bdf1de0a3/emeraldtriangles/refine_mesh.py#L124

Figure 1

This figure was generated in this notebook: https://github.com/emerald-geomodelling/project-21003_NO_BaneNOR_Fre16_ReInterp/blob/master/21003_Jupyter010_Bedrock_triangulated_boreholes.ipynb

These are the lines you need to reactivate to reproduce the error that I had:

# #compute interpolated Z are non-confirmatory points
# tri_int = emeraldtriangles.refine_mesh.interpolate_vertices(tri, mask_stop.index[~mask_stop])
# tri['vertices'].loc[~mask_stop, 'Z_interp'] = tri_int['vertices'].loc[~mask_stop, 'Z']
redhog commented 2 years ago

Yes :S