Closed YuriHakove closed 5 years ago
i got,it's because of the influence of the rotate of the obj. But , can fix this?
I had the same problem. You might want to tweak the EPSILON value in CSG.cs I stopped having the problem when I changed it from 1.0E-5 to 1.0E-4
This is amazing!!!Can you tell me how found it?
I put a breakpoint on the piece of code you provided when it was stuck in its infinite loop. I found out that there was a bug in the bsp code where it keeps trying to partition the same vertices over and over and over and over and over again. The reason that kept happening is because of a precision error where it didn't recognize a vertex was coplanar. Normally the epsilon 1.0E-5 would be enough, but I think that because of the rotation you have less precision on the floating point. Not sure how robust this fix is because I don't know how the algorithm works in detail.
Thank you for a detailed answer. I put a breakpoint too,but I don‘t found this parameter have some problem.Thanks again.
public void Build(List list)
{
...
}