fix: keep complex islands beyond outer lane edge
This commit is contained in:
1 parent
3ed503a986
commit
c3579074fd
3 files changed
+19
-2
No files matched your search
@@ -151,6 +151,20 @@ assert.equal(solvedContacts.contacts.length, 3);
|
||||
assert.equal(solvedContacts.greenRing.length, 7);
|
||||
assert.equal(solvedContacts.legLengths.length, 2);
|
||||
assert.ok(solvedContacts.legLengths.every((value) => value > 5.1));
|
||||
const extendedContacts = solveIslandContacts(
|
||||
[
|
||||
[0, 1.7],
|
||||
[0, 5.1],
|
||||
],
|
||||
[
|
||||
[-1.7, 0],
|
||||
[-5.1, 0],
|
||||
],
|
||||
3.4,
|
||||
{ maxLegLength: 20, minLegLength: 9 },
|
||||
);
|
||||
assert.equal(extendedContacts.status, 'solved');
|
||||
assert.ok(extendedContacts.legLengths.every((value) => value >= 9));
|
||||
|
||||
assert.equal(new Set(solvedContacts.greenRing.slice(0, -1).map((p) => p.join(','))).size, 6);
|
||||
|
||||
|
||||
Reference in new issue
Block a user