alonso.torres 1b6b9c7c75 🐛 Keep a mirrored shape's rotation composing its transform on a turn
Under one flip a shape can store either of two turns for the same
transform: the one before its flip, which flips and turns produce, or
the opposite one after it, which sync may store when it orients a copy
child under a flipped parent. A transform adds its turn to the stored
rotation, and a flip negates it, as for the turn before the flip, so a
shape storing the other one was left with a rotation its transform does
not have: a child turned 45 degrees after its flip and turned again by
45 stored 90 over a plain flip.

`apply-transform-generic` now first takes, for a mirrored shape with an
unskewed transform, the turn before its flip that the transform gives.

Found by checking the shapes of the pinned generated programs for
rotations and flips that do not compose their transform (program 332:
rotate, flip the parent, rotate it, update main); none is left there but
the skew a layout or a scale constraint gives a turned child.

Test (geom-shapes-test, fails before the fix):
`a-rotation-turns-a-mirror-that-stores-the-turn-after-its-flip`.

Benchmark (bench-components, alone):

|                             :world | :baseline |   :now |   :mean | :ratio |
|------------------------------------+-----------+--------+---------+--------|
|  deepest-edit-through-three-levels |    35.215 | 21.448 |  23.648 |   0.61 |
| edit-through-a-chain-of-dependents |    68.931 | 41.076 |  43.132 |    0.6 |
|         library-update-into-copies |    83.083 | 54.822 |   56.18 |   0.66 |
|        main-edit-among-many-shapes |     4.837 |  2.275 |   2.358 |   0.47 |
|           main-edit-into-10-copies |      1.79 |   1.08 |   1.103 |    0.6 |
|          main-edit-into-100-copies |    15.415 | 10.411 |   11.35 |   0.68 |
|         main-edit-into-1000-copies |   153.086 | 110.32 | 118.294 |   0.72 |
|         variant-switch-into-copies |    32.052 | 21.161 |   23.07 |   0.66 |

AI-assisted-by: claude-opus-5-5
2026-11-18 10:29:50 +01:00
..
2026-11-10 20:21:16 +01:00
2026-09-29 09:07:34 +02:00
2026-03-11 15:24:40 +01:00