planFootprintCorners (lib/plan-footprint.ts)

editor · packages/core/src/lib/plan-footprint.ts · typescript · MIT
ui, tag:knn-classified

Calculates rotated footprint corners and AABB for spatial grid placement.

// Source: https://github.com/pascalorg/editor | License: MIT | Copyright 2026 Pascal Group Inc
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Pure plan (XZ) footprint math — one source for spatial-grid collision and
 * alignment anchors. The `@pascal-app/core/plan-footprint` subpath is the seam
 * for a follow-up that consolidates MCP layout clearance onto these helpers.
 *
 * ## Invariant
 * Callers share `planFootprintCorners` / `planFootprintAABB`. Do not invent a
 * third rotation-aware plan AABB path beside this module.
 *
 * ## Gap call-site meanings (for the follow-up overlap helper)
 * When an expand-then-intersect overlap check lands here, treat `gap` as
 * **minimum free space** (expand each box by `gap`, then intersect):
 * - Packing / furnish: typicall

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key