Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

A command software architecture #181

Open
@ZacZhangzhuo

Description

@ZacZhangzhuo

Feature Request

Thinking deeper about issue #172, I found that a more sustainable way of developing the power of keyboard shortcuts is having a command architecture. The current way of adding code in the main class can only support a very limited number of commands and will make the code messy.

Many CAD software like AutoCAD are command-line-based, and the keyboard is just an alias for the corresponding command. Rhino even put the command line UI in front of the user, which is a successful design in my view.
image

Details

I would suggest the following update:

  • Adding a compas_view2.commands (orcompas_view2.actions?) class where all the actions and their names (like zoom_selected, SetView_TOP are stored).
  • Then, the user defines the keyboard shortcuts (alias) by modifying the settings.json .

Some additional thoughts

  • Many of our users are migrated from Rhino, which exports RhinoSettings.ini file to store the settings. Maybe we can add a helper function to intake the RhinoSettings.ini and directly produce a Rhino-like user-friendly setting?
  • Maybe we should add the command line UI?

@Licini

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions