Skip to content

AddFace bail out inconsistency #3

@CBenghi

Description

@CBenghi

Hello,

I'm very new to the code-base and familiarising with it.
Nice work!

Looking at the code I've seen that a comment in AddFace seems to be claiming a bail-out, but the data is added anyway:

fuzzy-bools/src/geometry.h

Lines 108 to 128 in 43cffb1

inline void AddFace(uint32_t a, uint32_t b, uint32_t c)
{
//indexData.reserve((numFaces + 1) * 3);
//indexData[numFaces * 3 + 0] = a;
//indexData[numFaces * 3 + 1] = b;
//indexData[numFaces * 3 + 2] = c;
indexData.push_back(a);
indexData.push_back(b);
indexData.push_back(c);
double area = areaOfTriangle(GetPoint(a), GetPoint(b), GetPoint(c));
glm::dvec3 normal;
if (!computeSafeNormal(GetPoint(a), GetPoint(b), GetPoint(c), normal))
{
// bail out, zero area triangle
printf("zero tri");
}
numFaces++;
}

I'm happy to write a PR, if you think it is useful.
Best,
Claudio

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions