Skip to content

[Bug]: Triangles missing in IFCBSPLINESURFACEWITHKNOTS #2083

Description

@muren400

What happened?

Hi,

This model is not being rendered correctly: SOCKEL.ifc.txt

There is one triangle missing in each entity of IFCBSPLINESURFACEWITHKNOTS.

Image

It seems like the cause can be found in curve-utils.h in GetRationalBSplineCurveWithKnots(...)

for (double i = 0; i < 1; i += step)
{
glm::dvec3 point = InterpolateRationalBSplineCurveWithKnots(i, degree, points, knots, weights);
c.push_back(point);
}

The curve points are added including the first control point (i=0) but missing the last one (i=1)
So the curve is missing its endpoint.

This is usually compensated by the fact, that the next edge curve also contains the endpoint of it's predecessor as its starting point. When a curves orientation is reversed though, that point is missing in both curves. And thats exactly what happened here.

I fixed it by simply adding the last control point to the list. Should I submit a PR for this?

Version

0.77

What browsers are you seeing the problem on?

Chrome

Relevant log output

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions