Skip to content

feat: add AutoCAD-style layer commands and reorganize command modules - #223

Merged
mlightcad merged 1 commit into
mainfrom
feat/layer
Apr 19, 2026
Merged

feat: add AutoCAD-style layer commands and reorganize command modules#223
mlightcad merged 1 commit into
mainfrom
feat/layer

Conversation

@mlightcad

Copy link
Copy Markdown
Owner

Summary

This PR expands layer-management capabilities in the CAD viewer and refactors the command structure to make the codebase easier to navigate and extend.

What Changed

  • added AutoCAD-style layer commands, including -LAYER, LAYDEL, LAYFRZ, LAYOFF, and LAYERCLOSE
  • registered the new layer commands in AcApDocManager
  • wired LAYERCLOSE to the viewer through the shared event bus so it closes the layer manager only when that palette tab is active
  • reorganized command implementations into feature-based folders:
    • convert
    • draw
    • layer
    • measure
    • modify
    • review
  • simplified command exports and updated imports accordingly
  • added and updated English and Chinese command text for the new layer-related workflows
  • added layer-related SVG assets and exports in cad-viewer, including icons for layer state, color, line style, and line weight
  • added unit coverage for AcApLayerCloseCmd

Why

  • improve parity with familiar AutoCAD layer workflows
  • make command implementations easier to maintain by grouping them by domain
  • prepare the viewer UI and command system for richer layer operations and palette interactions

Notes

  • LAYOFF and LAYFRZ keep AutoCAD-style settings and undo flows, while viewport-specific behavior falls back to the current viewer capabilities where needed
  • LAYERCLOSE is intentionally scoped to close the layer manager only when the layer tab is currently open

Testing

  • added AcApLayerCloseCmd unit test

@mlightcad mlightcad self-assigned this Apr 19, 2026
@mlightcad mlightcad added the enhancement New feature or request label Apr 19, 2026
@mlightcad
mlightcad merged commit da97112 into main Apr 19, 2026
2 checks passed
@mlightcad
mlightcad deleted the feat/layer branch April 19, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant