Skip to content

Phase 6: 3D slice - #6

Merged
Mehulsri07 merged 3 commits into
mainfrom
phase-6-slice
Oct 14, 2026
Merged

Mehulsri07 merged 3 commits into
mainfrom
phase-6-slice

Conversation

@Mehulsri07

Copy link
Copy Markdown
Owner

A 3D slice on the Section screen: switch the drawing from "Flat drawing" to "3D slice" and the section becomes a block cut out of the ground, like a slice of cake.

  • Front: the section itself, exactly as on the flat drawing. Back: a cut parallel to the line, behind it (250 m to 2 km, 500 m to start). Ends: cuts across at A and A′. Top: the strip of ground with the borewells inside it as pins, and the line along its front edge.
  • One flat side per straight part of the line; the back follows the line with mitred corners, and never folds over behind a short part after a bend.
  • Every side is drawn like the flat drawing (faded = likely, paler = rough guess, hatched = not enough data; borewells solid), all at one scale so layers meet at the edges. Only outward sides are shown, so the inside is never seen.
  • Drag to turn and tilt, or use the arrow keys; Reset view. Heights start stretched so the block is about half as tall as it is long, with a slider from true scale upwards.
  • Built from flat SVG panels with CSS 3D transforms; no new libraries.

Checks: 140 unit tests (left offset, mitred and capped corners, no fold-over after short parts, faces and their direction, pins only behind the line, one height range); the real-app test switches to the 3D slice; screenshots checked for a straight and a bent line from two angles.

Review fixes: the back folded over where a short part followed a bend inwards; the block was far too tall on short lines; the arrow keys tilted the opposite way to dragging; the turnable view is announced as a 3D view with its instructions.

Not done: map tiles on the top (it is plain land colour); a borewell just past a bend can show on both neighbouring sides.

@Mehulsri07
Mehulsri07 merged commit 220a9fe into main Oct 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant