Interface data processing method and device for heterogeneous geometric modeling engine and storage medium

By converting the local coordinate system and topology of the source geometry modeling engine to the target engine in geometry modeling software and implementing interface conversion, the high cost and data conversion complexity of replacing the geometry modeling kernel engine is solved, and efficient modeling and real-time topology updates are achieved.

CN119760803AActive Publication Date: 2025-04-04SHENZHEN POISSON SOFTWARE TECH CO LTD

Patent Information

Application Number
CN202411848153.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-04-04
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

Existing geometric modeling software is expensive when replacing the geometric modeling kernel engine, and the data conversion between different systems is complex, so it cannot reflect the changes in geometric bodies in real time.

Method used

By converting the local coordinate system in the source geometry modeling engine to the local coordinate system in the target geometry modeling engine, matching the topological and geometric relationships between the two, and implementing the transformation of related interfaces to meet the new interface requirements.

Benefits of technology

Improve modeling efficiency, reduce the need for manual adjustment, ensure that changes in geometry can be reflected in the topology in real time and adapt to new programming modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760803A_ABST
    Figure CN119760803A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computer-aided engineering, and provides an interface data processing method for a heterogeneous geometric modeling engine, and the method comprises the steps: converting a local coordinate system in a source geometric modeling engine into a local coordinate system in a target geometric modeling engine; matching corresponding topologies, geometric structures and relationships between the target geometric modeling engine and the source geometric modeling engine; and realizing conversion from related interfaces of the source geometric modeling engine to corresponding related interfaces of the target geometric modeling engine. According to the technical scheme, the modeling efficiency can be improved, and it is ensured that the change of the geometry can be reflected in the topological structure in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer-aided engineering, and in particular to an interface data processing method, device and storage medium of a heterogeneous geometric modeling engine. Background Art

[0002] Geometric modeling software usually relies on a specific geometric modeling kernel engine to implement specific functions, and is responsible for the creation, editing, and inspection of geometric data. Different geometric modeling kernels have their own characteristics and advantages, and are also suitable for different modeling software. For example, Siemens NX and SolidWorks software use the Parasolid kernel, which provides powerful solid modeling and surface modeling functions, and has strong modeling functions; Inventor software uses the ACIS kernel, which has a complete API and is widely used in the market; FreeCAD software uses the OpenCascade kernel, which is open source and cross-platform, suitable for companies or individuals with limited budgets, etc. Regardless of which of the above geometric kernel engines is used, once it is integrated and used in the software in the early stage, the cost of switching to other geometric kernel engines in the later stage is very high. Summary of the invention

[0003] The present application provides an interface data processing method, device and storage medium for a heterogeneous geometric modeling engine, which can improve modeling efficiency and ensure that changes in geometric bodies can be reflected in the topological structure in real time.

[0004] On the one hand, the present application provides an interface data processing method for a heterogeneous geometric modeling engine, the method comprising:

[0005] Converting a local coordinate system in a source geometric modeling engine to a local coordinate system in a target geometric modeling engine;

[0006] Matching the corresponding topology, geometry and relationship between the target geometric modeling engine and the source geometric modeling engine; and

[0007] Implement the conversion of the source geometric modeling engine related interface to the target geometric modeling engine corresponding related interface.

[0008] On the other hand, the present application provides an interface data processing device for a heterogeneous geometric modeling engine, the device comprising:

[0009] A first conversion module, used for converting a local coordinate system in a source geometric modeling engine to a local coordinate system in a target geometric modeling engine;

[0010] a matching module, used to match the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine; and

[0011] The second conversion module is used to realize the conversion of the relevant interface of the source geometric modeling engine to the corresponding relevant interface of the target geometric modeling engine.

[0012] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the technical solution of the interface data processing method of the heterogeneous geometric modeling engine as described above when executing the computer program.

[0013] In a fourth aspect, the present application provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the technical solution of the interface data processing method of the heterogeneous geometric modeling engine as described above.

[0014] From the technical solution provided in the present application, it can be seen that, on the one hand, by converting the local coordinate system in the source geometry modeling engine to the local coordinate system in the target geometry modeling engine, the optimal coordinate system can be automatically selected according to different geometric bodies and application scenarios, reducing the need for manual adjustment and improving modeling efficiency; on the other hand, by matching the corresponding topology, geometric structure and relationship between the target geometry modeling engine and the source geometry modeling engine, the complexity of conversion between different systems can be reduced, ensuring that changes in geometric bodies can be reflected in the topological structure in real time; thirdly, by realizing the conversion of the relevant interfaces of the source geometry modeling engine to the corresponding relevant interfaces of the target geometry modeling engine, it is possible to adapt to new interface requirements and smoothly transition to a new programming mode. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 It is a flow chart of the interface data processing method of the heterogeneous geometric modeling engine provided in the embodiment of the present application;

[0017] Figure 2 It is a schematic diagram of the topological hierarchy provided in the embodiment of the present application;

[0018] Figure 3 is a schematic diagram of a geometric object provided in an embodiment of the present application;

[0019] Figure 4 It is a structural schematic diagram of an interface data processing device of a heterogeneous geometric modeling engine provided in an embodiment of the present application;

[0020] Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] In this specification, adjectives such as first and second may be used only to distinguish one element or action from another element or action, without necessarily requiring or implying any actual such relationship or order. Where circumstances permit, reference to an element or component or step (etc.) should not be interpreted as being limited to only one of the elements, components, or steps, but may be one or more of the elements, components, or steps, etc.

[0023] In this specification, for the convenience of description, the sizes of various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0024] Geometric modeling software usually relies on a specific geometric modeling kernel engine to implement specific functions, and is responsible for the creation, editing, and inspection of geometric data. Different geometric modeling kernels have their own characteristics and advantages, and are also suitable for different modeling software. For example, Siemens NX and SolidWorks software use the Parasolid kernel, which provides powerful solid modeling and surface modeling functions, and has strong modeling functions; Inventor software uses the ACIS kernel, which has a complete API and is widely used in the market; FreeCAD software uses the OpenCascade kernel, which is open source and cross-platform, suitable for enterprises or individuals with limited budgets, and so on. Regardless of which of the above geometric kernel engines, once integrated and used in the software in the early stage, the cost of replacing it with another geometric kernel engine in the later stage is very high. Therefore, it is urgent to provide a method to facilitate enterprises or individuals to smoothly transition from one geometric kernel engine to another geometric kernel engine under the condition of minimizing the replacement cost.

[0025] In view of the above problems in the prior art, this application proposes an interface data processing method for a heterogeneous geometric modeling engine, the flow chart of which is shown in the attached figure. Figure 1 As shown, it mainly includes steps S101 to S103, which are described in detail as follows:

[0026] Step S101: converting the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine.

[0027] In the geometry modeling engine, the definition of the origin of the local coordinate system generally includes four situations, namely, 1) the origin of the coordinates is located at a vertex of the geometric body; 2) the origin of the coordinates is located at the center of a certain edge of the geometric body; 3) the origin of the coordinates is located at the center of a certain face of the geometric body; 4) the origin of the coordinates is located at the center of the entire geometric body. This means that if the two geometry modeling engines (the source geometry modeling engine and the target geometry modeling engine) have different definitions of the origin of the coordinates, when correctly positioning the same geometry, it is necessary to implement the conversion from the local coordinate system in the source geometry modeling engine to the local coordinate system in the target geometry modeling engine.

[0028] As an embodiment of the present application, the conversion of the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine may be implemented through steps S1011 and S1012, as described in detail as follows:

[0029] Step S1011: Calculate a displacement vector from the origin of the local coordinate system in the source geometric modeling engine to the origin of the local coordinate system in the target geometric modeling engine.

[0030] Assume that the origin of the local coordinate system in the source geometry modeling engine is P V =(x1, y1, z1), the origin of the local coordinate system in the target geometry modeling engine is P B =(x2, y2, z2), then the displacement vector T from the origin of the local coordinate system in the source geometric modeling engine to the origin of the local coordinate system in the target geometric modeling engine VB =P V -P B =(x2-x1, y2-y1, z2-z1).

[0031] Step S1012: adding the coordinates of the target geometric body in the local coordinate system of the source geometric modeling engine to the displacement vector, and obtaining the sum of the values ​​as the coordinates of the geometric body in the local coordinate system of the target geometric modeling engine.

[0032] The coordinates of the target geometry in the local coordinate system of the source geometry modeling engine are denoted as P source , then P target =P source +T VB Can be used as the coordinates of the local coordinate system of the geometry in the target geometry modeling engine.

[0033] It should be noted that, according to the above-mentioned four definitions and permutations of the origin of the local coordinate system, converting the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine involves 12 conversion methods, for example, the origin of the local coordinate system in the source geometric modeling engine is located at a vertex of the geometric body, while the origin of the local coordinate system in the target geometric modeling engine is located at the center of a certain edge of the geometric body, the origin of the local coordinate system in the source geometric modeling engine is located at a vertex of the geometric body, while the origin of the local coordinate system in the target geometric modeling engine is located at the center of a certain face of the geometric body, the origin of the local coordinate system in the source geometric modeling engine is located at the center of a certain edge of the geometric body, while the origin of the local coordinate system in the target geometric modeling engine is located at the center of a certain face of the geometric body, etc. The 12 conversion methods can be implemented according to steps S1011 and S1012 of the above-mentioned embodiment, and will not be described in detail.

[0034] Step S102: Matching the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine.

[0035] In different geometric modeling engines, some geometric modeling engines use an object to represent a geometric or topological entity, and some geometric modeling engines use a tag to mark a geometric or topological entity. In the conversion process, not only the geometric information itself should be considered, but also the relationship between topology and geometry should be considered, so as to correctly express the geometric characteristics in the new geometric modeling engine. As an embodiment of the present application, matching the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine can be achieved through steps S1021 and S1022, which are described in detail as follows:

[0036] Step S1021: Create topology and geometric objects corresponding to the source geometric modeling engine in the target geometric modeling engine.

[0037] In the field of geometric modeling, the topological hierarchy is usually as follows Figure 2 As shown, that is: Body->Region / Lump->Shell->Face->Loop->Fin / Coedge->Edge->Vertice, and geometric objects can usually be divided into Surface, Curve, and Point. Among them, Face is associated with Surface, Edge is associated with Curve, and Vertex is associated with Point, such as Figure 3As shown. Generally speaking, the boundary representation (BREP) structure used by each geometry modeling engine is generally consistent and can be matched directly, but it is not necessarily possible to directly create the corresponding topology level. For example, geometry modeling engine A supports the direct creation of the Edge layer topology object, but geometry modeling engine B does not support it. Based on the above facts, the topology and geometry objects corresponding to the source geometry modeling engine can be created in the target geometry modeling engine. For example, the Body is first created on the target geometry modeling engine, and then the Edge under the Body is considered to be matched with the Edge of the target geometry modeling engine.

[0038] Step S1022: respectively maintaining the boundary representation BREP hierarchical relationship between topological objects, geometric objects, and between topological and geometric objects.

[0039] In the field of geometric modeling, the Boundary Representation (BREP) format is a format used to represent the geometric model of a three-dimensional entity. It represents the entity by describing the geometric features of the entity boundary. Since the topological object is created based on the geometric object, the geometric objects can naturally be guaranteed to correspond when the topological structure is guaranteed to correspond, thereby ensuring that the BREP hierarchical relationship of the two geometric modeling engines corresponds to each other. As mentioned above, the Body is first created on the target geometric modeling engine, and then the Edge under the Body is matched with the Edge of the target geometric modeling engine. For example, assuming that the source geometry modeling engine supports directly creating topological edges through curves, while the target geometry modeling engine does not support directly creating topological edges, the target geometry modeling engine is needed to convert the source geometry modeling engine's interface for creating topological edges. The conversion method is that the target geometry modeling engine first creates a Body object through a curve. The Body object has a complete topological structure, so the Edge of the lower layer of the Body object can be queried. Since this Body is a Wire Body created through a curve, it has only one Edge. Therefore, the queried Edge is the topological edge to be created by the source geometry modeling engine.

[0040] Step S103: Implement the conversion of the source geometry modeling engine related interface to the target geometry modeling engine corresponding related interface.

[0041] In the embodiment of the present application, the conversion of the source geometry modeling engine related interface to the target geometry modeling engine corresponding related interface usually requires the implementation of three types of interface conversions, namely, 1) the conversion of the algorithm layer interface of the source geometry modeling engine to the algorithm layer interface of the target geometry modeling engine; 2) if the source geometry modeling engine lacks the related interface, then the target geometry modeling engine selects an alternative method to implement the function of the related interface missing from the source geometry modeling engine; 3) the interface of the source geometry modeling engine based on the first programming paradigm is converted to the interface of the target geometry modeling engine based on the second programming paradigm. The following are detailed descriptions of each.

[0042] As an embodiment of the present application, the conversion of the algorithm layer interface of the source geometric modeling engine to the algorithm layer interface of the target geometric modeling engine can be implemented through steps Sa1031 to Sa1033, which are described in detail as follows:

[0043] Step Sa1031: Convert the input parameter data of the source geometric modeling engine into the input parameter data of the target geometric modeling engine.

[0044] Specifically, the input parameter data of the source geometric modeling engine is converted into the input parameter data of the target geometric modeling engine by obtaining the input parameter data of the function. For example, the function funcA of the source geometric modeling engine can be replaced by the function funcB of the target geometric modeling engine. The input parameter data of the function funA is of paramA type, and the input parameter data of the function funcB is of paramB type. The function funcB cannot directly use the parameter paramA. The paramA object needs to be converted into a paramB object before it can be used by the function funcB.

[0045] Step Sa1032: By calling the interface of the target geometric modeling engine, the input parameter data converted in step Sa1031 is passed to the interface of the target geometric modeling engine.

[0046] It should be noted that in the embodiments of the present application, if the function in the source geometry modeling engine is slightly complex or there is no corresponding function interface in the target geometry modeling engine, multiple interfaces of the target geometry modeling engine may be used to implement the conversion of the complex function. For example, the source geometry modeling engine creates interfaces such as standard B-spline curves, Bezier curves, hyperbolas, and parabolas, but the target geometry modeling engine only creates interfaces such as standard B-spline curves. Then, it is necessary to convert the input parameter data of the interfaces for creating Bezier curves, hyperbolas, and parabolas of the source geometry modeling engine into the input parameter form of the standard B-spline curves of the target geometry modeling engine before the interfaces for creating Bezier curves, hyperbolas, and parabolas of the source geometry modeling engine can be converted through the interfaces for creating standard B-spline curves of the target geometry modeling engine.

[0047] Step Sa1033: Convert the type of the output parameter data of the target geometric modeling engine into the data type supported by the source geometric modeling engine.

[0048] In the above embodiment, the first programming paradigm may be process-oriented programming, and the second programming paradigm may be object-oriented programming. As an embodiment of the present application, converting the interface of the source geometric modeling engine based on the first programming paradigm into the interface of the target geometric modeling engine based on the second programming paradigm may be implemented through steps Sb1031 to Sb1033, as described in detail as follows:

[0049] Step Sb1031: Determine the classes, objects, methods of each class, and properties of objects required by the target geometric modeling engine based on object-oriented programming.

[0050] Step Sb1032: Convert the source geometry modeling engine into class methods based on functions in process-oriented programming.

[0051] Step Sb1033: Encapsulate the source geometry modeling engine into object attributes based on the data structure in process-oriented programming.

[0052] Through the above steps Sb1031 to Sb1033, a smooth transition to a new programming mode can be ensured, thereby giving full play to the advantages of object-oriented programming and improving the reusability and maintainability of the code.

[0053] The method of the above embodiment may also include: converting the internal data type in the source geometric modeling engine into the internal data type in the target geometric modeling engine; and converting the global coordinate system and its bounding box of the source geometric modeling engine into the global coordinate system and its bounding box of the target geometric modeling engine, which are explained below respectively.

[0054] Generally speaking, the internal data of each geometric modeling engine has its standard form, but its expression form in different geometric modeling engines is also different. In order to make the data of the source geometric modeling engine directly usable in the interface of the target geometric modeling engine, it is necessary to add an operator type conversion operator for each internal data in the source geometric modeling engine to convert the internal data type of the source geometric modeling engine into the internal data type of the target geometric modeling engine. In the embodiment of the present application, the internal data of the source geometric modeling engine or the target geometric modeling engine can be roughly divided into six types: standard form, topology class, intermediate class, management class, tool class and application layer function class. The conversion method of each type of internal data is described in detail below:

[0055] 1) Data in standard form. Each specific geometric object and core object has its own standard form, which is represented by a standard form class that stores the minimum subset of information that can fully represent the object. For example, in three-dimensional space, an elliptical geometric curve contains the local coordinate system, major axis radius, and minor axis radius of the ellipse in its standard form. Among them, the local coordinate system is represented by the local coordinate system standard form, which contains information such as the origin, normal axis, and reference axis. The standard forms of various types of data in different geometric modeling engines are not much different. Some may require calculations of varying degrees of difficulty during the conversion process, but most can be converted directly.

[0056] 2) Topological class data. As the name implies, this data type is used to represent a topological object, the creation of which may depend on other topological objects or geometric objects. The conversion of this data type requires the use of the target geometry modeling engine to create the corresponding topological structure within the class of the source geometry modeling engine, and maintain the BREP relationship with the context topological object. For example, to create a point Body, the Body layer corresponding to the source geometry modeling engine is BodyA, the vertex Vertex layer is VertexA, and the point point geometry layer is pointA, while the Body layer corresponding to the target geometry modeling engine is BodyB, the vertex Vertex layer is VertexB, and the point point geometry layer is pointB; for another example, the source geometry modeling engine creates VertexA through pointA, and then creates BodyA through VertexA, while the target geometry modeling engine creates VertexB through pointB, and then creates BodyB through VertexB. In this way, each layer of geometry and topology can correspond and keep the BREP structure consistent.

[0057] 3) Intermediate data: This type of data may not have any substantial functional role and only has functions such as forwarding interfaces. Normally, this type of data does not need to be converted.

[0058] 4) Management data: This type of data generally plays a management role, such as managing memory pointers, managing entity objects, etc. Under normal circumstances, this type of data does not need to be converted.

[0059] 5) Tool class data. This type of data usually provides static methods for the upper layer to call directly. For example, the curve calculation class provides static methods such as calculating derivatives and calculating continuity for objects such as ellipses and spline curves. Normally, the functions / methods in this type of data can be directly replaced using the algorithms or interfaces of the target geometry modeling engine. For example, the interface funcA of the source geometry modeling engine is used to calculate the first-order derivatives of points on the curve, and the interface funcB of the target geometry modeling engine is also used for the first-order derivatives of points on the curve. In this case, funcB can be directly called in the interface funcA. If the conversion of this method affects the effects of other methods, the affected methods also need to be converted. As mentioned above, if the interface funcAA in the source geometry modeling engine is used to calculate continuity, the interface funcA will be used, so it is necessary to consider converting the interface funcAA.

[0060] 6) Application layer data, which is used by the application layer, such as data types related to the rendering module. Usually, this type of data is an encapsulation of the mixed and complex call logic of the underlying interface and is affected by the underlying interface. Therefore, the data type needs to be rewritten using the logic of the target geometry modeling engine.

[0061] As for converting the global coordinate system and bounding box of the source geometry modeling engine to the global coordinate system and bounding box of the target geometry modeling engine, generally speaking, most geometry modeling engines use the Cartesian coordinate system as the global coordinate system, but some geometry modeling engines also support the expression of the spherical coordinate system. Therefore, preset mathematical operations can be used to ensure that the entity objects and bounding boxes of the source geometry modeling engine under different global coordinate systems can be correctly expressed in the target geometry modeling engine.

[0062] From the above attached Figure 1 It can be seen from the interface data processing method of the example heterogeneous geometric modeling engine that, on the one hand, by converting the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine, the optimal coordinate system can be automatically selected according to different geometric bodies and application scenarios, reducing the need for manual adjustment and improving modeling efficiency; on the other hand, by matching the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine, the complexity of conversion between different systems can be reduced, ensuring that changes in geometric bodies can be reflected in the topological structure in real time; thirdly, by realizing the conversion of the relevant interfaces of the source geometric modeling engine to the corresponding relevant interfaces of the target geometric modeling engine, it is possible to adapt to new interface requirements and smoothly transition to a new programming mode.

[0063] Please see attached Figure 4 , is an interface data processing device of a heterogeneous geometric modeling engine provided in an embodiment of the present application, the device may include a first conversion module 401, a matching module 402, and a second conversion module 403, which are described in detail as follows:

[0064] A first conversion module 401 is used to convert a local coordinate system in a source geometric modeling engine to a local coordinate system in a target geometric modeling engine;

[0065] A matching module 402 is used to match the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine;

[0066] The second conversion module 403 is used to implement the conversion of the source geometric modeling engine related interface to the target geometric modeling engine corresponding related interface.

[0067] From the above attached Figure 4 It can be seen from the interface data processing device of the example heterogeneous geometric modeling engine that, on the one hand, by converting the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine, the optimal coordinate system can be automatically selected according to different geometric bodies and application scenarios, reducing the need for manual adjustment and improving modeling efficiency; on the other hand, by matching the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine, the complexity of conversion between different systems can be reduced, ensuring that changes in geometric bodies can be reflected in the topological structure in real time; thirdly, by realizing the conversion of the relevant interfaces of the source geometric modeling engine to the corresponding relevant interfaces of the target geometric modeling engine, it is possible to adapt to new interface requirements and smoothly transition to a new programming mode.

[0068] Figure 5 Schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment mainly includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50, such as a program of the interface data processing method of the heterogeneous geometric modeling engine. When the processor 50 executes the computer program 52, the steps in the embodiment of the interface data processing method of the heterogeneous geometric modeling engine are implemented, such as Figure 1 Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 4 The functions of the first conversion module 401 , the matching module 402 and the second conversion module 403 are shown.

[0069] Exemplarily, the computer program 52 of the interface data processing method of the heterogeneous geometric modeling engine mainly includes: converting the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine; matching the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine; realizing the conversion of the relevant interface of the source geometric modeling engine to the corresponding relevant interface of the target geometric modeling engine. The computer program 52 can be divided into one or more modules / units, one or more modules / units are stored in the memory 51 and executed by the processor 50 to complete the present application. One or more modules / units can be a series of computer program instruction segments that can perform specific functions, and the instruction segments are used to describe the execution process of the computer program 52 in the electronic device 5. For example, the computer program 52 can be divided into the functions of a first conversion module 401, a matching module 402 and a second conversion module 403 (modules in the virtual device), and the specific functions of each module are as follows: the first conversion module 401 is used to convert the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine; the matching module 402 is used to match the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine; the second conversion module 403 is used to realize the conversion of the relevant interface of the source geometric modeling engine to the corresponding relevant interface of the target geometric modeling engine.

[0070] The electronic device 5 may include but is not limited to a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0071] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0072] The memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. Further, the memory 51 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 51 is used to store computer programs and other programs and data required by the electronic device. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0073] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned device can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0074] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0075] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0076] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0077] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0078] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0079] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program of the interface data processing method of the heterogeneous geometric modeling engine can be stored in a storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments, that is, converting the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine; matching the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine; realizing the conversion of the relevant interface of the source geometric modeling engine to the corresponding relevant interface of the target geometric modeling engine. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. Storage media may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, mobile hard disks, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content contained in the storage medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, storage media do not include electric carrier signals and telecommunication signals.

[0080] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application is described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. The specific implementation methods described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application, and is not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present invention.

Claims

1. A method for processing interface data of a heterogeneous geometric modeling engine, characterized in that: The method comprises: Converting a local coordinate system in a source geometric modeling engine to a local coordinate system in a target geometric modeling engine; Matching the corresponding topology, geometry and relationship between the target geometric modeling engine and the source geometric modeling engine; and Implement the conversion of the source geometric modeling engine related interface to the target geometric modeling engine corresponding related interface.

2. The interface data processing method of the heterogeneous geometric modeling engine according to claim 1, characterized in that: The converting of the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine comprises: Calculating a displacement vector from the origin of the local coordinate system in the source geometric modeling engine to the origin of the local coordinate system in the target geometric modeling engine; The coordinates of the target geometric body in the local coordinate system of the source geometric modeling engine are added to the displacement vector, and the sum of the values ​​is used as the coordinates of the geometric body in the local coordinate system of the target geometric modeling engine.

3. The interface data processing method of the heterogeneous geometric modeling engine according to claim 1, characterized in that: The matching of the corresponding topology, geometry and relationship between the target geometric modeling engine and the source geometric modeling engine includes: Creating in the target geometric modeling engine topology and geometric objects corresponding to the source geometric modeling engine; The boundaries between topological objects, geometric objects, and between topological and geometric objects are maintained separately to represent the BREP hierarchical relationship.

4. The interface data processing method of the heterogeneous geometric modeling engine according to claim 1, characterized in that: The step of implementing the conversion of the source geometric modeling engine related interface to the target geometric modeling engine corresponding related interface includes: Implementing conversion of the algorithm layer interface of the source geometric modeling engine to the algorithm layer interface of the target geometric modeling engine; If the source geometric modeling engine lacks a relevant interface, selecting an alternative method in the target geometric modeling engine to implement the function of the relevant interface missing from the source geometric modeling engine; and The interface of the source geometric modeling engine based on a first programming paradigm is converted into an interface of the target geometric modeling engine based on a second programming paradigm.

5. The interface data processing method of the heterogeneous geometric modeling engine according to claim 4, characterized in that: The step of implementing the conversion of the algorithm layer interface of the source geometric modeling engine to the algorithm layer interface of the target geometric modeling engine includes: Converting the input parameter data of the source geometric modeling engine into the input parameter data of the target geometric modeling engine; By calling the interface of the target geometric modeling engine, the converted input parameter data is passed to the interface of the target geometric modeling engine; The type of the output parameter data of the target geometric modeling engine is converted into a data type supported by the source geometric modeling engine.

6. The interface data processing method of the heterogeneous geometric modeling engine according to claim 4, characterized in that: The first programming paradigm is process-oriented programming, the second programming paradigm is object-oriented programming, and the step of converting the interface of the source geometric modeling engine based on the first programming paradigm into the interface of the target geometric modeling engine based on the second programming paradigm comprises: Determine the classes, objects, methods of each class and properties of the objects required by the target geometric modeling engine based on the object-oriented programming; Converting the source geometric modeling engine into a method of the class based on a function in the process-oriented programming; The source geometric modeling engine is encapsulated into the attributes of the object based on the data structure in the process-oriented programming.

7. The method for processing interface data of a heterogeneous geometric modeling engine according to any one of claims 1 to 6, characterized in that: The method further comprises: Converting the internal data type in the source geometric modeling engine into the internal data type in the target geometric modeling engine; and The global coordinate system and bounding box of the source geometric modeling engine are converted to the global coordinate system and bounding box of the target geometric modeling engine.

8. An interface data processing device for a heterogeneous geometric modeling engine, characterized in that: The device comprises: A first conversion module, used for converting a local coordinate system in a source geometric modeling engine to a local coordinate system in a target geometric modeling engine; a matching module, used to match the corresponding topology, geometric structure and relationship between the target geometric modeling engine and the source geometric modeling engine; and The second conversion module is used to realize the conversion of the relevant interface of the source geometric modeling engine to the corresponding relevant interface of the target geometric modeling engine.

9. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Heterogeneous model transformation method based on unified modeling environment

    CN104484163A

  • Modeling Concrete Structures

    US20130275092A1

  • Three dimensional geometric modeling system with multiple concurrent geometric engines

    US6489957B1

Cited By

  • CAD (Computer Aided Design) system suitable for multiple modeling engines and implementation method

    CN120277735A

  • A CAD system adaptable to multiple modeling engines and its implementation method

    CN120277735B