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.pull/4/head
parent
b3df595769
commit
efb9fa3d69
|
@ -63,12 +63,12 @@ void Group::GenerateLoops(void) {
|
|||
{
|
||||
bool allClosed = false, allCoplanar = false, allNonZeroLen = false;
|
||||
AssembleLoops(&allClosed, &allCoplanar, &allNonZeroLen);
|
||||
if(!allCoplanar) {
|
||||
if(!allNonZeroLen) {
|
||||
polyError.how = POLY_ZERO_LEN_EDGE;
|
||||
} else if(!allCoplanar) {
|
||||
polyError.how = POLY_NOT_COPLANAR;
|
||||
} else if(!allClosed) {
|
||||
polyError.how = POLY_NOT_CLOSED;
|
||||
} else if(!allNonZeroLen) {
|
||||
polyError.how = POLY_ZERO_LEN_EDGE;
|
||||
} else {
|
||||
polyError.how = POLY_GOOD;
|
||||
// The self-intersecting check is kind of slow, so don't run it
|
||||
|
|
Loading…
Reference in New Issue