Skip to content

Floorplan export emits a blank page for the dedicated roof support level #618

Description

@Vasily-Zh

Summary

resolveExportLevels() in packages/editor/src/lib/floorplan/floorplan-export.tsx
collects every level child of the active building:

levelNodes = childIds.map((id) => nodes[id]).filter((n): n is AnyNode => n?.type === 'level')

A dedicated roof support level (metadata.role === 'roof') is included, so the
exported PDF gains a page titled with the roof level's label that contains only
the roof outline — no rooms, no dimensions, nothing a floor plan is for.

The project's own agent guide states the intent explicitly: "A dedicated roof
support level is valid and should not count as an occupied story."
The
elevation math (getLevelElevations) and the level UI honour that; the plan
export does not.

Reproduce

  1. Build a house, add a roof via the roof tool (it creates a Roof level with
    metadata.role = 'roof').
  2. Settings → export the floor plan.
  3. The PDF has an extra page for the roof level.

Suggested fix

levelNodes = childIds
  .map((id) => nodes[id])
  .filter((n): n is AnyNode => n?.type === 'level')
  .filter((n) => (n.metadata as { role?: unknown } | undefined)?.role !== 'roof')

A roof-plan drawing type already exists in DRAWING_TYPE_OPTIONS, so a roof
level could later get a page of its own deliberately — but not as a blank
floor plan.

Version

@pascal-app/editor@1.0.0-beta.4

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