Interactive geometric modeling related module design method, software construction method and device

By designing interactive geometric modeling related modules, the shortcomings of domestic finite element software in geometric modeling functions and user interaction experience are solved, and the scalability and maintainability of the software are improved, as well as the improvement of user experience.

CN118607319BActive Publication Date: 2025-04-08WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410802874.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2025-04-08
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

Domestic finite element software has significant shortcomings in geometric modeling functions and user interaction experience, resulting in increased software development and maintenance costs and poor user experience.

Method used

Design an interactive geometric modeling related module, analyze interactive logic, determine state diagrams and interaction diagrams, merge functional architecture class diagrams, and create mouse subclasses and interactive geometric modeling related modules based on these diagrams.

Benefits of technology

It improves the scalability and maintainability of the software, improves the integration of user interface design and mouse operation, and improves geometric modeling efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118607319B_ABST
    Figure CN118607319B_ABST
Patent Text Reader

Abstract

The present invention provides an interactive geometric modeling related module design method, a software construction method and a device, wherein the interactive geometric modeling related module design method includes: planning geometric modeling related operation functions and determining a plurality of large-granular modules; analyzing the interaction logic of each geometric modeling related function in each large-granular module one by one and determining the state diagram and interaction diagram corresponding to each large-granular module; determining the cross-module association of each geometric modeling related function in each large-granular module, and determining the functional architecture class diagram of each geometric modeling related function based on the state diagram and the cross-module association; determining a mouse subclass that provides interactive operation functions for geometric modeling related functions based on the interaction diagram; and creating an interactive geometric modeling related module based on the mouse interaction function and the functional architecture class diagram of the mouse subclass. The present invention improves the scalability and maintainability of the interactive geometric modeling related module, and improves the geometric modeling efficiency and user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of finite element simulation, and in particular to a method for designing modules related to interactive geometric modeling, a method for constructing software and a device. Background Art

[0002] In the broad arena of contemporary engineering design and scientific research practice, finite element simulation software, as an indispensable numerical simulation tool, has become increasingly influential and is widely used in the in-depth exploration of complex scientific and engineering problems, from structural mechanics analysis to fluid dynamics simulation, to heat conduction research and multi-physics field coupling calculation. With the rapid evolution of information technology and the continuous upgrading of user needs, the market has put forward unprecedented high standards for the interactivity, ease of use and comprehensiveness of finite element software.

[0003] In this context, domestic finite element software has exposed obvious shortcomings in the modeling process, especially in terms of geometric modeling functions and user interaction experience, which is far behind the leading international commercial software. Most domestic finite element simulation software often imports geometric models from third-party CAD software and ignores the architecture design and development of geometric modeling related modules. On the one hand, this leads to the loss of basic geometric modeling functions in the software, affecting the integrity and efficiency of the development and verification of finite element calculation methods in the software; on the other hand, it leads to the finite element software having to rely on third-party software, which not only forces users to switch back and forth between multiple software, affecting their user experience, but also restricts the development of software to other software, making it difficult to adapt to the rapid construction and modification of complex and heterogeneous models. This problem is mainly attributed to the lack of software architecture design, which makes it difficult to balance flexibility, scalability and maintainability during software development, and thus greatly increases the development and maintenance costs as the project progresses. In addition, ignoring the interaction logic between functions in the early stage of design further leads to the fact that users not only cannot obtain timely operation guidance and error prevention prompts during geometric modeling operations, but also encounter the problem of incoherent mouse behavior when executing advanced modeling functions, which seriously affects the fluency and efficiency of modeling.

[0004] In view of this, there is an urgent need to provide an interactive geometric modeling related module design method, software construction method and device to ensure the flexibility, scalability and maintainability of functional modules at the software development level, strengthen the interactive logic of geometric modeling operations at the user application level, and improve user experience. Summary of the invention

[0005] In view of this, it is necessary to provide an interactive geometric modeling related module design method, software construction method and device to solve the technical problems of poor flexibility, scalability and maintainability of functional modules at the software development level, insufficient interactive logic at the user application level, and poor user experience.

[0006] On the one hand, in order to solve the above technical problems, the present invention provides a method for designing modules related to interactive geometric modeling, comprising:

[0007] Plan the operation functions related to geometric modeling and determine multiple large particle modules;

[0008] Analyze the interaction logic of each geometric modeling related function in each large particle module one by one, and determine the state diagram and interaction diagram corresponding to each large particle module;

[0009] Determine the cross-module association of each geometric modeling related function in each of the large-grain modules, and determine the functional architecture class diagram of each of the geometric modeling related functions based on the state diagram and the cross-module association;

[0010] Determining a mouse subclass that provides interactive operation functions for the geometric modeling related functions based on the interaction graph;

[0011] An interactive geometric modeling related module is created based on the mouse interaction function of the mouse subclass and the functional architecture class diagram.

[0012] In a possible implementation, the geometric modeling related functions include drawing of base plane geometric shapes, setting of base plane geometric shape parameters, creation of geometric components, and Boolean operations of geometric components;

[0013] The large particle modules include but are not limited to a sketch module and a component module.

[0014] In a possible implementation, analyzing the interaction logic of each geometric modeling related function in each large particle module one by one to determine the state diagram and interaction diagram corresponding to each large particle module includes:

[0015] Using a unified modeling language to analyze in detail various geometric modeling related functions in each of the large particle modules to obtain analysis results;

[0016] Based on the analysis results, the transitions of different states that need to be experienced in the interactive operation process of a geometric modeling-related function and the changes of corresponding interactive behaviors during the state transition process are sorted and described, and the state diagram and the interaction diagram are generated accordingly;

[0017] The interaction diagram is used to describe the active objects that respond to user operations and other objects that participate in subsequent interaction processes during an interactive operation process of a geometric modeling-related function, and to describe the message transmission and interaction methods between objects.

[0018] In a possible implementation, the functional architecture class diagram for determining each of the geometric modeling related functions based on the state diagram and the cross-module association includes:

[0019] Combine and analyze the state diagrams and interaction diagrams of each of the geometric modeling related functions, and determine the common parts and differences in the interaction logic. Abstract the common parts into high-level abstract parts in the architecture, and implement the differences into subclass implementation parts in the architecture. The high-level abstract parts and the subclass implementation parts constitute the functional architecture class diagram.

[0020] In a possible implementation, after determining the cross-module association of each geometric modeling related function in each large-grain module and determining the functional architecture class diagram of each geometric modeling related function based on the state diagram and the cross-module association, the method further includes:

[0021] Design a data structure class diagram based on the functional architecture structure class diagram;

[0022] The data structure class diagram designed based on the functional architecture structure class diagram is specifically:

[0023] List the specific data elements involved in the interaction process, design the high-level abstract data structure between the data elements based on the functional architecture class diagram, and design the underlying data entity class in the data structure according to the geometric modeling related functions. The high-level abstract data structure and the underlying data entity class constitute the data structure class diagram.

[0024] In a possible implementation, determining the mouse subclass that provides interactive operation functions for the geometric modeling related functions based on the interaction graph includes:

[0025] A preset interactive operation method is called, and a preset interface of a mouse abstract class is implemented based on the interactive operation method, and the mouse subclass is developed based on the preset interface.

[0026] In one possible implementation, the mouse subclass includes a sketch drawing mouse subclass for a sketch module, and the sketch drawing mouse subclass implements coordinate acquisition, node drawing, operation confirmation, and sketch drag preview by calling the coordinate mapping, geometric object display, and node parameter update basic methods provided by the operation base class.

[0027] On the other hand, the present invention also provides a simulation software construction method, comprising:

[0028] Construct interactive geometric modeling related modules based on the design method of interactive geometric modeling related modules;

[0029] Among them, the design method of the interactive geometric modeling related module is the design method of the interactive geometric modeling related module in any one of the possible implementation methods mentioned above.

[0030] On the other hand, the present invention also provides a design device for interactive geometric modeling related modules, comprising:

[0031] A geometric modeling related function planning unit is used to plan geometric modeling related operation functions and determine multiple large-grain modules;

[0032] A state diagram and interaction diagram determination unit, used to analyze the interaction logic of each geometric modeling related function in each large particle module one by one, and determine the state diagram and interaction diagram corresponding to each large particle module;

[0033] A functional architecture class diagram determining unit, used to determine the cross-module association of each geometric modeling related function in each of the large-grained modules, and determine the functional architecture class diagram of each of the geometric modeling related functions based on the state diagram and the cross-module association;

[0034] A mouse interaction function determination unit, used for determining a mouse subclass that provides an interactive operation function for the geometric modeling related function based on the interaction graph;

[0035] An interactive geometric modeling related module creation unit is used to create an interactive geometric modeling related module based on the mouse interaction function of the mouse subclass and the functional architecture class diagram.

[0036] On the other hand, the present invention also provides a simulation software construction device, comprising:

[0037] An interactive geometric modeling related module construction unit, used for constructing an interactive geometric modeling related module based on a design method of the interactive geometric modeling related module;

[0038] Among them, the design method of the interactive geometric modeling related module is the design method of the interactive geometric modeling related module in any one of the possible implementation methods mentioned above.

[0039] The beneficial effects of the present invention are as follows: the interactive geometric modeling related module design method provided by the present invention not only considers the interactive logic of various geometric modeling related functions in a single large-grain module, but also considers the cross-module association of various geometric modeling related functions in the process of designing the functional architecture class diagram of the interactive geometric modeling related module, which can effectively improve the cohesion of geometric modeling related functions in a single large-grain module, reduce the coupling between multiple large-grain modules, and improve the scalability and maintainability of the software at the software development level. In addition, based on the functional architecture design, the interactive logic and interactive operation carrier in the geometric modeling process are further comprehensively considered, and the integrated development of user interface design and mouse operation is realized, and intuitive mouse interactive operation is provided in the operation mode, thereby improving the geometric modeling efficiency of the software and the user experience at the software use level. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 A schematic flow chart of an embodiment of the interactive geometric modeling related module design method provided by the present invention;

[0042] Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of a flow chart of determining a state diagram and an interaction diagram of each interaction logic in S102;

[0043] Figure 3 For the present invention Figure 1 A schematic diagram of an embodiment of a flow chart of determining a state diagram and an interaction diagram of each interaction logic in S102;

[0044] Figure 4 For the present invention Figure 1 A schematic diagram of an embodiment of a flow chart of determining a functional architecture class diagram in S103;

[0045] Figure 5 A schematic diagram of an embodiment of a state diagram of a sweep creation function in a component module provided by the present invention;

[0046] Figure 6 A schematic diagram of an embodiment of an interaction diagram of a sweep creation function in a component module provided by the present invention;

[0047] Figure 7 A schematic diagram of an embodiment of a state diagram of a rectangle drawing function in a sketch module provided by the present invention;

[0048] Figure 8 A schematic diagram of an embodiment of an interactive diagram of a rectangle drawing function in a sketch module provided by the present invention;

[0049] Fig. 9 A schematic diagram of an embodiment of a component creation functional architecture class diagram in a component module provided by the present invention;

[0050] Fig.10 A schematic diagram of an embodiment of a shape drawing function architecture class diagram in the sketch module provided by the present invention;

[0051] Fig.11 A schematic structural diagram of an embodiment of the interactive geometric modeling related module design device provided by the present invention. DETAILED DESCRIPTION

[0052] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0053] It should be understood that the schematic drawings are not drawn to scale. The flowchart used in the present invention shows the operations implemented according to some embodiments of the present invention. It should be understood that the operations of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present invention, and can also remove one or more operations from the flowchart. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor systems and / or microcontroller systems.

[0054] Reference to an "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0055] The present invention provides a method for designing modules related to interactive geometric modeling, a method for constructing software and a device, which are respectively described below.

[0056] Figure 1 A schematic diagram of an embodiment of the interactive geometric modeling related module design method provided by the present invention is shown in FIG. Figure 1 As shown, the interactive geometric modeling related module design method includes:

[0057] S101, planning the operation functions related to geometric modeling and determining multiple large particle modules;

[0058] S102, analyzing the interaction logic of each geometric modeling related function in each particle module one by one, and determining the state diagram and interaction diagram corresponding to each particle module;

[0059] S103, determining the cross-module association of various geometric modeling related functions in each large granular module, and determining the functional architecture class diagram of each geometric modeling related function based on the state diagram and the cross-module association;

[0060] S104, determining a mouse subclass that provides interactive operation functions for geometric modeling related functions based on the interaction graph;

[0061] S105. Create interactive geometric modeling related modules based on the mouse interaction function and functional architecture class diagram of the mouse subclass.

[0062] The large-grain module in step S101 is a grouping of geometric modeling related functions, and each group includes at least one geometric modeling related function.

[0063] The geometric modeling-related operation functions in step S101 include, but are not limited to, basic plane geometric shape drawing, basic plane geometric shape parameter setting, geometric component creation, geometric component Boolean operation and other geometric modeling-related interactive operation functions.

[0064] Among them, the functional modules in step S101 include but are not limited to sketch modules and component modules, which are differential functional modules responsible for different feature data acquisition or basic operations in the geometric modeling process. By listing all geometric modeling related functions, the commonalities between different functions are explored, and the corresponding functions are incorporated into the corresponding modules for architecture design and development. For example, functions such as drawing basic plane geometric shapes and setting basic plane geometric shape parameters are incorporated into the sketch module development; functions such as geometric component creation and geometric component Boolean operations are incorporated into the component module development.

[0065] It should be noted that developers can expand or maintain the functions of the built modules according to their needs, or even build new geometric modeling-related modules based on the special needs of new geometric modeling functions, such as the micro-geometric modeling module for complex inclusions in composite materials.

[0066] Among them, step S102 specifically includes: using the unified modeling language (UML) to perform a detailed analysis on each geometric modeling related function in each granular module to obtain the analysis results; based on the analysis results, the transition of different states that need to be experienced in the interactive operation process of a geometric modeling related function and the changes of corresponding interactive behaviors in the state transition process are sorted and described, and the state diagram and interaction diagram are generated accordingly;

[0067] Among them, the interaction diagram is used to describe the active objects that respond to user operations and other objects that participate in the subsequent interaction process during the interactive operation process of a geometric modeling-related function, and to describe the message passing and interaction methods between objects.

[0068] Among them, the step S102 of analyzing the interaction logic of each geometric modeling related function in each large particle module one by one means that all modeling functions are analyzed only within a certain geometric modeling related function category, and a state diagram and an interaction diagram are drawn according to the interaction logic. For example, only the sweep creation function in the component module is analyzed, and a state diagram and an interaction diagram are drawn according to the interaction logic of the function, such as Figure 2 As another example, only the rectangle drawing function in the sketch module is analyzed, and the state diagram and interaction diagram are drawn according to the interaction logic of the function, as shown in Figure 3 shown.

[0069] It should be noted that the state diagram refers to a UML graphical language software modeling and analysis tool, which is used to describe the various states of the interactive subject under different conditions and the transition between states in the process of completing a geometric interaction modeling function. This diagram is based on the finite state machine design pattern and can guide the software architecture design of related interactive objects.

[0070] It should be noted that the interaction diagram refers to a UML graphical language software modeling and analysis tool, which is used to describe the dynamic interaction between objects in the process of completing a geometric interaction modeling function. This diagram describes all objects involved in realizing a specific function, as well as the information transmission method and sequence between these objects, which can guide the software architecture design of related interactive objects.

[0071] Among them, step S103 is specifically: merge and analyze the state diagrams and interaction diagrams of various geometric modeling related functions, and determine the common parts and differences in the interaction logic, abstract the common parts into high-level abstract parts in the architecture, and implement the differences into subclass implementation parts in the architecture. The high-level abstract parts and subclass implementation parts constitute the functional architecture class diagram.

[0072] Furthermore, step S103 represents the need to find related modeling functions within the scope of multiple functional modules related to interactive geometric modeling, and jointly analyze the state diagrams and interaction diagrams of these functions, sort out the common parts and differences in the interaction logic of these functions, abstract the common parts into high-level abstract parts in the architecture, and implement the differences into subclass implementation parts in the architecture to form an architectural class diagram of the function. Subsequently, list the specific data elements involved in the interaction process, design the high-level abstract data structure between the data elements with reference to the functional architecture, and design the underlying data entity class in the data structure according to the specific geometric modeling interactive functions to form a data structure class diagram of the function. For example, Figure 2 The widget creation functionality in the widget module shown and Figure 3 The rectangle drawing function in the sketch module shown in the figure is jointly analyzed to determine the functional architecture class diagram and the data structure class diagram, such as Figure 4 shown.

[0073] In a specific embodiment of the present invention, step S105 specifically includes: calling a preset interactive operation method, and implementing a preset interface of the mouse abstract class based on the interactive operation method, and developing a mouse subclass based on the preset interface.

[0074] Among them, the mouse subclass includes a sketch drawing mouse subclass for the sketch module. The sketch drawing mouse subclass realizes coordinate acquisition, node drawing, operation confirmation, and sketch drag preview by calling the coordinate mapping, geometric object display, and node parameter update basic methods provided by the operation base class.

[0075] Compared with the prior art, the interactive geometry modeling related module design method provided by the embodiment of the present invention first plans the geometry modeling related operation functions, determines a plurality of large-granular modules, then analyzes the interaction logic of each geometry modeling related function in each large-granular module one by one, determines the state diagram and interaction diagram corresponding to each large-granular module, then determines the cross-module association of each geometry modeling related function in each large-granular module, and determines the functional architecture class diagram of each geometry modeling related function based on the state diagram and the cross-module association, then determines the mouse subclass that provides the interactive operation function for the geometry modeling related function based on the interaction diagram, and finally creates the interactive geometry modeling related module based on the mouse interaction function and the functional architecture class diagram of the mouse subclass. In the process of designing the functional architecture class diagram of the interactive geometry modeling related module, both the interaction logic of each geometry modeling related function in a single large-granular module and the cross-module association of each geometry modeling related function are considered, which can effectively improve the cohesion of the geometry modeling related function in a single large-granular module, reduce the coupling degree between multiple large-granular modules, and improve the scalability and maintainability of the software at the software development level. In addition, based on the functional architecture design, the interactive logic and interactive operation carriers in the geometric modeling process are further considered, and the integrated development of user interface design and mouse operation is realized, providing intuitive mouse interactive operations in terms of operation methods, thereby improving the software's geometric modeling efficiency and user experience at the software usage level.

[0076] In some embodiments of the present invention, the drawing process of the state diagram and the interaction diagram is described by taking the sweep creation function as an example. Figure 2 As shown, according to step S102, the interactive logic analysis of the sweep creation function in the component module includes:

[0077] S201, combing the changes that need to be generated in the interactive elements such as the interactive interface and the mouse behavior during the sweep creation process based on the finite state machine mode, and obtaining state combing content;

[0078] S202, sorting out the interactive operations that the user needs to go through during the sweep creation process, the objects that may be involved, and the related interactive messages, and obtaining the interaction sorting content;

[0079] S203, drawing a state diagram based on the state combing content, describing each state in the sweep creation process and the triggering events of each state transition;

[0080] S204: Create an interaction diagram based on the interaction combing content to describe the dynamic interaction between the user and the system objects during the sweep creation process.

[0081] Among them, in step S201, based on the finite state machine mode, the complex interactive operation process is decomposed into different operation stages, each stage may have different interface prompt information, interface display effects or different mouse interaction behaviors. In the current step, the steps required for sweep creation are sorted out, and the characteristics of the interactive elements in each step are listed.

[0082] It should be noted that the finite state machine pattern is a behavioral design pattern that allows an object to change its behavior when its internal state changes. It is used to solve the problem that the behavior of an object depends on its state and it must change its behavior according to the state at runtime. In the present invention, the complex interactive operation process is broken down into different operation stages, and each stage corresponds to a specific state object. The specific state objects of related interactive operations inherit from the same abstract state object, and interactive operations with large differences have different abstract state objects.

[0083] In step S202, each step of the sweep creation process is sorted out, and it is considered how the user initiates the relevant operation request instruction, how the instruction will be passed to the system object, which objects are involved in the interaction process, and how the interaction is performed in what order.

[0084] In step S203, the content is sorted out based on the step status, and a state diagram of the sweep creation is drawn as shown in FIG. Figure 5 shown.

[0085] Figure 5 It shows the states and transitions between the states corresponding to several key steps that need to be executed when the user chooses the sweeping method to construct a geometric component.

[0086] After the state machine starts executing, it first enters the "Sweep Path Sketch Drawing State". At this time, the sketch drawing function is required to obtain the sweep path required to create the geometric component. When entering this state, the system will update the prompt information in the status bar and display the relevant operation buttons in this state. In this state, if you click the sketch drawing function button (such as drawing a circle or rectangle), you will enter the "Sketch Drawing State". After the sketch drawing is completed, it will return to the "Sweep Path Sketch Drawing State" until the "Finish" button in the status bar is clicked to enter the next step. Note that if you click the "Cancel" button in the status bar in this state, you will first enter the judgment of whether a sketch has been drawn: if no sketch has been drawn at this time, the state machine will directly switch to the "End State", thereby ending the sweep creation process; if a sketch has been drawn at this time, the state machine will enter the "Waiting for User Confirmation Termination State", pop up an information prompt box, and confirm whether to stop the component creation process with the user, and determine whether to enter the "End State" to end the creation process based on the selection result. In addition, if you click the "Finish" button without drawing any sketches, the test will fail and the system will pop up an information prompt box, prompting the user "The current sketch is empty, please draw a sketch first."

[0087] After entering the second state "Sweep Section Size Setting State", you need to enter the approximate section size of the geometric component in the text input box in the status bar to facilitate the sketch grid size setting in the subsequent steps. When entering this state, the system will update the status bar, and at the same time, it will calculate the sweep direction based on the tangent direction of the geometric shape of the sketch, and draw it on the sketch in the form of a red arrow. In this state, you can choose to click "Finish", "Return" or "Cancel" in the status bar. If you click "Finish", it will switch to the next state if the input value format is correct; if you click "Return", it will return to the previous state; if you click "Cancel", it will switch to the "Waiting for User Confirmation Termination State" and wait for the user to confirm whether to terminate the component creation process.

[0088] After entering the third state "Sweep Section Sketch Drawing State", you need to use the sketch drawing function to obtain the geometric cross section required to create the geometric component. When entering this state, the system will update the status bar. This state is similar to the first state. You can click the sketch drawing function button to enter the "Sketch Drawing State". The difference between the two lies in two aspects: (1) When clicking the "Cancel" button in the status bar, this state will directly enter the "Waiting for User Confirmation Termination State"; (2) This state will use the drawn sketch as a geometric cross section input instead of a sweep path. If you click the "Return" button in this state, you will return to the previous state; if you finish drawing the cross section sketch, click the "Finish" button to switch to the next state.

[0089] Entering the fourth state "Component Generation State", no operation is required. This state will automatically perform a sweep sketch check upon entering to determine whether there are any problems with the sweep path and cross section. If the check passes, it will automatically enter the "End State", generate the geometric component and end the entire execution process; if the check fails, a prompt box will pop up and return to the previous state.

[0090] In step S204, based on the interaction combing content, an interaction diagram created by scanning is drawn. Figure 6 shown.

[0091] Figure 6 The main flow of interactive operations that users need to perform to create a geometric component by sweeping is shown. In order to illustrate the main objects involved in the operation, some replaceable sequences representing incorrect operation interactions are omitted. The user first interacts with the component creation dialog object QmyGeneratePartDialog, selects the "Generate solid by sweeping" operation, and clicks the "Continue" button. Then QmyGeneratePartDialog generates a geometric feature object GeometryFeature based on the selection result, and communicates with the component creation control class factory object PartGenerationControlFactor to generate a sweep control object SweepControl. Calling the "Start" method of SweepControl, on the one hand, executes the module conversion from the component module to the sketch module, and on the other hand, starts to enter the initial state of the finite state machine of SweepControl, and then starts the construction process of the geometric component controlled by the finite state machine.

[0092] In some embodiments of the present invention, a rectangle drawing function is taken as an example to illustrate the drawing process of the state diagram and the interaction diagram. Figure 3 As shown, according to step S102, interactive logic analysis is performed on the rectangle drawing function in the sketch module, including:

[0093] S301, combing the changes that need to be generated in the interactive elements such as the interactive interface and the mouse behavior during the rectangle drawing process based on the finite state machine mode to obtain the first combing content;

[0094] S302, sorting out the interactive operations that the user needs to go through during the rectangle drawing process, the objects that may be involved, and the related interactive messages, to obtain second sorting content;

[0095] S303: Draw a state diagram based on the first combing content, describing each state in the rectangle drawing process and a triggering event of each state transition;

[0096] S304: Create an interaction diagram based on the second combing content to describe the dynamic interaction between the user and the system object during the rectangle drawing process.

[0097] In step S301, based on the finite state machine mode, the complex interactive operation process is decomposed into different operation stages, each stage may have different interface prompt information, interface display effects or different mouse interaction behaviors. In the current step, the steps required for rectangle drawing are sorted out, and the characteristics of the interactive elements in each step are listed.

[0098] In step S302, each step in the rectangle drawing process is sorted out, and it is considered how the user initiates the relevant operation request instruction, how the instruction will be passed to the system object, which objects are involved in the interaction process, and how the interaction is performed in what order.

[0099] In step S303, based on the first combing content, a state diagram of drawing a rectangle is drawn as shown in FIG. Figure 7 shown.

[0100] Figure 7 It shows the states and transitions between the key steps that need to be executed when the user selects the rectangle drawing function. To draw a rectangle, you need to go through the "first diagonal vertex drawing state", "second diagonal vertex drawing state" and "overlap detection state" respectively. In the first and second states, the status bar will be updated and the mouse operation will be switched; after entering the third state, the overlap judgment of the two vertex coordinates will be automatically performed directly. The states are triggered by the Qt signal mechanism. For example, after the first state is completed, a "complete" signal will be sent to trigger the state transition; and if the "return" button is clicked in the second state, a "return" signal will be sent to convert back to the first state. Clicking the "cancel" button in any state will end the sketch drawing process. Only when the final overlap detection is passed will the sketch drawing be confirmed to be successful and the sketch drawing process will end at the same time.

[0101] In step S304, based on the second combing content, a rectangular interactive diagram is drawn as shown in FIG. Figure 8 shown.

[0102] Figure 8This shows the main interactive process that the user needs to go through when drawing the first diagonal vertex of a rectangle sketch. The interactive process for drawing the second diagonal vertex is similar. First, the user can move the mouse in the main window view to observe the preview effect of the diagonal vertex position, and update the current mouse arrow coordinates in real time in the input text box of the status bar. To achieve the preview effect, it is necessary to first pass the real-time coordinates to the first point state object DrawFirstPointState through the drawing mouse object DrawingMouse; then call the method of the temporarily created rectangle sketch element object RectangleSketch, set the diagonal vertex coordinates, and display the vertex on the canvas of the main window view by calling the method of the Open CASCADE service object OCCService. This process occurs in real time under the event processing mechanism of Qt, so the preview effect and the coordinate values ​​in the status bar are updated in real time. If the user clicks the left mouse button after determining the vertex position, the "Confirm" method in the first point state object DrawFirstPointState object will be called by the drawing mouse object DrawingMouse, thereby sending a signal that the state is completed to enter the next state. In addition to mouse operations, you can also directly enter the correct form of coordinate values ​​in the input text box on the status bar and click OK to achieve the same diagonal vertex drawing process.

[0103] In some embodiments of the present invention, the drawing process of the class diagram is described by taking the component module and the sketch module as examples. Figure 4 As shown, step S103 includes:

[0104] S401, analyzing functions such as sweep creation, stretch creation, and rotation creation in the component module, and summarizing the first commonality and the first difference of the execution process;

[0105] S402, analyzing the functions of rectangle drawing, circle drawing, line segment drawing, etc. in the sketch module, and summarizing the second commonality part and the second difference part of the execution process;

[0106] S403, abstracting the first common part into a high-level abstract part in the architecture, and implementing the first difference part into a subclass implementation part in the architecture, so as to form a component creation function architecture class diagram;

[0107] S404, abstracting the second commonality part into a high-level abstraction part in the architecture, and implementing the second difference part into a subclass implementation part in the architecture, forming a plane shape and drawing a functional architecture class diagram;

[0108] S405 , comprehensively analyzing the cross-module association of the architecture class diagram of the component creation function and the plane shape drawing function, and generating a functional architecture class diagram.

[0109] Wherein, step S405 can obtain the architecture class diagram of the component creation function in the component module (such as Fig. 9 ) and the architectural class diagram of the plane shape drawing function in the sketch module (as shown in Fig.10 as shown).

[0110] Fig. 9 The functional architecture class diagram of component creation in the component module is shown, of which the core is the geometry feature class GeometryFeature. On the one hand, it forms an aggregation relationship in the data structure with the component dimension feature abstract class PartTopo and the component creation method abstract class PartGeneration, realizing the decoupling between dimension types such as solid and shell and generation types such as sweep and stretch. On the other hand, it forms an association with the finite state machine composed of the component creation control class PartGenerationControl and the component creation basic state class PartGenerationBaseState, realizing the decoupling of the abstract process of component creation from specific details.

[0111] As an abstract class, PartTopo provides the generation and inspection interface of the part cross section; while the subclasses ShellShape and SolidShape provide their own specific implementations. If the cross-section sketch drawn during the modeling process passes the inspection of these subclasses, it will be used to build the part. If you need to develop other new dimension types of parts, such as Wire or Point, you only need to expand the interface of the parent class PartTopo and implement the specific details.

[0112] As an abstract class responsible for generating parts, PartGeneration provides a part generation interface and has properties such as part parameters and sketches. Its subclasses implement part generation methods to complete different ways of part creation. For example, although the input parameters required for sweep creation and stretch creation are different, both complete part creation in the part generation method.

[0113] The above-mentioned PartTopo and PartGeneration are both data classes related to part generation, and are both related to the sketch class Sketch in sketch drawing. Sketch is directly related to the sketch drawing process through the aggregation relationship between it and the sketch basic element class SketchComponent. Therefore, the two major processes of part creation and sketch drawing are connected by the relationship between these classes.

[0114] Next, let's look at the finite state machine aspect. Figure 5The steps and corresponding states that the sweep creation operation needs to go through have been roughly described in the . PartGenerationControl provides common properties, methods, and state machine initialization interfaces, which are specifically implemented in its subclasses of different creation types (such as sweep creation, stretch creation, and other related subclasses). For example, in the sweep control class SweepControl, the path creation state class PathGenerationState, the section size setting state class SectionScaleSettingState, the section creation state class SectionGenerationState, the part creation state class PartGenerationState, and the end state can be connected in sequence using conversion information in the state machine initialization interface method, and PathGenerationState and SectionGenerationState are respectively connected to the sketch drawing state class DrawingState to achieve the following: Figure 5 The finite state machine design in. Except for the end state, all the above state classes inherit from the component creation base state class PartGenerationBaseState, and implement interfaces, entry methods, and exit methods according to their respective requirements.

[0115] The above design can promote expansion in two aspects: (1) Expansion of different creation methods. When developing a new creation method, you only need to select different component generation state classes according to the creation steps for corresponding assembly to complete the expansion. (2) Expansion of specific creation steps. When developing a new creation method, you may need to develop state classes related to the new steps. You only need to inherit the component creation base state class and implement the corresponding interface and method to complete the expansion.

[0116] Fig.10 The class diagram of the plane shape drawing function in the sketch module is shown. It roughly includes three parts: (1) data structures represented by the sketch class Sketch and the sketch base element class SketchComponent; (2) finite state machines represented by the sketch control class SketchControl and the sketch base state class SketchBaseState; (3) interactive operation related represented by the state information class StatusBarInfo and the sketch base mouse class SketchBaseMouse.

[0117] The data structure represented by the sketch class Sketch and the sketch basic element class SketchComponent is not only the basic support for sketch drawing, but also the bridge connecting the component module and the sketch module. Sketch and SketchComponent are in an aggregation relationship. In a Sketch object, there may be several SketchComponent objects. As an abstract class, SketchComponent provides common properties of basic geometry on the one hand, and provides relevant interface methods for creating geometric shapes on the other hand. Its subclasses each implement interface methods with different basic geometric shape features, which are used for sketch drawing related operations.

[0118] In terms of finite state machines, sketch drawing is similar to component creation. Both use the control class Control to manage the abstract creation steps, and use the state class State to implement the specific operation details in the creation process. In the figure, taking the drawing of a rectangle as an example, the rectangle drawing control class DrawRectangleControl forms a combination relationship with the rectangle sketch element class RectangleSketch on the one hand, and forms a combination relationship with the drawing first point state class DrawFirstPointState, the drawing second point state class DrawSecondPointState and the overlap detection state class CheckPointOverlapState on the other hand, thereby realizing the association between the data structure and the operation process.

[0119] The interactive operation is reflected in DrawFirstPointState and DrawSecondPointState, so they rely on the sketch drawing base mouse class SketchBaseMouse. The movement and click operations of the mouse correspond to different drawing functions. If different mouse behaviors are required to create related state classes, just develop a new mouse subclass (such as the sketch drawing mouse class DrawingMouse) that meets the interface requirements according to step S104.

[0120] The above design can promote decoupling in three aspects, thereby effectively improving the scalability and maintainability of the software: (1) decoupling of the component creation process and data structure; (2) decoupling of the abstract process of sketching and specific steps; (3) decoupling of specific operation status and mouse interaction operation behavior.

[0121] Since the realization of various geometric modeling related functions requires data support, in order to improve the rationality of the data structure in the interactive geometric modeling related module design method, in some embodiments of the present invention, after step S103, it also includes:

[0122] Design data structure class diagram based on functional architecture structure class diagram;

[0123] The data structure class diagram designed based on the functional architecture structure class diagram is as follows:

[0124] List the specific data elements involved in the interaction process, design the high-level abstract data structure between the data elements based on the functional architecture class diagram, and design the underlying data entity class in the data structure according to the geometric modeling related functions. The high-level abstract data structure and the underlying data entity class constitute the data structure class diagram.

[0125] The embodiment of the present invention designs a high-level abstract data structure between data elements based on a functional architecture class diagram, designs the underlying data entity class in the data structure according to geometric modeling related functions, achieves a high degree of matching between the data structure class and the functional architecture class diagram, and improves the rationality of the data structure.

[0126] On the other hand, an embodiment of the present invention further provides a simulation software construction method, comprising:

[0127] Construct interactive geometric modeling related modules based on the design method of interactive geometric modeling related modules;

[0128] Among them, the design method of the interactive geometric modeling related module is the design method of the interactive geometric modeling related module in any one of the above embodiments.

[0129] It should be understood that the modules related to interactive geometric modeling are only special functional modules related to the geometric modeling process in the finite element modeling and simulation software, which may also include boundary condition setting modules, etc. The design process of functional modules such as boundary condition setting modules may be the same as or different from the design process of modules related to interactive geometric modeling, and no specific limitation is made here.

[0130] In order to better implement the design method of the interactive geometric modeling related module in the embodiment of the present invention, based on the design method of the interactive geometric modeling related module, the embodiment of the present invention also provides a design device for the interactive geometric modeling related module, such as Fig.11 As shown, the design device 1100 of the interactive geometric modeling related modules includes:

[0131] A geometric modeling related function planning unit 1101 is used to plan geometric modeling related operation functions and determine a plurality of large-grain modules;

[0132] The state diagram and interaction diagram determining unit 1102 is used to analyze the interaction logic of each geometric modeling related function in each granular module one by one, and determine the state diagram and interaction diagram corresponding to each granular module;

[0133] The functional architecture class diagram determining unit 1103 is used to determine the cross-module association of each geometric modeling related function in each large granular module, and determine the functional architecture class diagram of each geometric modeling related function based on the state diagram and the cross-module association;

[0134] A mouse interaction function determination unit 1104, configured to determine a mouse subclass providing an interactive operation function for geometric modeling related functions based on the interaction graph;

[0135] The interactive geometric modeling related module creation unit 1105 is used to create the interactive geometric modeling related modules based on the mouse interaction function and the functional architecture class diagram of the mouse subclass.

[0136] The design device 1100 for interactive geometric modeling related modules provided in the above embodiment can implement the technical solution described in the design method embodiment of the above interactive geometric modeling related modules. The specific implementation principles of the above modules or units can refer to the corresponding contents in the design method embodiment of the above interactive geometric modeling related modules, which will not be repeated here.

[0137] It should be noted that, since the realization of various geometric modeling related functions requires data support, in order to improve the rationality of the data structure in the interactive geometric modeling related module design method, in some embodiments of the present invention, Fig.11 As shown, the design device 1100 of the interactive geometric modeling related modules also includes:

[0138] The data structure class diagram determination unit 1106 is used to design the data structure class diagram based on the functional architecture structure class diagram; designing the data structure class diagram based on the functional architecture structure class diagram specifically includes: listing the specific data elements involved in the interaction process, designing the high-level abstract data structure between the data elements based on the functional architecture class diagram, designing the underlying data entity class in the data structure according to the geometric modeling related functions, and the high-level abstract data structure and the underlying data entity class constitute the data structure class diagram.

[0139] The embodiment of the present invention designs a high-level abstract data structure between data elements based on a functional architecture class diagram, designs the underlying data entity class in the data structure according to geometric modeling related functions, achieves a high degree of matching between the data structure class and the functional architecture class diagram, and improves the rationality of the data structure.

[0140] In order to better implement the simulation software construction method in the embodiment of the present invention, based on the simulation software construction method, the embodiment of the present invention also provides a simulation software construction device, and the simulation software construction device includes:

[0141] An interactive geometric modeling related module construction unit, used to create the interactive geometric modeling related module based on the functional architecture class diagram and the mouse interaction function;

[0142] Among them, the design method of the interactive geometric modeling related module is the design method of the interactive geometric modeling related module in any one of the above embodiments.

[0143] Accordingly, an embodiment of the present invention also provides a computer-readable storage medium, which is used to store computer-readable programs or instructions. When the program or instructions are executed by a processor, it can implement the interactive geometric modeling related module design method provided in the above-mentioned method embodiments, and / or the steps or functions in the simulation software construction method.

[0144] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware (such as a processor, a controller, etc.) through a computer program, and the computer program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0145] The above is a detailed introduction to an interactive geometric modeling related module design method, software construction method and device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. An interactive geometric modeling related module design method, characterized in that: include: Plan the operation functions related to geometric modeling and determine multiple large particle modules; Analyze the interaction logic of each geometric modeling related function in each large particle module one by one, and determine the state diagram and interaction diagram corresponding to each large particle module; Determine the cross-module association of each geometric modeling related function in each of the large-grain modules, and determine the functional architecture class diagram of each of the geometric modeling related functions based on the state diagram and the cross-module association; Determining a mouse subclass that provides interactive operation functions for the geometric modeling related functions based on the interaction graph; Creating interactive geometric modeling related modules based on the mouse interaction function of the mouse subclass and the functional architecture class diagram; The geometric modeling related functions include drawing basic plane geometric shapes, setting basic plane geometric shape parameters, creating geometric components, and Boolean operations on geometric components; The large particle modules include but are not limited to a sketch module and a component module.

2. The interactive geometric modeling related module design method according to claim 1, characterized in that: The interaction logic of each geometric modeling related function in each large particle module is analyzed one by one to determine the state diagram and interaction diagram corresponding to each large particle module, including: Using a unified modeling language to analyze in detail various geometric modeling related functions in each of the large particle modules to obtain analysis results; Based on the analysis results, the transitions of different states that need to be experienced in the interactive operation process of a geometric modeling-related function and the changes of corresponding interactive behaviors during the state transition process are sorted and described, and the state diagram and the interaction diagram are generated accordingly; The interaction diagram is used to describe the active objects that respond to user operations and other objects that participate in subsequent interaction processes during an interactive operation process of a geometric modeling-related function, and to describe the message transmission and interaction methods between objects.

3. The interactive geometric modeling related module design method according to claim 1, characterized in that: The functional architecture class diagram for determining each of the geometric modeling related functions based on the state diagram and the cross-module association includes: Combine and analyze the state diagrams and interaction diagrams of each of the geometric modeling related functions, and determine the common parts and differences in the interaction logic. Abstract the common parts into high-level abstract parts in the architecture, and implement the differences into subclass implementation parts in the architecture. The high-level abstract parts and the subclass implementation parts constitute the functional architecture class diagram.

4. The interactive geometric modeling related module design method according to claim 1, characterized in that: After determining the cross-module association of each geometric modeling related function in each large-grain module and determining the functional architecture class diagram of each geometric modeling related function based on the state diagram and the cross-module association, the method further includes: Design a data structure class diagram based on the functional architecture structure class diagram; The data structure class diagram designed based on the functional architecture structure class diagram is specifically: List the specific data elements involved in the interaction process, design the high-level abstract data structure between the data elements based on the functional architecture class diagram, and design the underlying data entity class in the data structure according to the geometric modeling related functions. The high-level abstract data structure and the underlying data entity class constitute the data structure class diagram.

5. The interactive geometric modeling related module design method according to claim 1, characterized in that: The mouse subclass that provides interactive operation functions for the geometric modeling related functions is determined based on the interaction graph, including: A preset interactive operation method is called, and a preset interface of a mouse abstract class is implemented based on the interactive operation method, and the mouse subclass is developed based on the preset interface.

6. The interactive geometric modeling related module design method according to claim 5, characterized in that: The mouse subclass includes a sketch drawing mouse subclass for the sketch module, and the sketch drawing mouse subclass implements coordinate acquisition, node drawing, operation confirmation, and sketch drag preview by calling the coordinate mapping, geometric object display, and node parameter update basic methods provided by the operation base class.

7. A method for constructing simulation software, characterized in that: include: Construct interactive geometric modeling related modules based on the design method of interactive geometric modeling related modules; Wherein, the design method of the interactive geometric modeling related module is the design method of the interactive geometric modeling related module described in any one of claims 1-6.

8. A design device for interactive geometric modeling related modules, characterized in that: include: A geometric modeling related function planning unit is used to plan geometric modeling related operation functions and determine multiple large-grain modules; A state diagram and interaction diagram determination unit, used to analyze the interaction logic of each geometric modeling related function in each large particle module one by one, and determine the state diagram and interaction diagram corresponding to each large particle module; A functional architecture class diagram determining unit, used to determine the cross-module association of each geometric modeling related function in each of the large-grained modules, and determine the functional architecture class diagram of each of the geometric modeling related functions based on the state diagram and the cross-module association; A mouse interaction function determination unit, used for determining a mouse subclass that provides an interactive operation function for the geometric modeling related function based on the interaction graph; An interactive geometric modeling related module creation unit, used to create an interactive geometric modeling related module based on the mouse interaction function of the mouse subclass and the functional architecture class diagram; The geometric modeling related functions include drawing basic plane geometric shapes, setting basic plane geometric shape parameters, creating geometric components, and Boolean operations on geometric components; The large particle modules include but are not limited to a sketch module and a component module.

9. A simulation software construction device, characterized in that: include: An interactive geometric modeling related module construction unit, used for constructing an interactive geometric modeling related module based on a design method of the interactive geometric modeling related module; Wherein, the design method of the interactive geometric modeling related module is the design method of the interactive geometric modeling related module described in any one of claims 1-6.

Citation Information

Patent Citations

  • Endogenous safety application software form modeling method based on formalization method

    CN112015373A

  • Construction method, device and system for system engineering system and system architecture model

    CN116205041A