refactor(junction): share canonical entry rings
This commit is contained in:
1 parent
f4cf42f1c6
commit
2f627df232
3 files changed
+14
-7
No files matched your search
@@ -513,13 +513,7 @@ function buildComplexJunctionGeometry(model, cluster, helpers) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
for (const { item, section } of boundaryParts) {
|
for (const { item, section } of boundaryParts) {
|
||||||
const ring = [
|
const ring = section.ring;
|
||||||
section.outer.right,
|
|
||||||
section.inner.right,
|
|
||||||
section.inner.left,
|
|
||||||
section.outer.left,
|
|
||||||
section.outer.right,
|
|
||||||
];
|
|
||||||
features.push({
|
features.push({
|
||||||
type: 'Feature',
|
type: 'Feature',
|
||||||
properties: {
|
properties: {
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ function buildJunctionBoundaryGraph(topology, center, radii, helpers, exclusionR
|
|||||||
transitionStatus: outer.stationMeters - inner.stationMeters > 1e-6 ? 'supported' : 'insufficient-source-length',
|
transitionStatus: outer.stationMeters - inner.stationMeters > 1e-6 ? 'supported' : 'insufficient-source-length',
|
||||||
outer,
|
outer,
|
||||||
inner,
|
inner,
|
||||||
|
ring: [outer.right, inner.right, inner.left, outer.left, outer.right],
|
||||||
edgeRefs: {
|
edgeRefs: {
|
||||||
left: `${key}:left`,
|
left: `${key}:left`,
|
||||||
right: `${key}:right`,
|
right: `${key}:right`,
|
||||||
|
|||||||
@@ -547,3 +547,15 @@ assert.ok(
|
|||||||
touchingGraph.sections.some((section) => section.exclusionStatus === 'overlaps-known-region'),
|
touchingGraph.sections.some((section) => section.exclusionStatus === 'overlaps-known-region'),
|
||||||
'a boundary-touching exclusion must remain protected',
|
'a boundary-touching exclusion must remain protected',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
assert.deepEqual(
|
||||||
|
teeBoundaryGraph.sections[0].ring,
|
||||||
|
[
|
||||||
|
teeBoundaryGraph.sections[0].outer.right,
|
||||||
|
teeBoundaryGraph.sections[0].inner.right,
|
||||||
|
teeBoundaryGraph.sections[0].inner.left,
|
||||||
|
teeBoundaryGraph.sections[0].outer.left,
|
||||||
|
teeBoundaryGraph.sections[0].outer.right,
|
||||||
|
],
|
||||||
|
'BoundaryGraph must expose the canonical entry ring consumed by compilation',
|
||||||
|
);
|
||||||
Reference in new issue
Block a user