A two-dimensional CAD software interface interaction method based on customized event distribution

By adopting a customized event distribution mechanism, the contradiction between the operational efficiency and learning cost of 2D CAD software is resolved, achieving efficient interface interaction, supporting general keyboard commands and modern mouse clicks, and reducing the learning difficulty.

CN120995533BActive Publication Date: 2026-01-27BEIJING GUANGLIANDA YUNTU DREAM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511484602.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-17
Publication Date
2026-01-27
Estimated Expiration
2045-10-17

AI Technical Summary

Technical Problem

Existing 2D CAD software operation methods present a contradiction between efficiency and learning cost. Skilled users can operate the software efficiently, but beginners face high learning costs. Furthermore, the traditional keyboard operation mode has poor compatibility with the modern mouse click mode.

Method used

By using a customized event distribution mechanism, operating system events are intercepted and forwarded to achieve a pseudo-modal window effect, tile function options, and display parameter inputs and graphic effects in real time in the drawing area. It also supports the combination of general keyboard commands and mouse clicks.

Benefits of technology

It improves the operational efficiency of skilled users, reduces the learning cost for beginners, achieves immediacy and intuitiveness in interface operation, and is compatible with the usage needs of different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120995533B_ABST
    Figure CN120995533B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of software interface interaction, and provides a two-dimensional CAD software interface interaction method based on customized event distribution, which completely retains the general keyboard operation commands of the CAD software which have been conventionally accepted in the industry, so that the user can input commands according to the existing habits and quickly work. Through the redesign of the structure process of each function, the interface options are constant during the use of each function and are tiled on the interface, so that the user can quickly understand all the capabilities of the function. When performing specific operations, the function options can be directly triggered from the interface, which simplifies the triggering steps of the function options. At each step, the user can select keyboard commands or button clicks according to his own ability level and existing habits to promote the process, thereby solving the problem that the existing CAD software cannot coexist in high efficiency and easy learning for beginners, and improving the efficiency of the original operation mode to a certain extent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of software interface interaction technology, specifically relating to a two-dimensional CAD software interface interaction method based on customized event distribution. Background Technology

[0002] CAD (Computer-Aided Design) software is a tool that uses computer technology for design, drafting, modeling, and engineering analysis. Two-dimensional CAD drafting software is primarily used for creating various drawings in fields such as architecture, machinery, and electrical engineering.

[0003] This section uses AutoCAD as an example to illustrate the typical operation mode of 2D CAD drawing software. AutoCAD, developed by Autodesk, is a typical example. Launched in the 1980s, AutoCAD retains a strong resemblance to older computer operation methods. AutoCAD encourages users to input keyboard commands rather than clicking on functions and options on the interface with a mouse. Its functional design structure is a tree-like branching structure, not a network-like expansion structure. That is, the control options within the functions change dynamically with the current operation, rather than remaining constant. Due to AutoCAD's dominant market position, subsequent mainstream 2D ​​CAD drawing software have strictly followed this operation mode. The advantage of this operation mode is that, for experienced CAD users, using keyboard commands eliminates the need for frequent mouse movements on the screen, resulting in high operational efficiency in most scenarios. However, it also has the following problems:

[0004] 1) In some scenarios, there is also the problem of inefficiency. For example, if a process requires inputting a parameter, the parameter input box will only appear after the option to input the parameter is selected in the current process and the input step is entered. The parameter cannot be directly entered in a certain position on the interface.

[0005] 2) On the other hand, for beginners who are new to CAD software, this operating mode differs significantly from modern software, resulting in a high learning curve. The reasons are as follows: First, users need to memorize a large number of keyboard commands. Second, because the functional structure is a tree-like branching structure, during use, function options are always located within a specific branch, making it difficult to understand the full capabilities of a function as a whole.

[0006] There are also some small CAD utility software programs on the market, but they account for a small percentage. These programs use the mouse-click button operation method common to modern CAD software. However, they lack good support for the general keyboard operation commands of traditional CAD software, forcing users to frequently move long distances within the software using the mouse. Therefore, while these programs are easy to use, they are not very efficient for advanced users familiar with CAD software. Summary of the Invention

[0007] The purpose of this invention is to overcome the existing defects and provide a two-dimensional CAD software interface interaction method based on customized event distribution.

[0008] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0009] A method for user interface interaction in 2D CAD software based on customized event distribution includes:

[0010] (1) Obtain all events transmitted by the operating system and intercept and process mouse events, scroll wheel events, keyboard events and window show / hide events;

[0011] (2) If the event is a form show / hide event and the form is marked as modal / pseudomodal, then the interception of the form is recorded or canceled according to the event type, and then the frame performs default dispatch;

[0012] (3) If the current interface has a pop-up button menu, right-click menu or drop-down menu, forward the mouse event, scroll wheel event and keyboard event to the pop-up menu and terminate the default distribution of the frame;

[0013] (4) When there is an intercepting window and the window is the event sending object, the event is dispatched by the frame. If it is not the event sending object, messages other than the middle mouse button and scroll wheel are intercepted, and only operations within the window and camera adjustment operations in the main drawing area are allowed.

[0014] (5) Distribute keyboard events in a hierarchical manner: if the system focus is on the input control, the event is handled by the framework; if the focus is not on the input control and the text / table editor is active, the event is forwarded to the editor; if the text / table editor is not active, the event is distributed according to the key type.

[0015] (6) For mouse / wheel events distributed from the frame to the main drawing area, camera modification operations are executed first; if no event is triggered, the operation is transferred to command processing.

[0016] (7) The dynamic preview of parameter input and graphic element effect is displayed in real time in the drawing area.

[0017] Furthermore, the step of acquiring all events transmitted by the operating system and intercepting and processing mouse events, scroll wheel events, keyboard events, and window show / hide events includes:

[0018] Build a message dispatch module to intercept all events passed to the software by the operating system in advance, and immediately return all events except mouse events, scroll wheel events, keyboard events, and window show / hide events to the framework for default dispatch.

[0019] Furthermore, the message distribution module includes:

[0020] The interception unit is used to intercept events in front of the framework, block the framework from continuing to distribute events, and allow the framework to continue distributing events under preset scenarios;

[0021] The status judgment unit is used to determine whether the software is currently active, whether there is a modal / pseudo-modal window, and whether there is a pop-up menu.

[0022] The distribution unit makes a comprehensive judgment based on information such as event type, status judgment result, and the control where the focus is located, and forwards the event to the designated recipient.

[0023] Furthermore, in step (5), the distribution based on the key type includes:

[0024] Key events for numbers, decimal points, or minus signs are dispatched to dynamic input. Key events for letters / symbols are dispatched to the control bar if they correspond to a control bar control; otherwise, they are dispatched to command processing.

[0025] Furthermore, step (3) specifically includes:

[0026] Real-time monitoring of whether pop-up button menus, right-click menus, or drop-down menus exist on the current interface;

[0027] When the above menu is detected and the event is a mouse event, scroll wheel event, or keyboard event, the event is forwarded to the pop-up menu through a preset forwarding mechanism, and the framework's default dispatch process for the event is prevented.

[0028] Furthermore, step (4) specifically includes:

[0029] A pre-defined mechanism is provided to determine whether the event sending object belongs to the intercepting window;

[0030] When an intercepting window exists, this judgment mechanism is used to check whether the event sending object belongs to the window. If it does, the message is handed over to the framework for distribution.

[0031] If it does not belong to the category, then the preset interception mechanism will be used to intercept messages other than the middle mouse button and scroll wheel, while ensuring that operations within the window and camera adjustments in the main drawing area can be performed normally.

[0032] In combination with the above technical solutions, the beneficial effects of the present invention compared with the prior art are as follows:

[0033] This invention retains and further improves the efficiency of existing CAD software operation methods, supports universal keyboard commands, and conforms to industry user habits. It changes the functional flow structure, laying out function options flat on the interface. It implements a pseudo-modal window effect, meaning that when a pseudo-modal window pops up, operation is only possible within that window or by browsing the drawing area using the middle mouse button and scroll wheel. On one hand, this shortens the triggering steps, improving the efficiency of the original operation method; on the other hand, it approximates the design presentation mode of modern software, reducing the learning cost for novice users. By dynamically previewing parameter inputs and graphic effects in real-time in the drawing area, it achieves real-time changes in geometric lines and floating text input boxes based on the editing state, optimizing the instantaneous linkage between input parameters and the drawing area preview effect, making the drawing expectations clearer. Attached Figure Description

[0034] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0035] Figure 1 This is a flowchart of a two-dimensional CAD software interface interaction method based on customized event distribution provided in an embodiment of the present invention;

[0036] Figure 2 This is a schematic diagram illustrating the operating principle of the distribution module provided in this embodiment of the invention. Detailed Implementation

[0037] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0038] Example 1:

[0039] like Figure 1 The image shown is an embodiment of the two-dimensional CAD software interface interaction method based on customized event distribution provided by the present invention, which specifically includes the following steps:

[0040] S1: Acquire all events transmitted by the operating system and intercept and process mouse events, scroll wheel events, keyboard events, and window show / hide events;

[0041] S2: If the event is a form show / hide event and the form is marked as modal / pseudo-modal, then the form is recorded or unintercepted according to the event type, and then the framework performs default dispatch.

[0042] S3: If the current interface has a pop-up button menu, right-click menu or drop-down menu, forward mouse events, scroll wheel events and keyboard events to the pop-up menu and terminate the default distribution of the frame;

[0043] S4: When there is an intercepting window and the window is the event sending object, the event is dispatched by the frame. If it is not the event sending object, messages other than the middle mouse button and scroll wheel are intercepted, and only operations within the window and camera adjustment operations in the main drawing area are allowed.

[0044] S5: Hierarchical distribution of keyboard events: If the system focus is on an input control, the event is handled by the framework; if the focus is not on an input control and the text / table editor is active, the event is forwarded to the editor; if the text / table editor is not active, the event is distributed according to the key type.

[0045] S6: For mouse / wheel events dispatched from the frame to the main drawing area, prioritize camera modification operations; otherwise, switch to command processing.

[0046] S7: Real-time preview of parameter inputs and graphic effects is displayed in the drawing area.

[0047] Specifically, this invention fully retains the universal keyboard operation commands already established in the industry for CAD software, allowing users to input commands quickly according to their existing habits. On the other hand, the structure and flow of each function have been redesigned. During the use of each function, the interface options remain constant, laid out flat on the interface, allowing users to quickly understand all the capabilities of the function. When performing specific operations, these options can be directly accessed from the interface, simplifying the triggering steps. This solves the problem of existing CAD software's incompatibility between work efficiency and ease of learning for beginners, while also improving the efficiency of the original operating mode to a certain extent.

[0048] This invention can be presented as a basic interactive method for CAD software. This interactive effect is triggered throughout the entire process of a user using the software's basic functions, from function activation to completion. At each step, the user can choose to use keyboard commands or button clicks to advance the process according to their skill level and existing habits.

[0049] In implementation, this invention sets keyboard trigger commands for each function in the software, ensuring consistency with commonly used trigger commands in the industry. For each function, the capabilities of all branches within the function are analyzed, refined, integrated, and the functional structure is redesigned. When a function is triggered, all controllable items corresponding to that function are fully displayed on the interface as clickable mouse buttons. Keyboard shortcut commands are set for all controllable items of the function, maintaining consistency with shortcut commands for corresponding functions and branch nodes in commonly used industry software. Message forwarding ignores the current control focus, ensuring correct triggering of keyboard shortcut commands and parameter input in this keyboard-mouse combination mode. Through these methods, the user experience is identical to traditional CAD software when using keyboard commands to drive the process. Combined with the redesigned functional structure, the dynamic preview effect of the drawing area is redesigned to adapt the drawing effect preview to the new process.

[0050] The specific logic for event distribution in this embodiment of the invention includes:

[0051] 1. Intercept all events passed to the software by the operating system in advance and hand them over to a message dispatch module. This module actually only cares about mouse events, scroll wheel events, keyboard events, and window show / hide events; other events will be immediately returned to the framework (such as Qt) for default dispatch.

[0052] When intercepting system events, the framework provides the timing for interception. For example, Windows uses hooks; Qt allows you to override the virtual notify method by deriving QApplication. When notify returns true, it indicates that the event will be terminated and intercepted. When it returns false, it indicates that the event will continue to be dispatched by the framework.

[0053] 2. If it is a window show / hide event, and the window is marked as modal or pseudo-modal, then the window is recorded or unintercepted depending on whether the current event is shown or hidden, and then handed over to the framework for default dispatch.

[0054] The "showEvent" and "hideEvent" events are collectively referred to as "showEvent" and "hideEvent," respectively, and are two distinct events. The recording method involves first marking a global state and determining its value, indicating whether at least one modal / pseudo-modal window currently exists. When the event type is "showEvent," the state value is incremented by 1; when the event type is "hideEvent," the state value is decremented by 1.

[0055] 3. If there is a pop-up button menu, right-click menu, or drop-down menu, and this event is a mouse event, scroll wheel event, or keyboard event, then forward the event to this menu and terminate the frame's default dispatch.

[0056] 4. If there is an intercepting window, continue to check whether the event sending object belongs to that window. If so, hand the message over to the frame for distribution. Otherwise, intercept messages other than the middle mouse button and scroll wheel, thereby achieving the pseudo-modal effect.

[0057] Specifically, a mechanism is first preset to determine whether the event sending object belongs to the intercepting window. The determination method is to use the last pop-up modal / pseudo-modal window as the intercepting window. When an intercepting window exists, the mechanism is used to check whether the event sending object belongs to that window. If it does, the message is handed over to the framework for distribution. If it does not, the preset interception mechanism is used to intercept messages except for the middle mouse button and scroll wheel, while ensuring that operations within the window and camera adjustments in the main drawing area can be performed normally.

[0058] 5. If the current event is a keyboard event, check if the current system focus is on an input control. If so, pass the message to the framework for distribution. Otherwise, continue to check if the text and table editors are active. If so, forward the message to the editor and terminate the framework's default distribution. Otherwise, continue to distribute the message according to the type of keyboard key: numbers, decimal points, and minus signs are distributed to dynamic input, and letters and symbols are distributed to the control bar if they correspond to controls on the control bar, otherwise they are distributed to commands.

[0059] A command is an ordered sequence of responses to mouse and keyboard events in the main drawing area, designed to perform a specific function. In actual software implementation, a logical sequence is encapsulated in a class, such as "move," "rotate," or "delete," each constituting a command class. The software then has the concept of a "current command," and there is clearly only one current command. Here, "command" refers to the current command, that is, the command class the user is currently executing—an ordered response logic.

[0060] 6. If a mouse or scroll wheel event is ultimately dispatched by the framework to the main drawing area, camera modification is attempted first. If camera modification cannot be triggered, the event is dispatched to a command. This is because there may be some obscured controls on the main drawing area below the mouse pointer, so the framework's default dispatch logic is used to filter out mouse events that actually correspond to the main drawing area.

[0061] Concept Explanation:

[0062] Main drawing area: The area in the center of the main window where drawings are displayed.

[0063] Command: The logical response to mouse and keyboard events in the main drawing area, organized in an orderly manner to accomplish a specific function.

[0064] Control Bar: A toolbar containing a series of controls above the main drawing area. These controls change with the commands and can be used to switch command sub-processes, activate command sub-functions, and modify command parameters.

[0065] Dynamic input: Floating input boxes and ruler lines on the main drawing area receive user input parameters such as length, angle, rectangular coordinates, and polar coordinates based on the current command sub-process.

[0066] Modal child form: When a child form pops up, it can only be operated within the child form. The parts outside the child form are unresponsive to mouse and keyboard.

[0067] Pseudo-modal child window: When the child window pops up, you can only operate within the child window and browse by operating the camera in the main drawing area. It does not respond to other mouse and keyboard events.

[0068] Camera: or Viewport, is the visible area for displaying content, containing information such as position, viewing direction, top direction, and zoom level.

[0069] It should be noted that the modal window is identified by checking the `isModal` flag on the base class `QWidget` of the window after it pops up; if it is true, it indicates a modal window. Since pseudo-modal is a constructed effect, a separate special flag can be set to indicate that it is a pseudo-modal window, depending on the requirements.

[0070] like Figure 2 The diagram shown illustrates the operational principle of the distribution module. The distribution module serves three purposes:

[0071] (1) Implement the function of pseudo-modal sub-window (modal sub-window is supported by the system, while pseudo-modal sub-window is related to the function of the main drawing area and is a unique requirement of drawing software).

[0072] (2) Ignore the current system focus and accurately forward keyboard events to the specified controls according to the current business scenario and command sub-process (such as receiving numbers for dynamic input and receiving letters for the control bar - dynamic input is used to input length and angle parameters, while only letters will be used as hotkeys on the control bar).

[0073] (3) Implement the response of various controls to hotkeys, so that the control bar can be configured more richly and intuitively. It is much easier to use than the control bar in traditional CAD that relies solely on buttons to trigger state transitions. Furthermore, it maintains consistency with traditional CAD in terms of hotkey logic to be compatible with user operating habits.

[0074] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in the present invention, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0075] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A two-dimensional CAD software interface interaction method based on customized event distribution, characterized in that, The method includes: (1) Obtain all events transmitted by the operating system, and intercept and process mouse events, scroll wheel events, keyboard events, and window show / hide events, including: Build a message dispatch module to intercept all events passed to the software by the operating system in advance, and immediately return all events except mouse events, scroll wheel events, keyboard events, and window show / hide events to the framework for default dispatch; The message distribution module includes: The interception unit is used to intercept events in front of the framework, block the framework from continuing to distribute events, and allow the framework to continue distributing events under preset scenarios; The status judgment unit is used to determine whether the software is currently active, whether there is a modal / pseudo-modal window, and whether there is a pop-up menu. The distribution unit makes a comprehensive judgment based on the event type, status judgment result, and information of the control where the focus is located, and forwards the event to the designated receiver. (2) If the event is a form show / hide event and the form is marked as modal / pseudomodal, then the interception of the form is recorded or canceled according to the event type, and then the frame performs default dispatch; (3) If the current interface has a pop-up button menu, right-click menu or drop-down menu, forward the mouse event, scroll wheel event and keyboard event to the pop-up menu and terminate the default distribution of the frame; (4) When there is an intercepting window and the window is the event sending object, the event is dispatched by the frame. If it is not the event sending object, messages other than the middle mouse button and scroll wheel are intercepted, and only operations within the window and camera adjustment operations in the main drawing area are allowed. (5) Distribute keyboard events in a hierarchical manner: if the system focus is on the input control, the event is handled by the framework; if the focus is not on the input control and the text / table editor is active, the event is forwarded to the editor; if the text / table editor is not active, the event is distributed according to the key type. Distribution based on key type includes: Key events for numbers, decimal points, or minus signs are dispatched to dynamic input. Key events for letters / symbols are dispatched to the control bar if they correspond to a control bar control; otherwise, they are dispatched to command processing. (6) For mouse / wheel events distributed from the frame to the main drawing area, camera modification operations are executed first; if no event is triggered, the operation is transferred to command processing. (7) The dynamic preview of parameter input and graphic element effect is displayed in real time in the drawing area.

2. The two-dimensional CAD software interface interaction method based on customized event distribution according to claim 1, characterized in that, Step (3) specifically includes: Real-time monitoring of whether pop-up button menus, right-click menus, or drop-down menus exist on the current interface; When the above menu is detected and the event is a mouse event, scroll wheel event, or keyboard event, the event is forwarded to the pop-up menu through a preset forwarding mechanism, and the framework's default dispatch process for the event is prevented.

3. The two-dimensional CAD software interface interaction method based on customized event distribution according to claim 1, characterized in that, Step (4) specifically includes: A pre-defined mechanism is provided to determine whether the event sending object belongs to the intercepting window; When an intercepting window exists, this judgment mechanism is used to check whether the event sending object belongs to that window. If it does, the message is handed over to the framework for distribution. If it does not belong, the preset interception mechanism is used to intercept messages other than the middle mouse button and scroll wheel, while ensuring that operations within the window and camera adjustments in the main drawing area can be performed normally.

Citation Information

Patent Citations

  • Qt graphical interface software-based operation log recording method and system

    CN105607985A

  • System, method, and computer-readable medium for displaying keyboard cues in a window

    US20020163542A1