Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

closeCells() fails with "this makes no sense!" exception #27

@tg8

Description

@tg8

The following parameters cause "this makes no sense!" exception:

var  sites =
 [
  { id:"A", x:0      , y:1994781.61 }
 ,{ id:"B", x:2225857, y:34336      }
 ,{ id:"C", x:2575935, y:33225      }
 ,{ id:"D", x:5464269, y:0          }
 ]
;
var  buffer = 360000;
var  bbox = { xl:0          - buffer
            , yt:0          - buffer
            , xr:5464269    + buffer
            , yb:1994781.61 + buffer
//            , yb:2000000    + buffer
            };

var  v = new Voronoi();
var  r = v.compute( sites, bbox );

When yb:2000000 line is uncommented - exception goes away.
If I put some visualizing code just in front of this.closeCells(bbox); call, I get the following picture:
Visualization results
where in green are this.edges state just before the call.
Exception happens when the cell for the "B" site is processed.
I'm using rhill-voronoi-core.js from the current master branch.
Complete example https://gist.github.com/tg8/4b4b2b5c853fbb41f7e1

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