Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed Issues #3

Open
samsonsite1 opened this issue Jan 10, 2024 · 2 comments
Open

Speed Issues #3

samsonsite1 opened this issue Jan 10, 2024 · 2 comments

Comments

@samsonsite1
Copy link

I was able to get the code compiled as C++, however it runs extremely slow!
I tested both "angle" and "area" methods, and both are equally slow.

I tried filling a mesh with a single hole of about 250 boundary vertices, and the code hangs in the fill_hole_liepa() function when it enters the 3 nested loops (j,i,m). Here it slows down significantly.

Do you have any suggestions on speeding up the code for large holes with many boundary vertices?
Are there any parameters that can be set to adjust the "coarseness" of the fill?

I would like to fill the hole with triangles as large as possible, and not necessarily fill them with small triangles.

Thanks

@Aks11-11
Copy link

// Before entering the nested loops
for (int j = 0; j < num_boundary_vertices; ++j) {
// Bounding box check
if (abs(boundary_vertices[j].x - current_point.x) > max_distance ||
abs(boundary_vertices[j].y - current_point.y) > max_distance) {
continue;
}

// Nested loops
for (int i = 0; i < num_boundary_vertices; ++i) {
    for (int m = 0; m < num_boundary_vertices; ++m) {
        // Your existing code here
    }
}

}

@samsonsite1
Copy link
Author

Thanks for the reply, but I don't see that code anywhere.

This is the C++ source code file that I am referring to:
hole-filling-liepa/cpp/lib/hole_fillig_liepa.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants