Kit route crossings: count crossings at a shared sample and along a shared stretch

Ouverte
#235 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
54/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
typescript
Domaine
tooling

Piste de recherche

Start with packages/renderers/kit/src/routes/crossings.ts and segment-crossing.ts, then read crossingsBetween and the existing together behavior. Add the terraform-deployment and perpendicular-grid cases to packages/renderers/kit/test/routes.test.mjs and run the route tests. Done means both shared-sample and shared-stretch crossings are counted once, shared trunks from a common port remain uncounted, and the drafting, converging, and ports tests stay green.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

The kit's crossing test (polylinesCross / routeCrossings, packages/renderers/kit/src/routes/crossings.ts and segment-crossing.ts) counts a proper crossing, and since #234 a route passing through another at one of its own samples. It still misses:

  1. Two routes meeting at a sample of each. For example, perpendicular lines sampled every 3 units both have a sample at the crossing point, so neither the proper test nor the through-a-sample test sees it (Copilot review on #234).
  2. Two routes crossing along a stretch they share. One route joins another's run from one side and leaves it to the other side, which reads as a crossing with a hidden overlap. crossingsBetween treats collinear stretches as a trunk and never counts them.

These need doing together. Counting (1) alone (the neighbouring samples interleaved strictly around the shared point) changes terraform-deployment's routing so that lambda.api and lambda.payments into aws_subnet.private[0] take one track and part on opposite sides, which is (2).

Suggested approach: for a shared sample or shared collinear stretch, compare the side each route enters from (the last sample before) with the side it leaves to (the first sample after), relative to the other route. Count a crossing when they differ, once per shared stretch, and keep shared trunks from a common port uncounted, as together does now.

Check: add terraform-deployment and the perpendicular-grid case to packages/renderers/kit/test/routes.test.mjs; the drafting, converging and ports tests should stay green.

Langage dominant
TypeScript
Étoiles
4
Forks
1
Merge moyen
5 h 31 min
PR mergées (30 j)
229

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de githubnext/projections

Toutes les issues de githubnext/projections

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.