Open levanpon98 opened 4 years ago
Any chance you could give me a point cloud were this issue occurs? Without any way to reproduce, it is hard for me to debug.
In any case it seems to me like the default parameter settings are not working well with your data, as that line were the bug occurs is run when only 1 big triangle is found. Unless you were expecting very little holes in your data (which would making this tool quite redundant), I think you will need to adjust the max_circumradius
and max_ratio_radius_area
. These 2 parameters determine when a triangle (which is the result of a triangulation of the point cloud) is considered too big and thus part of a hole in the data.
Hi @chrislcs, Thanks for your reply, You can download my point cloud from this link
Hi @levanpon98, I have the same issues with the code as you mentioned above, did you fix your problem? and can you tell me how you did this? Many thanks in advance
Hi @chrislcs , I met the same issue as @levanpon98 , no matter how I adjust max_circumradius and max_ratio_radius_area there always raise this error, and only one big triangle can be found. Do you know how to solve this?
Same issue here, @chrislcs, any suggestion? Thanks.
IndexError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_23316\2779657841.py in
~\AppData\Local\Temp\ipykernel_23316\1142188005.py in fill_holes(points, max_circumradius, max_ratio_radius_area, distance, percentile, normals_z, min_norm_z, bounding_shape, height_clustering, kde_bandwidth, suppress_qhull_errors) 404 height_clustering=height_clustering, 405 kde_bandwidth=kde_bandwidth, --> 406 suppress_qhull_errors=suppress_qhull_errors 407 ) 408
~\AppData\Local\Temp\ipykernel_23316\1142188005.py in find_holes(points, max_circumradius, max_ratio_radius_area, height_clustering, kde_bandwidth, suppress_qhull_errors) 336 if len(big_triangles) != 0: 337 holes = triangles_to_holes(points, tri.simplices, big_triangles, --> 338 height_clustering, kde_bandwidth) 339 340 holes = [holes] if type(holes) == Polygon else list(holes)
~\AppData\Local\Temp\ipykernel_23316\1142188005.py in triangles_to_holes(points, tri_simplices, big_triangles, height_clustering, kde_bandwidth) 260 261 if len(big_triangles) == 1: --> 262 holes = [Polygon(points_indexed[tri_simplices[big_triangles[0]]])] 263 elif not height_clustering: 264 holes = cascaded_union([Polygon(points_indexed[tri_simplices[t]])
IndexError: index 13620 is out of bounds for axis 0 with size 13616
Here is my point cloud
The shape is
When I execute the code
I got some errors
How can I fix this?