Actually display the "zero-length edge!" polygon error.
Before this commit, the initial state allCoplanar=false took precedence over allNonZeroLen=false, since detecting a zero-length edge short-circuits AssembleLoops.
This commit is contained in:
parent
b3df595769
commit
efb9fa3d69
|
@ -63,12 +63,12 @@ void Group::GenerateLoops(void) {
|
||||||
{
|
{
|
||||||
bool allClosed = false, allCoplanar = false, allNonZeroLen = false;
|
bool allClosed = false, allCoplanar = false, allNonZeroLen = false;
|
||||||
AssembleLoops(&allClosed, &allCoplanar, &allNonZeroLen);
|
AssembleLoops(&allClosed, &allCoplanar, &allNonZeroLen);
|
||||||
if(!allCoplanar) {
|
if(!allNonZeroLen) {
|
||||||
|
polyError.how = POLY_ZERO_LEN_EDGE;
|
||||||
|
} else if(!allCoplanar) {
|
||||||
polyError.how = POLY_NOT_COPLANAR;
|
polyError.how = POLY_NOT_COPLANAR;
|
||||||
} else if(!allClosed) {
|
} else if(!allClosed) {
|
||||||
polyError.how = POLY_NOT_CLOSED;
|
polyError.how = POLY_NOT_CLOSED;
|
||||||
} else if(!allNonZeroLen) {
|
|
||||||
polyError.how = POLY_ZERO_LEN_EDGE;
|
|
||||||
} else {
|
} else {
|
||||||
polyError.how = POLY_GOOD;
|
polyError.how = POLY_GOOD;
|
||||||
// The self-intersecting check is kind of slow, so don't run it
|
// The self-intersecting check is kind of slow, so don't run it
|
||||||
|
|
Loading…
Reference in New Issue
Block a user