Skip to content

Two extractors both own IfcGridAxis lines, so grid section-clipping is inert and the copies can disagree in Y #3368

Description

@louistrue

Two extractors both produce IfcGridAxis lines, both are gated on the same visibility toggle, and both draw. Three consequences follow from that one fact.

All three are read from source, not reproduced in a running viewer. Marked unproven where that matters.

1. Every grid axis is uploaded twice

  • rust/processing/src/symbolic/grid.rs pushes an axis polyline per IfcGridAxis into the symbolic stream.
  • rust/wasm-bindings/src/api/grid_lines.rs emits the same axis endpoints for the grid line-overlay channel.

apps/viewer/src/components/viewer/Viewport.tsx uploads both, each gated on ifcGridVisible. So with the grid on, every axis is drawn from two buffers.

2. Because of 1, #862's section clipping of grid lines is inert

apps/viewer/src/hooks/useSymbolicAnnotations.ts band-filters the symbolic copy against the section plane. The parseGridLines copy is not filtered at all. Both draw, so the user sees every axis regardless of the section band.

What #862's clip still achieves is clipping the bubble texts and fills, which only exist on the symbolic path. So the feature is half working, and the half that does not work is the half it is named for.

3. The two copies can disagree in Y

apps/viewer/src/hooks/symbolic-parse-cache.ts applies an originShift-aware elevation rebase (totalYupOffset) to the symbolic path. grid_lines.rs subtracts only RTC. For a federated or re-aligned model with a nonzero originShift, the two copies of the same axis sit at different elevations.

Unverified against a real file; read from the two code paths. A model with a nonzero originShift and visible grid axes would settle it quickly.

Why one issue

These are not three bugs, they are one unresolved ownership question with three symptoms: which extractor owns grid lines. Fixing that decides all three. Splitting them would hide the shared cause, and patching 2 or 3 without deciding 1 would leave two copies that must then be kept in agreement by hand.

How this was found

During the assessment phase for #3359, while working out whether routing the symbolic grid lift into the grid channel was safe. It was deliberately kept out of that change, which is narrower and already touches a published package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions