DEV Community

Source Tapestry Review
Source Tapestry Review

Posted on

Checking floor-plan overlap between visitor circulation and object-move clearance

A household with a display room faces a practical question before rearranging: does the space used to move an object conflict with the space visitors use? Both uses draw on the same floor plan, and a simple geometric check can tell you where they collide before anyone lifts anything.

Model the move area and the visitor area as rectangles on a grid. The move area is the footprint of the object plus the clearance needed to carry it between its current position, a temporary staging point, and storage. The visitor area is the walking path between the entry and the display positions. Overlap is not automatically a problem; the question is whether overlap occurs during the same time window.

Illustrative input in pseudocode:

move_rect = {x: 120, y: 40, w: 90, h: 40}
visitor_rect = {x: 150, y: 60, w: 200, h: 80}
time_move = 09:00-10:00
time_visit = 10:30-17:00

def overlaps(a, b):
return not (a.x + a.w <= b.x or b.x + b.w <= a.x or
a.y + a.h <= b.y or b.y + b.h <= a.y)

Expected result: overlaps(move_rect, visitor_rect) returns True. The rectangles intersect, but the time windows do not. That combination is acceptable for a rotation done outside opening hours, and the check should return a pass with a note that overlap exists in space but not in time.

Edge cases to test:

  • Zero-width or zero-height rectangles, which occur when an object is flush against a wall. Treat as non-overlapping but flag for review.
  • Exact touching edges. Standard rectangle intersection treats touching as non-overlapping; confirm that matches how the clearance was measured.
  • A move path that crosses the visitor area twice. Encode the path as multiple rectangles, not one bounding box, or the bounding box will overstate the conflict.
  • An object wider than the temporary staging point. The check should fail before the overlap test runs.

What the check can establish: whether two rectangles defined by the household intersect, and whether their time windows coincide. What it cannot establish: whether the clearance figure is adequate, whether the object can physically be carried through a doorway, or whether a path is safe under a given load. Those come from a handling assessment, not from geometry.

Check again if the household plans rotations during opening hours. Then spatial overlap and temporal overlap coincide, and the test should treat any intersection as a blocking condition rather than a note. The same code serves both cases; only the pass criteria for coincident time windows change.

Top comments (0)