Thu, 08/22/2024 - 09:02
Forums:
Boolean operation is very expensive. In my case, it takes 29 minutes to make a Boolean difference. I want to start parallel calculation and speed up Boolean difference. I use mingw and msvc. How can I use it?
Attachments:
Thu, 08/22/2024 - 09:43
Hello, TBB is optional. Native thread support already is a part of default build.
To turn on parallel execution, you need to use specific method in your Boolean class. Set parallel(true).
As for a TBB VS native threads, there no big differences.
Best regards, Dmitrii.
Thu, 08/22/2024 - 10:33
Thank you very much for your reply
I found this flag, Set parallel(true). I'm going to test the actual effect.
Thanks
Thu, 08/22/2024 - 09:48
Thank you very much for your reply
I found this flag, Set parallel(true). I'm going to test the actual effect.
Thanks
Thu, 08/22/2024 - 14:17
29m is a non-usual. Did you try to play with tolerance? Or for example, fix shape or unify your model before BO?
Best regards, Dmitrii.
Fri, 08/23/2024 - 04:54
hello, Thank you very much for your reply.
This is the test result on my machine.
```
// open parallel and use native boolean = 989791 ms
// close parallel and use native boolean = 1009063 ms
// close parallel and use tbb boolean = 1024792 ms
// open parallel and use tbb boolean = ???????? ms // no try
```
I found that opening and closing parallelism didn't seem to improve significantly.
Of course, I also found that you said that using native or tbb seems to have the same effect.
Your reply is just one of my puzzles. In fact, I just want to significantly improve the performance of my program in some way.
My case doesn't have complicated geometric shapes, but it is a TopoDS_Face composed of a lot of basic geometric elements (circles, polygons, rectangles, etc.), but the remarkable feature of my data is that the number is very large.
I will also try these methods: tolerance fixshape or unify model
If you have any good suggestions for me, I will be very grateful.
Fri, 08/30/2024 - 16:41
You could optimize it with a KD-tree or something, and only consider shapes that overlaps?