Skip to content

Add a visible flat-pattern command and DXF download #7

Description

@protosphinx

Why this matters

The exact derived flat body and deterministic flat-dxf writer already exist, but neither has a normal human workflow.

Scope

  • Add a visible command that chooses an eligible base flange and dispatches sheetMetal.flatPattern.create.
  • Present the derived body as read-only.
  • Add a visible download action using the existing flat-dxf implementation and selected flat feature ID.
  • Support deleting the flat pattern through the existing typed lifecycle.
  • Keep bend-line annotations, scaling, kerf, nesting, unfold and fold, and non-90-degree bends out of scope.

Relevant files

  • src/page.html
  • src/static/studio.js
  • src/static/studio-v6-ui-registry.js
  • scripts/studio-sheet-metal-flat-smoke.ts
  • scripts/browser-smoke.ts
  • docs/sheet-metal.md

Acceptance evidence

  • The visible command creates one read-only derived flat body.
  • Its exact volume equals flatArea * thickness.
  • Save and reopen reproduce the same canonical result.
  • The downloaded DXF is byte-deterministic and passes the existing independent parser.
  • Duplicate flat patterns and new downstream flanges fail without mutation.
  • The folded source body remains unchanged by creating or deleting the derived flat result.

Test commands

npm run build
npm run smoke:sheet-metal-flat
npm run smoke:drawing-dxf
npm run smoke:browser
npm run ci:gate

Contribution size

M: one visible create/delete flow plus a download action over existing exact implementations.

Maintainer response expectation

Post the short UI or fixture approach requested above and wait for maintainer scope confirmation before implementation. Review will focus on the listed acceptance evidence.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: sheet-metalSheet-metal authoring, unfolding, and flat outputenhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions