This project is read-only.

Endless loop

Nov 24, 2013 at 5:59 AM
I Use superior.poly test data, check Quality mesh,Minimum angle = 37,Maxinum area = 0.34.
Run the program,first press Triangulate ,press Refine again, program occur endless loop.
Nov 24, 2013 at 10:14 AM
Edited Nov 24, 2013 at 11:51 AM
That's expected behavior. Refinement uses the default Triangle algorithm if an area constraint is set, which will most likely fail for minimum angles >= 34 degrees. The extended algorithm from aCute (which allows larger minimum angles) is only used for initial triangulation and for refinement, if no area constraint is set.

Actually, the reason why I chose this behavior were problems with the aCute code, which should be resolved in recent versions. I'll have a look at it and maybe change the default refinement code to always use the aCute algorithm.
Nov 25, 2013 at 12:20 AM
Thank you very much!
2013-11-25
-------------
fuzh

发件人:"wo80" <[email removed]>
发送时间:2013-11-24 18:15:00
主 题:Re: Endless loop [triangle:470951]
收件人:[email removed]

From: wo80

That's expected behavior. Refinement uses the default Triangle algorithm if an area constraint is set, which will most likely fail for minimim angles > 34 degrees. The extended algorithm from aCute (which allows larger minimum angles) is only used for initial triangulation and for refinement, if no area constraint is set.

Actually, the reason why I chose this behavior were problems with the aCute code, which should be resolved in recent versions. I'll have a look at it and maybe change the default refinement code to always use the aCute algorithm.
Nov 25, 2013 at 12:38 AM
When remove queue.Enqueue(badtri) statement from EnforceQuality() procedure in Quality.cs file, no endless loop occur. Reasonable?
Thank you
2013-11-25
-------------
fuzh

发件人:"wo80" <[email removed]>
发送时间:2013-11-24 18:15:00
主 题:Re: Endless loop [triangle:470951]
收件人:[email removed]

From: wo80

That's expected behavior. Refinement uses the default Triangle algorithm if an area constraint is set, which will most likely fail for minimim angles > 34 degrees. The extended algorithm from aCute (which allows larger minimum angles) is only used for initial triangulation and for refinement, if no area constraint is set.

Actually, the reason why I chose this behavior were problems with the aCute code, which should be resolved in recent versions. I'll have a look at it and maybe change the default refinement code to always use the aCute algorithm.
Nov 25, 2013 at 1:23 AM
Sorry, I was wrong.
2013-11-25
-------------
fuzh

发件人:"wo80" <[email removed]>
发送时间:2013-11-24 18:15:00
主 题:Re: Endless loop [triangle:470951]
收件人:[email removed]

From: wo80

That's expected behavior. Refinement uses the default Triangle algorithm if an area constraint is set, which will most likely fail for minimim angles > 34 degrees. The extended algorithm from aCute (which allows larger minimum angles) is only used for initial triangulation and for refinement, if no area constraint is set.

Actually, the reason why I chose this behavior were problems with the aCute code, which should be resolved in recent versions. I'll have a look at it and maybe change the default refinement code to always use the aCute algorithm.
Nov 25, 2013 at 10:08 AM
Edited Nov 25, 2013 at 10:09 AM
In Quality.cs, SplitTriangle(BadTriangle badtri) method, you can try removing the conditional, that's computing the Steiner point locations and just use the aCute code:
//if (behavior.fixedArea || behavior.VarArea)
//{
//  newloc = Primitives.FindCircumcenter(borg, bdest, bapex, ref xi, ref eta, behavior.offconstant);
//}
//else
{
    newloc = newLocation.FindLocation(borg, bdest, bapex, ref xi, ref eta, true, badotri);
}
WARNING: this is not tested. Let me know if it works.
Nov 25, 2013 at 10:36 AM
It does work properly,Thank your help!
2013-11-25
-------------
fuzh

发件人:"wo80" <[email removed]>
发送时间:2013-11-25 18:08:53
主 题:Re: Endless loop [triangle:470951]
收件人:[email removed]

From: wo80

In Quality.cs, SplitTriangle(BadTriangle badtri) method, you can try removing the conditional, that's computing the Steiner point locations and just use the aCute code:
//if (behavior.fixedArea || behavior.VarArea)
//{
//    newloc = Primitives.FindCircumcenter(borg, bdest, bapex, ref xi, ref eta, behavior.offconstant);
//}
//else
{
    newloc = newLocation.FindLocation(borg, bdest, bapex, ref xi, ref eta, true, badotri);
}
WARNING: this is not tested. Let me know if it works.