Skip to content

[BUG] - Lattice - Inifity loop #50

@MathiasNysomFlohr

Description

@MathiasNysomFlohr

Describe the bug
SpreadsheetExtractionAlgorithm sometimes runs in eternal loop

To Reproduce
The pdf is non-shareable.
It is 13.968 KB, 469 filled with tables. No tables has visible lines.

Expected behavior
Run through and identified tables properly.

Additional context
We have found the issue might lie in SpreadsheetExtractionAlgorithm, ll. 319-340.
We have tested this code and found it works (and seems to produce same results in final ouput of extraction):

``for (var i = 0; i + 1 < pointSet.Count; i++)
{
if (Utils.Feq(pointsSortY[i].Y, pointsSortY[i + 1].Y))
{
edgesH[pointsSortY[i]] = pointsSortY[i + 1];
edgesH[pointsSortY[i + 1]] = pointsSortY[i];
i++;
}
}

for (var i = 0; i + 1 < pointSet.Count; i++)
{
if (Utils.Feq(pointsSortX[i].X, pointsSortX[i + 1].X))
{
edgesV[pointsSortX[i]] = pointsSortX[i + 1];
edgesV[pointsSortX[i + 1]] = pointsSortX[i];
i++;
}
}``

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