With #3615672: Read a row's seat order from the venue drawing, so a curved row stops claiming its two ends are adjacent a row's positions follow the row, but consecutive positions still mean "touching" even where the drawing shows a gap. In the bundled Auditorium de Bordeaux package, section 11 row A has a 68 map-unit step between two consecutive positions inside one subsection where the row's own seat pitch is 37, so a party can be seated across an aisle and told it is sitting together.
A subsection boundary already breaks a run, and correctly so: in that hall the balconies are partitioned boxes and the gap in the plan is a wall. What is missing is the break that is not a boundary.
Proposed fix
- A
gap_beforebase field on the place, TRUE when there is a physical break between this seat and the previous one along its row, so "positions p-1 and p are neighbours" becomes "consecutive and notgap_before". - Derived from the drawing by the same walk that numbers the row, so it needs no hand maintenance and no second source of truth.
- Honoured by
PlaceGeometry::run(),runsOf()andfragments(), and byTogether::nextBeside(), where "beside" already means touching. - Carried through
PlaceCandidateand the candidate read, and through the venue package format. - Drawn on the Numbering tab, so what was detected can be checked before it decides a booking.
Detection has to be conservative
Splitting a row that is not split is worse than the present behaviour: it would refuse seatings that are genuinely together. So the threshold is a multiple of the row's own median seat pitch rather than an absolute distance, and an ambiguous step stays adjacent.
On the bundled hall the separation is clean at roughly 1.8x the pitch: within-row steps measure 31 to 38 units and the breaks measure 50, 65, 68, 72, 87, 111 and up. The 50-unit case at 1.35x is genuinely ambiguous and may be chord shortening on a bend rather than an aisle, so it must fall on the adjacent side.
Performance
This touches the seating hot path, so it is bounded by: no new query (the flag rides the existing candidate read), no new work per rung beyond one boolean test where a position comparison already happens, and the detection itself runs only when a venue is imported or renumbered. To be proved against the propose benchmark rather than argued.
Issue fork yoyaku-3615673
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mably commented