Geometric kernel dependency-free architecture design method and device for geometric modeling related module
By designing geometric modeling related module architectures without geometric kernel dependence, the problem of high dependence of finite element simulation software on specific geometric kernels is solved, the software is flexible expansion and maintenance is realized, and performance and reliability are improved.
Patent Information
- Application Number
- CN202510103343.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-04-25
AI Technical Summary
Due to the high dependence of existing finite element simulation software on specific geometric cores, it is difficult for function updates and performance optimization to keep up with industry trends, thus limiting the evolution and development of software.
Design a geometric kernel-free dependency architecture for geometric modeling related modules. By building geometric kernel-related tools with abstract method interfaces, the development team allows flexibly selecting the geometric kernel that is most suitable for the project, avoiding direct association and achieving decoupling.
It significantly improves the scalability and maintenance of the finite element analysis software, reduces compatibility issues caused by the upgrade of geometric kernel versions, reduces maintenance workload, and controls long-term operation costs.
Smart Images

Figure CN119885666A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of finite element simulation technology, and in particular to a method and device for designing a geometric kernel-free architecture of geometric modeling related modules. Background Art
[0002] In terms of independent control of core technologies, among many industrial software, finite element simulation CAE (Computer-Aided Engineering) software is particularly prominent due to its critical importance to the manufacturing and engineering design fields. This type of software has the characteristics of high precision, multi-function, and strong interaction. It can not only simulate complex physical phenomena, but also predict the behavior of various engineering problems such as structure, heat conduction, and fluid dynamics, thereby providing engineers with decision support and optimizing product design and manufacturing processes. Geometric modeling is one of the core components of finite element simulation CAE software. It forms the basis for the conversion from actual objects to mathematical models and is a bridge between the real world and computer simulation. An efficient geometric modeling module can significantly improve the accuracy and reliability of simulation results, which directly affects the results of subsequent analysis and calculation. Therefore, for finite element simulation software, the importance of geometric modeling capabilities is self-evident.
[0003] However, in current software development practices, developers often rely on specific geometric kernels to meet modeling function requirements, interactive operation requirements, and data structure design requirements. Although this reliance simplifies the initial development process, over-reliance on a single geometric kernel also has functional and technical bottlenecks. For example, the functional update of a specific geometric kernel may not be able to respond to new market demands in a timely manner; at the same time, the speed of its performance improvement may not keep up with the rapidly developing industry trends, thereby restricting the evolution and development of the entire software system.
[0004] In view of the above situation, an innovative architecture design solution is urgently needed to achieve the decoupling between finite element simulation CAE software and geometric kernel. By building such an architecture, the development team can flexibly select the most suitable geometric kernel for the project according to the actual situation without being restricted by the initial selection, accelerate the function expansion and performance optimization of the software, reduce the compatibility issues caused by the geometric kernel version upgrade, reduce unnecessary maintenance workload, and help control long-term operating costs. Summary of the invention
[0005] In view of this, it is necessary to provide a method and device for designing a geometric kernel-free architecture for geometric modeling related modules, so as to solve the technical problem in the prior art that the finite element simulation software is not conducive to development and maintenance due to the high coupling between the geometric modeling related modules and the specific geometric kernel.
[0006] On the one hand, in order to solve the above technical problems, the present invention provides a method for designing a geometry kernel-free architecture for geometry modeling related modules, comprising: Constructing a geometric modeling related data structure, wherein the geometric modeling related data structure includes a multi-level geometric modeling related data class; Constructing a geometry kernel related tool with an abstract method interface; the abstract method interface can be called by the geometry modeling related data class; Interactively analyzing the geometric modeling function to be developed, determining the target abstract method interface in the geometric kernel related tool and the target geometric modeling data class in the geometric modeling related data class; the target abstract method interface and the target geometric modeling data class constitute the geometric modeling related module design architecture; A target geometry kernel to be adopted is determined, and based on the target geometry kernel, a specific implementation class in the geometry modeling related module design architecture is determined to access the target geometry kernel.
[0007] In one possible implementation, the geometric modeling related data class includes a basic geometric data class, a geometric component data entity class and a geometric modeling functional entity class, wherein the basic geometric data class is used to provide underlying data support for the geometric component data entity class; the geometric modeling functional entity class is used to generate and manage the geometric component data entity class, and the geometric component data entity class is a component of the geometric modeling functional entity class; the geometric modeling functional entity class is used to call the abstract method interface to form an association relationship with the geometric kernel, and the geometric modeling functional entity class is also used to generate, manage and maintain the geometric component data entity class.
[0008] In a possible implementation, the basic geometric data class includes a two-dimensional point class for describing a two-dimensional point object, a three-dimensional point class for describing a three-dimensional point object, a plane class for describing a plane object in space, a vector class for describing a vector object in space, and a three-dimensional coordinate axis class for describing a three-dimensional coordinate object in space; The geometric element data entity class includes a shape base abstract class describing basic shape information and its abstract interface, a shape primitive abstract class describing shape primitive information and its abstract interface, a shape abstract class describing common information and common abstract interface of the shape base abstract class and the shape primitive abstract class, and a sketch base abstract class and a sketch abstract class describing basic sketch information and its abstract interface; The geometric function modeling functional entity class includes a component generation class for component generation, a geometric feature class for describing geometric features, a component topology class for describing component topology information, a sketch class for describing sketches, and a shape collection class for describing a geometric shape collection.
[0009] In a possible implementation, the geometry kernel related tools include a geometry kernel abstract class, and the geometry kernel abstract class includes a view operation abstract method interface, a geometry component generation abstract method interface, and a geometry element operation abstract method interface.
[0010] In one possible implementation, the geometry kernel related tools also include a sketch tool interface, a collection unit factory abstract class and a geometry transformation tool interface. The sketch tool interface, the collection unit factory abstract class and the geometry transformation tool interface form an aggregation relationship with the geometry kernel abstract class in the form of an interface class.
[0011] In a possible implementation, the interactive analysis of the geometric modeling function to be developed is specifically as follows: Based on the UML tool, the geometric modeling function to be developed is interactively analyzed to determine the target abstract method interface in the geometric kernel related tools and the target geometric modeling data class in the geometric modeling related data class.
[0012] In a possible implementation, the interactive analysis of the geometric modeling function to be developed based on the UML tool to determine the target abstract method interface in the geometric kernel related tool and the target geometric modeling data class in the geometric modeling related data class includes: Determine the interaction diagram and state diagram of the geometric modeling function to be developed based on the UML tool; Determine a target geometry kernel tool in the geometry kernel related tools and a target geometry modeling data class in the geometry modeling related data class based on the interaction diagram and the state diagram; A target abstract method interface in the target geometry kernel tool is determined, wherein the target abstract method interface and the target geometry modeling data class constitute a geometry modeling related module design architecture.
[0013] On the other hand, the present invention also provides a simulation software construction method, comprising: Construct geometric modeling related modules based on the geometric kernel-free architecture design method of geometric modeling related modules; The method for designing a geometry-kernel-free architecture based on geometry-modeling related modules is the method for designing a geometry-kernel-free architecture based on geometry-modeling related modules described in any one of the possible implementations described above.
[0014] On the other hand, the present invention also provides a design device for a geometric modeling related module without a geometric kernel dependent architecture, comprising: A data structure construction unit, used to construct a geometric modeling related data structure, wherein the geometric modeling related data structure includes a multi-level geometric modeling related data class; A geometry kernel related tool construction unit, used to construct a geometry kernel related tool with an abstract method interface; the abstract method interface can be called by the geometry modeling related data class; A design architecture determination unit is used to interactively analyze the geometric modeling function to be developed, determine the target abstract method interface in the geometric kernel related tools and the target geometric modeling data class in the geometric modeling related data class; the target abstract method interface and the target geometric modeling data class constitute the geometric modeling related module design architecture; The geometric kernel access unit is used to determine the target geometric kernel to be adopted, and determine the specific implementation class in the geometric modeling related module design architecture based on the target geometric kernel to access the target geometric kernel.
[0015] On the other hand, the present invention also provides a simulation software construction device, comprising: A geometric modeling related module construction unit, used for constructing geometric modeling related modules based on a geometric kernel-free dependent architecture design method of geometric modeling related modules; The method for designing a geometry-kernel-free architecture based on geometry-modeling related modules is the method for designing a geometry-kernel-free architecture based on geometry-modeling related modules described in any one of the possible implementations described above.
[0016] The beneficial effects of the present invention are as follows: the geometric kernel-free dependency architecture design method for geometric modeling related modules provided by the present invention constructs geometric kernel-related tools with abstract method interfaces, wherein the abstract method interfaces can be called by geometric modeling related data classes, thereby avoiding direct association between geometric modeling related data classes and geometric kernels, thereby achieving decoupling of geometric modeling related data classes and geometric kernel-related tools, avoiding dependence on specific geometric kernels during the development of finite element software, allowing the development team to flexibly access the most suitable geometric kernel for the project according to actual conditions without being restricted by the initial selection, thereby significantly improving the scalability and maintainability of the finite element analysis software.
[0017] Furthermore, the present invention can more accurately identify the target abstract method interface and target geometric modeling data class that match the geometric modeling function to be developed by interactively analyzing the geometric modeling function to be developed, thereby optimizing the design and improving the overall performance and response speed of the system. In addition, the continuous iteration process also includes regularly collecting user feedback, timely adjusting and improving the design, and ensuring that the final product meets expectations and has a good user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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.
[0019] Figure 1 A schematic flow chart of an embodiment of a method for designing a geometry kernel-free architecture for geometry modeling related modules provided by the present invention; Figure 2 A schematic diagram of an embodiment of a geometric modeling related data structure provided by the present invention; Figure 3 A schematic diagram of an embodiment of a geometric kernel related tool provided by the present invention; Figure 4 For the present invention Figure 1 A schematic flow chart of an embodiment of S103; Figure 5 An interactive diagram for drawing the first point state in the rectangle drawing function in the sketch drawing module; Figure 6 An interactive diagram of the component generation state in the component stretching function in the component creation module; Figure 7 Based on Figure 5 and Figure 6 The schematic diagram of the design class diagram of the relevant abstract method interface obtained by analyzing the interaction diagram; Figure 8 A schematic diagram of the architecture design for implementing target geometric kernel access provided by the present invention; Fig. 9 A schematic structural diagram of an embodiment of a device for designing a geometric kernel-free architecture for geometric modeling related modules provided by the present invention. DETAILED DESCRIPTION
[0020] 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.
[0021] 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, under the guidance of the content of the present invention, can add one or more other operations to the flowchart, and can also remove one or more operations from the flowchart. Some of the block diagrams shown in the accompanying drawings are functional entities, which 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.
[0022] 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.
[0023] The present invention provides a method and device for designing a geometric kernel-free architecture of geometric modeling related modules, which is applied to finite element simulation software, and is described below respectively.
[0024] Before introducing the embodiments, it should be noted that the method for designing a geometric kernel-free architecture for modules related to geometric modeling in the embodiments of the present invention can be implemented in electronic devices such as desktop computers, notebooks, tablet computers, laptop computers, etc. Any of the above electronic devices stores a program compiled by the method for designing a geometric kernel-free architecture for modules related to geometric modeling. When any of the above electronic devices is started, the program is called, and then the method for designing a geometric kernel-free architecture for modules related to geometric modeling is implemented.
[0025] In a specific embodiment of the present invention, the electronic device is a finite element simulation software building device, which is used to build finite element simulation software.
[0026] Figure 1 A schematic flow chart of an embodiment of a method for designing a geometric kernel-free architecture for geometric modeling related modules provided by the present invention is shown in FIG. Figure 1 As shown in the figure, the geometry kernel-free architecture design method for geometry modeling related modules includes: S101, constructing a geometric modeling related data structure, wherein the geometric modeling related data structure includes a multi-level geometric modeling related data class; S102, constructing a geometry kernel related tool with an abstract method interface; the abstract method interface can be called by a geometry modeling related data class; S103, interactively analyzing the geometric modeling function to be developed, determining the target abstract method interface in the geometric kernel related tools and the target geometric modeling data class in the geometric modeling related data class; the target abstract method interface and the target geometric modeling data class constitute the geometric modeling related module design architecture; S104, determining the target geometry kernel to be adopted, and determining the specific implementation class in the geometry modeling related module design architecture based on the target geometry kernel to access the target geometry kernel.
[0027] The abstract method interface is not a specific implementation method, but a framework defined by the geometric kernel abstract class, which specifies which operations must be supported. The specific implementation method needs to be determined by the specific implementation class in step S104. This design further improves the openness and adaptability of the geometric kernel-free architecture design method for geometric modeling related modules, allowing different geometric kernels to flexibly adjust the implementation method according to their own characteristics.
[0028] Compared with the prior art, the geometric kernel-free architecture design method for geometric modeling related modules provided in the embodiments of the present invention constructs geometric kernel-related tools with abstract method interfaces, wherein the abstract method interfaces can be called by geometric modeling related data classes, thereby avoiding direct association between geometric modeling related data classes and geometric kernels. This decoupling of geometric modeling related data classes and geometric kernel-related tools is achieved, avoiding dependence on specific geometric kernels in the finite element software development process, allowing the development team to flexibly access the most suitable geometric kernel for the project according to actual conditions without being restricted by the initial selection, thereby significantly improving the scalability and maintainability of the finite element analysis software.
[0029] Furthermore, the embodiment of the present invention can more accurately identify the target abstract method interface and target geometric modeling data class that match the geometric modeling function to be developed by interactively analyzing the geometric modeling function to be developed, thereby optimizing the design and improving the overall performance and response speed of the system. In addition, the continuous iteration process also includes regularly collecting user feedback, timely adjusting and improving the design, and ensuring that the final product meets expectations and has a good user experience.
[0030] To ensure the maintainability and scalability of geometric modeling related data classes, and to further improve the maintainability and scalability of the geometric modeling related module non-geometric kernel dependent architecture design method proposed in the present invention, in some embodiments of the present invention, such as Figure 2As shown, geometric modeling related data classes include basic geometric data classes, geometric component data entity classes and geometric modeling functional entity classes. The basic geometric data classes are used to provide underlying data support for geometric component data entity classes; geometric modeling functional entity classes are used to generate and manage geometric component data entity classes, and geometric component data entity classes are components of geometric modeling functional entity classes; geometric modeling functional entity classes are used to call abstract method interfaces to form an association relationship with the geometric kernel, and geometric modeling functional entity classes are also used to generate, manage and maintain geometric component data entity classes.
[0031] Among them, the basic geometric data class is completely based on mathematical concepts and does not involve specific application scenarios or geometric kernels, providing a solid geometric information and mathematical data foundation for the creation of other classes.
[0032] The geometric component data entity class is the basic element that constitutes the geometric model in the finite element analysis software. On the one hand, it provides data and information attributes representing the geometric model; on the other hand, it also provides an abstract interface for controlling the operation of the basic elements of the geometric model.
[0033] Specifically, the geometric component data entity class plays the role of a placeholder for the most critical basic elements of the geometric model in the entire finite element software, providing abstract interfaces and common attribute calls for various geometric modeling functions. When developers connect a specific geometric kernel to the software system, they need to inherit and implement the abstract classes and interfaces related to the geometric component data according to the actual geometric kernel characteristics to ensure seamless integration.
[0034] As an object called by the specific geometric modeling related data class, the geometric modeling functional entity class is used to generate and manage specific geometric component objects. This type of entity not only implements the corresponding geometric modeling function, but also provides an abstract interface to establish a connection with the geometric kernel. That is, the geometric modeling functional entity class directly interacts with the geometric kernel. On the one hand, they construct the specific functions of geometric modeling by calling the interface methods provided by the geometric kernel abstract class, and on the other hand, they dynamically generate, manage and maintain geometric component data entity objects during the execution of the function.
[0035] The embodiment of the present invention realizes a multi-level data structure by setting geometric modeling related data classes including basic geometric data classes, geometric component data entity classes and geometric modeling functional entity classes. When the subsequent requirements are updated, various geometric component data entity classes can be generated according to the basic geometric data classes, and different geometric modeling functional entity classes can be constructed according to different actual functions, ensuring that the geometric modeling related data classes can be efficiently updated according to subsequent maintenance and development requirements, further improving the maintainability and scalability of the geometric kernel-free dependency architecture design method of the geometric modeling related modules.
[0036] In a specific embodiment of the present invention, Figure 2 As shown, the basic geometric data classes include the two-dimensional point (Point2d) class used to describe two-dimensional point objects, the three-dimensional point (Point3d) class used to describe three-dimensional point objects, the plane (Plane) class used to describe plane objects in space, the vector (Vector) class used to describe vector objects in space, and the three-dimensional coordinate axis (Ax3) class used to describe three-dimensional coordinate objects in space.
[0037] The geometric element data entity class includes the shape base abstract (IShapeBase) class that describes basic shape information and its abstract interface, the shape primitive abstract (IShapeEntity) class that describes shape primitive information and its abstract interface, the shape abstract (IShape) class that describes the common information and common abstract interface of the shape base abstract (IShapeBase) class and the shape primitive abstract (IShapeEntity) class, and the sketch base abstract (ISketchBase) class and the sketch abstract (ISketch) class that describe basic sketch information and its abstract interface.
[0038] The geometric function modeling functional entity classes include the PartGeneration class for part generation, the GeometryFeature class for describing geometric features, the PartTopo class for describing part topology information, the Sketch class for describing sketches, and the ShapeGroup class for describing geometric shape collections.
[0039] The shape primitives include but are not limited to points, lines, and surfaces. The relationship between the abstract class and the base abstract class is an inclusion relationship, that is, the common parts of the abstract class form the base abstract class, and the non-common parts are retained in the abstract class.
[0040] Since the geometric process includes basic functions such as view operation, geometric component generation, and geometric element operation, in some embodiments of the present invention, Figure 3 As shown, the geometry kernel related tools include the geometry kernel abstract class GeoKernel, and the geometry kernel abstract class includes the view operation abstract method interface, the geometry component generation abstract method interface and the geometry element operation abstract method interface.
[0041] The embodiment of the present invention can implement actions such as view operation, geometry component generation, and geometry element operation by setting a geometry kernel abstract class including a view operation abstract method interface, a geometry component generation abstract method interface, and a geometry element operation abstract method interface.
[0042] Since the process of constructing a geometric model includes other complex operations in addition to the above-mentioned basic operations such as view operations, geometric component generation, and geometric element operations, in order to simplify complex operations and improve development efficiency, in some embodiments of the present invention, commonly used complex operations are developed to obtain customized interfaces or abstract classes, so as to directly call the customized interfaces or abstract classes and realize rapid development.
[0043] In a specific embodiment of the present invention, Figure 3 As shown, the geometry kernel related tools also include the sketch tool interface ISketchTool, the collection element factory abstract class IGeoElementFactory and the geometry transformation tool interface ITrsTool. The sketch tool interface, the collection element factory abstract class and the geometry transformation tool interface form an aggregation relationship with the geometry kernel abstract class in the form of interface classes.
[0044] The aggregation relationship refers to the following: the sketch tool interface, the collection unit factory abstract class, the geometry transformation tool interface and the geometry kernel abstract class are called together as interfaces to achieve modeling. The geometry kernel abstract class manages the sketch tool interface, the collection unit factory abstract class and the geometry transformation tool interface.
[0045] The embodiment of the present invention realizes high modularity and plug-in type of geometric kernel related tools by setting up a sketch tool interface, a collection unit factory abstract class and a geometric transformation tool interface, so that the system can easily adapt to rapidly changing market demands and technological advances.
[0046] In some embodiments of the present invention, the tool for interactively analyzing the geometric modeling function to be developed in step S103 is a UML tool.
[0047] It should be understood that the tools for interactive analysis of the geometric modeling functions to be developed are not limited to UML tools. Different functions can be analyzed in different ways. Regardless of the analysis method, the ultimate goal is to obtain auxiliary information that can be converted into specific class diagram design. Among them, UML is a more effective and intuitive analysis tool.
[0048] In a specific embodiment of the present invention, Figure 4 As shown, step S103 includes: S401. Determine the interaction diagram and state diagram of the geometric modeling function to be developed based on the UML tool; S402, determining a target geometry kernel tool in the geometry kernel related tools and a target geometry modeling data class in the geometry modeling related data class based on the interaction diagram and the state diagram; S403, determining the target abstract method interface in the target geometry kernel tool, the target abstract method interface and the target geometry modeling data class forming a geometry modeling related module design architecture.
[0049] The embodiment of the present invention achieves the description of potential interaction objects involved in the geometric modeling function to be developed and the methods required for the interaction process by determining the interaction diagram and state diagram of the geometric modeling function to be developed, thereby providing guidance for clear interface design.
[0050] In some embodiments of the present invention, the geometric modeling functions to be developed include but are not limited to a sketching function and a component stretching function, and these two functions are taken as examples for introduction below.
[0051] In a specific embodiment of the present invention, taking the two specific functional points of "drawing the first point in the rectangle drawing function in the sketch drawing module" and "generating components in the component stretching function in the component creation module" as examples, a UML interaction diagram analysis was performed, and the key elements that can be used for abstract method interface design were summarized to complete the key architecture design for these two functions.
[0052] Specifically, Figure 5 This is an interactive diagram of the first point state in the rectangle drawing function in the sketch drawing module. The figure only shows the branch operations of the key main interaction process. Alternative branches such as misoperation are not considered in this patent. The user can perform three operations in this state, namely A1 moving the mouse, B1 clicking the mouse, and C1 clicking the confirmation button: If A1 is executed to move the mouse, the drawing mouse class DrawingMouse will first call its own internal method to update the current cursor coordinates to the input box in the status bar of the software. In this process, the drawing mouse class DrawingMouse will call the method in the mouse operation class MouseOperation, generate a pixel point object PixelPoint and pass it as an input parameter to the sketch tool interface ISketchTool to complete the projection calculation of the pixel coordinates to the sketch plane, thereby generating a two-dimensional point object Point2d. Subsequently, the drawing mouse class DrawingMouse passes the generated two-dimensional point object Point2d as a parameter to the drawing first point state class DrawFirstPointState, and calls its set two-dimensional point method to update the preview sketch object in the finite state machine with the two-dimensional point object as a parameter, that is, the sketch shape abstract class object ISketchShape. At this point, the relevant functional interaction of moving the mouse is completed, and the visual effect achieved is that when the user moves the mouse in the sketch drawing interface, there will be a sketch point element on the sketch plane that is updated and moved in real time with the mouse cursor.
[0053] If B1 clicks the mouse, the mouse confirmation method in the DrawFirstPointState class will be called through the drawing mouse class DrawingMouse, and then the completion signal will be sent to the drawing rectangle control class. Note that this interactive process does not involve too many object interactions and information transmissions, because the operation of clicking the mouse is often combined with the operation of moving the mouse. The preview and data update of the sketch point are realized during the mouse movement process (that is, the A1 mouse movement operation), and clicking the mouse is only a confirmation process of the state completion.
[0054] If C1 is executed and the confirmation button is clicked, the user calls the confirmation button method of the DrawFirstPointState class through the StatusBar class. The DrawFirstPointState class then calls the method of the interface control class GUIControl to obtain the string in the status bar input box, and passes it as an input parameter to the sketch tool interface ISketchTool to convert the input coordinate-related string into the numerical coordinates of the two-dimensional point to generate a two-dimensional point object Point2d. The DrawFirstPointState class then uses the two-dimensional point for user input update operations, updates the sketch shape abstract class object ISketchShape in the view, and finally sends a completion signal to the DrawRectangleControl class. In this process, it can be seen that since the mouse is not used for operation, but the string is directly input as the coordinate input of the two-dimensional point through the input box of the status bar, the objects involved in the interaction process and the interfaces to be called are different from A1 moving the mouse and B2 clicking the mouse. However, the visual effect presented to the user is similar, that is, after the user enters the coordinate value in the correct format in the status bar input box, the sketch point element in the main view is previewed and updated to the input coordinate position.
[0055] Through the analysis of the interaction diagram, we can know that in order to realize the function of drawing the first point in the rectangle drawing function in the sketch drawing module, it is necessary not only to create data objects related to geometric modeling, such as the pixel point class PixelPoint and the two-dimensional point Point2d, but also to call relevant methods in the geometric kernel tool class, such as "Update current view" of GeoKernel and "Project pixel coordinates to sketch plane" in ISketchTool, etc. These will serve as important basis for the subsequent architecture and abstract method interface design.
[0056] Figure 6This is an interactive schematic diagram of the component generation status in the component stretching function in the component creation module. The figure only shows the branch operations of the key main interactive process. Alternative branches such as erroneous operations are not considered in this patent.
[0057] The part generation state class PartGenerationState is the last state class managed in the extrusion control class ExtrudeControl. It enters this state directly after completing the coordinate input of the previous state. After entering the part generation state class PartGenerationState, it immediately executes its own entry current state method, and then executes the state confirmation method, respectively creating the part class Part and the geometry feature class GeometryFeature, and adding the feature to the created part object. Finally, the part object is added to the model data as a data node through the service coordination class ServiceCoordinator, and a signal of completion of creation is sent to the extrusion control class.
[0058] Among them, when creating the geometry feature object GeometryFeature, it involves the operation of the geometry modeling functional entity objects, namely the part topology class PartTopo and the extrusion class Extrude. First, call the set subordinate object method of the two to set the geometry feature object as the parent class object of the two. Then, call the method of generating part shape object of the extrusion class Extrude. The extrusion class Extrude calls the generate cross-section shape method in the part topology class PartTopo to obtain the shape object of the cross section required for extrusion, and uses this object as an input parameter to call the extrusion cross-section shape method of the geometry kernel abstract class GeoKernel, thereby generating the shape abstract class IShape and completing the extrusion creation of the part.
[0059] In this process, it can be found that the data layer involves the geometric component data entity class (IShape) and the geometric modeling function entity class (PartTopo, Extrude), and the geometric kernel tool layer involves the geometric kernel abstract class GeoKernel, calling its "Extrude Section Shape" abstract method interface. These will serve as important bases for the subsequent architecture and abstract method interface design.
[0060] Based on the above Figure 5 and Figure 6 The specific functional analysis can draw out the abstract method interface design in the relevant geometric kernel tools, such as Figure 7As shown. To meet the above two specific functions, the geometry kernel abstract class GeoKernel needs to provide two abstract method interfaces, "update_current_view()" and "extrude_section_shape()". For the extrude_section_shape() method, three input parameters are required, namely, the shape abstract class IShape object as the cross-section parameter sec, the geometry vector class GeoVector object as the extrusion path parameter path, and the topology type class TopoType as the topology type parameter type of the generated component, and its output parameter is the shape abstract class IShape object as the final generated geometry component.
[0061] From the above analysis, we can know that the sketch tool interface ISketchTool needs to provide three abstract method interfaces: "project_pixel_pos_to_sketch_plane()" (transfer pixel position to sketch plane), "convert_str_list_to_point2d()" (project pixel coordinates to sketch plane to generate two-dimensional point objects) and "generate_point()" (generate point objects). Among them, the project_pixel_pos_to_sketch_plane() method needs a pixel point class PixelPoint object as input parameter pixel_pos, and a two-dimensional point class Point2d object as output. The input parameter of the convert_str_list_to_point2d() method is a string representing the coordinate value, and its output is a two-dimensional point class Point2d object. The input parameter pt2d of the generate_point() method is a two-dimensional point class Point2d object, and its output is a sketch shape abstract class ISketchShape object.
[0062] The sketch shape abstract class ISketchShape needs to provide an update function, namely, the "update()" abstract method interface, which receives as input the sketch shape abstract class ISketchShape object shape, namely, updates itself by reading the input ISketchShape object information.
[0063] It should be made clear that in the above steps, whether at the data level or at the business logic tool level, only the design of abstract interfaces or structures has been completed. Although it can provide guidance for the software development process to build interactive logic or calculation templates for related geometric modeling functions, in order for the software to have specific geometric modeling functions, it is still necessary to select the target geometric kernel to be adopted and access the target geometric kernel under the guidance of the above-mentioned architectural design.
[0064] In a specific embodiment of the present invention, the target geometry kernel is any one of ACIS, Parasolid and Open CASCADE.
[0065] It should be understood that any currently mature geometric kernel can be used as the target geometric kernel, and is not limited to the above three geometric kernels.
[0066] The following article takes Open CASCADE (OCC) as the target geometry kernel as an example. Figure 8 As shown in the figure, in the architectural design content composed of geometric kernel tools and data structure abstract classes, the finite element simulation software system relies on the abstract method interface provided by the geometric kernel abstract class and the various geometric kernel related tools it manages. These tool classes all provide their own abstract method interfaces, and the finite element simulation system relies on these interfaces in the implementation of specific functions. The geometric kernel abstract class GeoKernel and the sketch tool interface ISketchTool and geometric transformation tool interface ITrsfTool it manages all rely on geometric element data entity abstract classes and interface classes, such as the sketch base abstract class ISketchBase, the shape base abstract class IShapeBase, and the shape abstract class IShape.
[0067] Construct the OCC geometry kernel class OCCGeoKernel to inherit the geometry kernel abstract class GeoKernel to implement the abstract method interface defined by it. At the same time, construct the OCC sketch tool OCCSketchTool and the OCC geometry transformation tool OCCTrsfTool to implement the sketch tool interface ISketchTool and the geometry transformation tool interface ITrsfTool respectively.
[0068] In addition, at the data structure level, based on the design of geometric component data entity abstract classes and interface classes, the related geometric component data entity classes are constructed. For example, the OCC sketch base class OCCSketchBase inherits from the sketch base abstract class ISketchBase, the OCC shape base class OCCShapeBase inherits from the shape base abstract class IShapeBase, and the OCC shape class OCCShape inherits from the shape abstract class IShape.
[0069] It should be noted that in the process of constructing the geometric component data entity class, the data structure in the geometric kernel will be needed, so it is necessary to build an association between the data entity class and the geometric kernel data. For example, in Open CASCADE, the class representing the two-dimensional point object is gp_Pnt2d, and the class representing the three-dimensional point object is gp_Pnt; then in the process of constructing the geometric component data entity class, it is necessary to design relevant conversion functions to convert the relevant data objects into the common basic geometric data objects defined in the software system, that is, to convert the gp_Pnt2d object into the two-dimensional point object Point2d, and to convert the gp_Pnt object into the three-dimensional point object Point3d.
[0070] After completing the development of all the above specific implementation classes, the target geometric kernel is connected, and the finite element analysis software can easily have geometric modeling functions. In this process, the modules and other related parts in the finite element analysis software will not be affected in any way, because the design of the architecture effectively realizes the decoupling of the specific geometric kernel from the architecture level of the software system.
[0071] On the other hand, an embodiment of the present invention further provides a simulation software construction method for constructing finite element simulation software, the method comprising: Construct geometric modeling related modules based on the geometric kernel-free architecture design method of geometric modeling related modules; Among them, the method for designing a geometry-kernel-free architecture based on geometry-modeling-related modules is the method for designing a geometry-kernel-free architecture based on geometry-modeling-related modules in any one of the above embodiments.
[0072] It should be understood that: in addition to constructing modules related to geometric modeling through the above steps, the simulation software construction method can also include constructing modules such as grid division, which will not be elaborated here.
[0073] On the other hand, the embodiment of the present invention also provides a design device for a geometric modeling related module without a geometric kernel dependent architecture, such as Fig. 9 As shown, the design device 900 of the geometry modeling related module without geometry kernel dependency architecture includes: A data structure construction unit 901 is used to construct a geometry modeling related data structure, wherein the geometry modeling related data structure includes a multi-level geometry modeling related data class; A geometry kernel related tool construction unit 902 is used to construct a geometry kernel related tool with an abstract method interface; the abstract method interface can be called by a geometry modeling related data class; The design architecture determination unit 903 is used to interactively analyze the geometric modeling function to be developed, determine the target abstract method interface in the geometric kernel related tools and the target geometric modeling data class in the geometric modeling related data class; the target abstract method interface and the target geometric modeling data class constitute the geometric modeling related module design architecture; The geometry kernel access unit 904 is used to determine the target geometry kernel to be adopted, and determine the specific implementation class in the geometry modeling related module design architecture based on the target geometry kernel to access the target geometry kernel.
[0074] The device 900 for designing a geometric kernel-free architecture for geometric modeling related modules provided in the above-mentioned embodiment can implement the technical solution described in the embodiment of the design method for a geometric kernel-free architecture for geometric modeling related modules. The specific implementation principles of the above-mentioned modules or units can refer to the corresponding contents in the embodiment of the design method for a geometric kernel-free architecture for geometric modeling related modules, which will not be repeated here.
[0075] On the other hand, an embodiment of the present invention further provides a simulation software construction device for constructing finite element simulation software, the device comprising: A geometric modeling related module construction unit, used for constructing geometric modeling related modules based on a geometric kernel-free dependent architecture design method of geometric modeling related modules; Among them, the method for designing a geometry-kernel-free architecture based on geometry-modeling-related modules is the method for designing a geometry-kernel-free architecture based on geometry-modeling-related modules in any one of the above embodiments.
[0076] 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.
[0077] The above is a detailed introduction to the geometric kernel-free architecture design method and device for a geometric modeling related module 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. A method for designing a geometry-kernel-free architecture for geometry modeling related modules, characterized in that: include: Constructing a geometric modeling related data structure, wherein the geometric modeling related data structure includes a multi-level geometric modeling related data class; Build geometry kernel related tools with abstract method interfaces; The abstract method interface can be called by the geometric modeling related data class; Interactively analyzing the geometric modeling function to be developed, determining the target abstract method interface in the geometric kernel related tools and the target geometric modeling data class in the geometric modeling related data class; The target abstract method interface and the target geometric modeling data class constitute a geometric modeling related module design architecture; A target geometry kernel to be adopted is determined, and based on the target geometry kernel, a specific implementation class in the geometry modeling related module design architecture is determined to access the target geometry kernel.
2. The method for designing a geometric kernel-free architecture for geometric modeling related modules according to claim 1, characterized in that: The geometric modeling related data classes include basic geometric data classes, geometric component data entity classes and geometric modeling functional entity classes. The basic geometric data classes are used to provide underlying data support for the geometric component data entity classes; the geometric modeling functional entity classes are used to generate and manage the geometric component data entity classes, and the geometric component data entity classes are components of the geometric modeling functional entity classes; the geometric modeling functional entity classes are used to call the abstract method interfaces to form an association relationship with the geometric kernel, and the geometric modeling functional entity classes are also used to generate, manage and maintain the geometric component data entity classes.
3. The method for designing a geometric kernel-free architecture for geometric modeling related modules according to claim 2, characterized in that: The basic geometric data classes include a two-dimensional point class for describing a two-dimensional point object, a three-dimensional point class for describing a three-dimensional point object, a plane class for describing a plane object in space, a vector class for describing a vector object in space, and a three-dimensional coordinate axis class for describing a three-dimensional coordinate object in space; The geometric element data entity class includes a shape base abstract class describing basic shape information and its abstract interface, a shape primitive abstract class describing shape primitive information and its abstract interface, a shape abstract class describing common information and common abstract interface of the shape base abstract class and the shape primitive abstract class, and a sketch base abstract class and a sketch abstract class describing basic sketch information and its abstract interface; The geometric function modeling functional entity class includes a component generation class for component generation, a geometric feature class for describing geometric features, a component topology class for describing component topology information, a sketch class for describing sketches, and a shape collection class for describing a geometric shape collection.
4. The method for designing a geometric kernel-free architecture for geometric modeling related modules according to claim 1, characterized in that: The geometry kernel related tools include a geometry kernel abstract class, and the geometry kernel abstract class includes a view operation abstract method interface, a geometry component generation abstract method interface and a geometry element operation abstract method interface.
5. The method for designing a geometric kernel-free architecture for geometric modeling related modules according to claim 4, characterized in that: The geometric kernel related tools also include a sketch tool interface, a collection unit factory abstract class and a geometric transformation tool interface. The sketch tool interface, the collection unit factory abstract class and the geometric transformation tool interface form an aggregation relationship with the geometric kernel abstract class in the form of an interface class.
6. The method for designing a geometric kernel-free architecture for geometric modeling related modules according to claim 1, characterized in that: The interactive analysis of the geometric modeling function to be developed is specifically as follows: Based on the UML tool, the geometric modeling function to be developed is interactively analyzed to determine the target abstract method interface in the geometric kernel related tools and the target geometric modeling data class in the geometric modeling related data class.
7. The method for designing a geometric kernel-free architecture for geometric modeling related modules according to claim 6, characterized in that: The interactive analysis of the geometric modeling function to be developed based on the UML tool to determine the target abstract method interface in the geometric kernel related tool and the target geometric modeling data class in the geometric modeling related data class includes: Determine the interaction diagram and state diagram of the geometric modeling function to be developed based on the UML tool; Determine a target geometry kernel tool in the geometry kernel related tools and a target geometry modeling data class in the geometry modeling related data class based on the interaction diagram and the state diagram; A target abstract method interface in the target geometry kernel tool is determined, wherein the target abstract method interface and the target geometry modeling data class constitute a geometry modeling related module design architecture.
8. A method for constructing simulation software, characterized in that: include: Construct geometric modeling related modules based on the geometric kernel-free architecture design method of geometric modeling related modules; The method for designing a geometric kernel-free architecture based on geometric modeling related modules is the method for designing a geometric kernel-free architecture based on geometric modeling related modules as described in any one of claims 1-7.
9. A design device for a geometric modeling related module without a geometric kernel dependent architecture, characterized in that: include: A data structure construction unit, used to construct a geometric modeling related data structure, wherein the geometric modeling related data structure includes a multi-level geometric modeling related data class; A geometry kernel related tool building unit, used to build geometry kernel related tools with abstract method interfaces; The abstract method interface can be called by the geometric modeling related data class; A design architecture determination unit is used to interactively analyze the geometric modeling function to be developed, determine the target abstract method interface in the geometric kernel related tools and the target geometric modeling data class in the geometric modeling related data class; The target abstract method interface and the target geometric modeling data class constitute a geometric modeling related module design architecture; The geometric kernel access unit is used to determine the target geometric kernel to be adopted, and determine the specific implementation class in the geometric modeling related module design architecture based on the target geometric kernel to access the target geometric kernel.
10. A simulation software construction device, characterized in that: include: A geometric modeling related module construction unit, used for constructing geometric modeling related modules based on a geometric kernel-free dependent architecture design method of geometric modeling related modules; The method for designing a geometric kernel-free architecture based on geometric modeling related modules is the method for designing a geometric kernel-free architecture based on geometric modeling related modules as described in any one of claims 1-7.
Citation Information
Patent Citations
Simulation knowledge model file format and data fusion system and fusion method
CN113591964A
CAD modeling system based on multi-kernel switching function, use method, equipment and storage medium
CN116991393A
Modeling method and system adaptive to various geometric engines
CN117150588A
Interactive geometric modeling related module design method, software construction method and device
CN118607319A
Three-dimensional shape generation system
JP1999353500A