fix(junction): keep complex carriageways connected
This commit is contained in:
1 parent
53a2cb3450
commit
855400fba2
3 files changed
+77
-6
No files matched your search
@@ -366,6 +366,36 @@ const clusterWidthHandle = clusterHandleResolution.handles.handles.find(
|
||||
(handle) => handle.kind === 'cluster-carriageway-width',
|
||||
);
|
||||
assert.ok(clusterWidthHandle, 'a cluster selection publishes only its external carriageway widths');
|
||||
const clusterCutbackHandle = clusterHandleResolution.handles.handles.find(
|
||||
(handle) => handle.kind === 'cluster-carriageway-cutback',
|
||||
);
|
||||
assert.ok(clusterCutbackHandle, 'a cluster selection publishes its carriageway cutback handles');
|
||||
const cutbackAtLimit = resolveDirectEditConstraints(
|
||||
junctionModel,
|
||||
document([
|
||||
constraint({
|
||||
id: 'cluster-carriageway-cutback',
|
||||
kind: 'cluster-carriageway-cutback',
|
||||
anchor: clusterCutbackHandle.anchor,
|
||||
value: { cutbackMeters: clusterCutbackHandle.value.max },
|
||||
}),
|
||||
]),
|
||||
{ junctionClusters: [{ id: 'cluster-1', nodeIds: ['junction'] }] },
|
||||
);
|
||||
assert.equal(cutbackAtLimit.constraintStates[0].applied, true);
|
||||
const cutbackPastLimit = resolveDirectEditConstraints(
|
||||
junctionModel,
|
||||
document([
|
||||
constraint({
|
||||
id: 'cluster-carriageway-cutback-invalid',
|
||||
kind: 'cluster-carriageway-cutback',
|
||||
anchor: clusterCutbackHandle.anchor,
|
||||
value: { cutbackMeters: clusterCutbackHandle.value.max + 0.1 },
|
||||
}),
|
||||
]),
|
||||
{ junctionClusters: [{ id: 'cluster-1', nodeIds: ['junction'] }] },
|
||||
);
|
||||
assert.equal(cutbackPastLimit.constraintStates[0].applied, false);
|
||||
const widenedCluster = resolveDirectEditConstraints(
|
||||
junctionModel,
|
||||
document([
|
||||
|
||||
Reference in new issue
Block a user