Files
OneCAD-Draft/src/scene
Hakan SevenandClaude Opus 4.8 0cd861cc76 fix(hatch): anchor prebaked pattern origin near the geometry
Prebaked hatch fills anchored each pattern family at its authored
base point minus world_origin. On UTM-scale drawings that offset is
~1e6, which broke the fill two ways:

  - the shader consumes x0/y0 as f32, so ~0.5 m quantization shredded
    the pattern phase; and
  - it evaluated the pattern that far from its origin, where the
    multi-family aggregate patterns (AR-CONC, AR-SAND, GRAVEL, ...) —
    effectively quasi-periodic — dissolve from their interlocking
    stones into scattered dashes.

Boundaries were unaffected throughout; they ride the double-single
relative-to-eye path.

Fold the origin's offset from world_origin down to a small,
coherence-safe remainder on a `spacing * 64` grid, applied as one
common fold so every family keeps the relative phase that forms the
stones. Because the origin grip / Origin X/Y edit shifts every base
point by the same delta, the sub-grid remainder tracks it 1:1, so the
grip still moves the fill; a grid crossing needs a full `spacing * 64`
drag and is never hit by realistic alignment drags.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-10 20:05:15 +03:00
..