Interface data processing method, device and storage medium of isomerism geometry modeling engine

By using the interface data processing method of the heterogeneous geometric modeling engine, the high cost problem of changing the kernel engine of geometric modeling software is solved, and efficient geometric topology transformation and interface adaptation are achieved, improving modeling efficiency and real-time performance.

CN119760803BActive Publication Date: 2025-10-24SHENZHEN POISSON SOFTWARE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Replacing the geometric modeling kernel engine in existing geometric modeling software is costly and makes it difficult to efficiently convert the topology and interfaces of geometry between different systems.

Method used

A method for processing interface data of heterogeneous geometric modeling engines is provided. This method transforms the local coordinate system of the source geometric modeling engine to the target geometric modeling engine, matches topological and geometric structural relationships, and implements interface conversion. The method includes a local coordinate system transformation module, a matching module, and an interface conversion module.

Benefits of technology

It reduces the need for manual adjustments, improves modeling efficiency, ensures that geometry changes are reflected in the topology in real time, adapts to new interface requirements, and smoothly transitions to new programming modes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760803B_ABST
    Figure CN119760803B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of computer-aided engineering, and provides an interface data processing method of a heterogeneous geometry modeling engine, which comprises the following steps: converting a local coordinate system in a source geometry modeling engine to a local coordinate system in a target geometry modeling engine; matching corresponding topologies, geometric structures and their relationships between the target geometry modeling engine and the source geometry modeling engine; and realizing conversion of a related interface of the source geometry modeling engine to a corresponding related interface of the target geometry modeling engine. The technical scheme can improve modeling efficiency and ensure that changes of geometric bodies can be reflected in a topology structure in real time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application 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 geometry modeling engine. BACKGROUND

[0002] Geometric modeling software usually relies on a specific geometric modeling kernel engine to realize specific functions, which is responsible for the creation, editing and checking of geometric data, etc. 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 Parasolid kernel, which provides powerful solid modeling and surface modeling functions; Inventor software uses ACIS kernel, which has complete API and is widely used in the market; FreeCAD software uses OpenCascade kernel, which is open source and cross-platform, suitable for enterprises or individuals with limited budget, etc. No matter which kind of geometric kernel engine is used, once it is integrated in the software at the early stage, the cost of replacing it to other geometric kernel engine at the later stage is very high. SUMMARY

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

[0004] In one aspect, the present application provides an interface data processing method of a heterogeneous geometry modeling engine, which comprises:

[0005] converting a local coordinate system in a source geometry modeling engine to a local coordinate system in a target geometry modeling engine;

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

[0007] realizing the conversion of the related interfaces of the source geometry modeling engine to the corresponding related interfaces of the target geometry modeling engine.

[0008] In another aspect, the present application provides an interface data processing device of a heterogeneous geometry modeling engine, which comprises:

[0009] a first conversion module for converting a local coordinate system in a source geometry modeling engine to a local coordinate system in a target geometry modeling engine;

[0010] a matching module for matching the corresponding topology, geometric structure and their relationship between the target geometry modeling engine and the source geometry modeling engine; and

[0011] The second conversion module is configured to convert the related interface of the source geometric modeling engine to the corresponding related interface of the target geometric modeling engine.

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

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

[0014] From the above technical solution provided by the present application, 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 the modeling efficiency. On the other hand, by matching the corresponding topology, geometric structure and their relationship between the target geometric modeling engine and the source geometric modeling engine, the complexity in conversion between different systems can be reduced, and the changes in the geometric body can be ensured to be reflected in the topology structure in real time. Thirdly, by converting the related interface of the source geometric modeling engine to the corresponding related interface of the target geometric modeling engine, the new interface requirements can be adapted, and the transition to the new programming mode can be smoothly made. BRIEF DESCRIPTION OF DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0016] Figure 1 is a flowchart of the interface data processing method of the heterogeneous geometric modeling engine provided by the embodiments of the present application;

[0017] Figure 2 is a topological level schematic diagram provided by the embodiments of the present application;

[0018] Figure 3 is a geometric object schematic diagram provided by the embodiments of the present application;

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

[0020] Figure 5 Fig. 1 is a structural schematic of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort fall within the scope of the present application.

[0022] In this specification, adjectives such as first and second can be used merely to differentiate one element or action from another element or action, without necessarily implying any actual such relationship or order. Where the context permits, reference to an element or component or step (etc.) by the indefinite article "a" or "an" does not exclude the existence of, or the possibility of using, more than one of the element, component or step (etc.).

[0023] In this specification, the dimensions of the various parts shown in the drawings are not necessarily drawn to scale.

[0024] Geometric modeling software usually relies on a specific geometric modeling kernel engine to implement specific functions, which is responsible for the creation, editing and checking of geometric data, etc. 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 Parasolid kernel, which provides powerful solid modeling and surface modeling functions, and has strong modeling functions; Inventor software uses ACIS kernel, which has complete API and is widely used in the market; FreeCAD software uses OpenCascade kernel, which is open source and cross-platform, suitable for enterprises or individuals with limited budget, etc. No matter which kind of geometric kernel engine is used, once it is integrated in the software in the early stage, the cost of replacing it to other 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 replacement cost.

[0025] In view of the above problems of the prior art, the present application provides an interface data processing method of heterogeneous geometric modeling engines, the flow chart of which is shown in FIG. 1, mainly including steps S101-S103, which are described in detail as follows: Figure 1

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

[0027] In geometric modeling engines, the origin of a local coordinate system is generally defined in four scenarios: 1) the origin is located at a vertex of a geometric object; 2) the origin is located at the center of an edge of a geometric object; 3) the origin is located at the center of a face of a geometric object; and 4) the origin is located at the center of the entire geometric object. This means that if two geometric modeling engines (the source and target) define the origin differently, correctly positioning the same geometric object requires converting the local coordinate system of the source engine to the local coordinate system of the target engine.

[0028] As an embodiment of the present application, converting the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine may be achieved through steps S1011 and S1012, as detailed below:

[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 is 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, the sum of which is used 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 It 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 of the origin of the local coordinate system and the permutation combination, converting the local coordinate system in the source geometry modeling engine to the local coordinate system in the target geometry modeling engine involves 12 conversion modes, for example, the origin of the local coordinate system in the source geometry modeling engine is located at a vertex of the geometric body, while the origin of the local coordinate system in the target geometry modeling engine is located at the center of an edge of the geometric body, the origin of the local coordinate system in the source geometry modeling engine is located at a vertex of the geometric body, while the origin of the local coordinate system in the target geometry modeling engine is located at the center of a face of the geometric body, the origin of the local coordinate system in the source geometry modeling engine is located at the center of an edge of the geometric body, while the origin of the local coordinate system in the target geometry modeling engine is located at the center of a face of the geometric body, and so on. The 12 conversion modes 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 topologies, geometric structures and their relationships between the target geometry modeling engine and the source geometry modeling engine.

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

[0036] Step S1021: Creating topologies and geometric objects corresponding to the source geometry modeling engine in the target geometry modeling engine.

[0037] In the field of geometry modeling, the hierarchical relationship of topologies is usually as shown in Figure 2 , that is, Body->Region / Lump->Shell->Face->Loop->Fin / Coedge->Edge->Vertice, and the geometric objects can usually be divided into Surface, Curve, Point, wherein Face is associated with Surface, Edge is associated with Curve, and Vertex is associated with Point, as shown in Figure 3Generally speaking, the BREP structure used by each geometry modeling engine is generally consistent, and can be directly matched, but it is not necessarily possible to directly create a corresponding topological hierarchy, for example, geometry modeling engine A supports direct creation of an Edge topological object, but geometry modeling engine B does not support it. Based on the above fact, the topological and geometric objects corresponding to the source geometry modeling engine can be created in the target geometry modeling engine, for example, first create a Body on the target geometry modeling engine, and then consider matching the Edge under the Body with the Edge of the target geometry modeling engine.

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

[0039] In the field of geometry modeling, the boundary representation (Boundary REPresentation, BREP) format is a format for representing a geometric model of a three-dimensional entity, which represents the entity by describing the geometric features of the entity boundary. Since the topological object is created in dependence on the geometric object, in the case of ensuring that the topological structure corresponds, it is naturally possible to ensure that the geometric object can correspond, thereby ensuring that the BREP hierarchy relationship of the two geometry modeling engines corresponds to each other. As described above, first create a Body on the target geometry modeling engine, and then match the Edge under the Body with the Edge of the target geometry modeling engine. For example, it is assumed that the source geometry modeling engine supports direct creation of a topological edge through a curve, and the target geometry modeling engine does not support direct creation of a topological edge. Here, it is necessary to use the target geometry modeling engine to convert the source geometry modeling engine's topological edge creation interface, and 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 under the Body object can be queried. Since the Body is a Wire Body created through a curve, there is only one Edge, and therefore the queried Edge is the topological edge to be created by the source geometry modeling engine.

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

[0041] In the embodiments of the present application, the conversion of the interface of the source geometry modeling engine to the corresponding interface of the target geometry modeling engine usually needs to implement the conversion of three interfaces, that is, 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 relevant interface, the function of the relevant interface of the source geometry modeling engine is implemented by selecting an alternative way in the target geometry modeling engine; and 3) the interface of the source geometry modeling engine based on the first programming paradigm is converted into the interface of the target geometry modeling engine based on the second programming paradigm. The following will be described in detail.

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

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

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

[0045] Step Sa1032: passing the input parameter data converted by step Sa1031 to the interface of the target geometry modeling engine by calling the interface of the target geometry modeling engine.

[0046] It should be noted that in the embodiments of the present application, if the function of 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 can be used to implement the conversion of the complex function. For example, the source geometry modeling engine creates interfaces for creating standard B-spline curves, Bezier curves, hyperbolic curves, and parabolic curves. However, the target geometry modeling engine only creates an interface for creating standard B-spline curves. Therefore, the input parameter data of the interfaces of the source geometry modeling engine for creating Bezier curves, hyperbolic curves, and parabolic curves needs to be converted into the input parameter form of the standard B-spline curve of the target geometry modeling engine before the interfaces of the source geometry modeling engine for creating Bezier curves, hyperbolic curves, and parabolic curves can be converted by the interface of the target geometry modeling engine for creating standard B-spline curves.

[0047] Step Sa1033: converting the type of the out-parameter data of the target geometry modeling engine into a data type supported by the source geometry modeling engine.

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

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

[0050] Step Sb1032: converting the functions in the source geometry modeling engine based on procedural programming into the methods of the classes.

[0051] Step Sb1033: encapsulating the data structures in the source geometry modeling engine based on procedural programming into the attributes of the objects.

[0052] Through the above steps Sb1031 to Sb1033, it can be ensured that the transition to the new programming mode is smooth, so that the advantages of object-oriented programming can be fully utilized, and the reusability and maintainability of the code are improved.

[0053] The method of the above embodiment can further include converting the internal self-owned data types in the source geometry modeling engine into the internal self-owned data types in the target geometry modeling engine, and converting the global coordinate system and the bounding box of the source geometry modeling engine to the global coordinate system and the bounding box of the target geometry modeling engine, which are described in detail as follows.

[0054] Generally, the internal data of each geometry modeling engine has a standard form, but its expression form in different geometry modeling engines is different. In order to enable the data of the source geometry modeling engine to be directly used in the interface of the target geometry modeling engine, an operator type conversion operator needs to be added for each internal data in the source geometry modeling engine to convert the internal self-owned data types in the source geometry modeling engine into the internal self-owned data types in the target geometry modeling engine. In the embodiment of the present application, the internal data of the source geometry modeling engine or the target geometry modeling engine can be roughly divided into six types, i.e., standard form, topology class, intermediate class, management class, tool class, and application layer function class, and the conversion method of the internal data of each type is described in detail as follows:

[0055] 1) Standard form data, each specific geometric object has its own standard form, which is represented by the standard form class, and the class saves the minimum information set that can fully represent the object. For example, in three-dimensional space, an elliptical geometric curve contains the local coordinate system of the ellipse, the major axis radius, and the minor axis radius in the standard form. Among them, the local coordinate system is represented by the local coordinate system standard form, which contains the origin, normal axis, and reference axis information. The standard forms of various types of data in different geometric modeling engines are not much different, and some may need different levels of calculation during conversion, and most can be directly converted.

[0056] 2) Topology class data, as the name implies, this data type is used to represent a topology object, which may depend on other topology objects or geometric objects. The conversion of this data type needs to use the target geometric modeling engine to create the corresponding topology structure inside the class of the source geometric modeling engine, and maintain the BREP relationship with the context topology object. For example, to create a point Body, the source geometric modeling engine corresponds to BodyA, VertexA, and pointA, while the target geometric modeling engine corresponds to BodyB, VertexB, and pointB. For another example, the source geometric modeling engine creates VertexA through pointA, and then creates BodyA through VertexA, while the target geometric modeling engine creates VertexB through pointB, and then creates BodyB through VertexB. In this way, each layer of geometry and topology level can be corresponding, and the BREP structure is consistent.

[0057] 3) Intermediate class data, this class of data may not have substantial functional role, only with forwarding interface and other functions, and in general, this class of data does not need to be converted.

[0058] 4) Management class data, this class of data generally plays a management role, such as managing memory pointers, managing entity objects, etc., and in general, this class of data does not need to be converted.

[0059] 5) Tool class data, which usually provides static methods for upper layer to directly call, for example: curve calculation class provides static methods such as calculating derivative, calculating continuity for objects such as ellipse, spline curve to use. Usually, the functions / methods in this class of data can be directly replaced by the algorithm or interface of the target geometry modeling engine, for example, the interface funcA of the source geometry modeling engine is used to calculate the first derivative of the point on the curve, and the interface funcB of the target geometry modeling engine is also used to calculate the first derivative of the point on the curve, then funcB can be directly called in interface funcA. If the conversion of this method affects the effect of other methods, the affected methods also need to be converted, as described above, if the interface funcAA in the source geometry modeling engine is used to calculate continuity, which will use the interface funcA, then the conversion of the interface funcAA needs to be considered.

[0060] 6) Application layer data, which is used by the application layer, for example, rendering module related data types, usually, this kind of data is the encapsulation of the mixed complex calling logic of the underlying interface, which is affected by the underlying interface, so the target geometry modeling engine logic needs to be used to rewrite this data type

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

[0062] From the above-mentioned Figure 1 It can be known from the interface data processing method of the heterogeneous geometry modeling engine 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, the need for manual adjustment is reduced, and the modeling efficiency is improved; on the other hand, by matching the corresponding topologies, geometric structures and their relationships between the target geometry modeling engine and the source geometry modeling engine, the complexity in the conversion between different systems can be reduced, and it is ensured that the changes of the geometric bodies can be reflected in the topological structure in real time; thirdly, by realizing the conversion of the related interfaces of the source geometry modeling engine to the corresponding related interfaces of the target geometry modeling engine, the new interface requirements can be adapted, and the transition to the new programming mode is smooth.

[0063] Please refer to the accompanying Figure 4 The device provided by the embodiment of the present application is an interface data processing device of a heterogeneous geometry modeling engine, which can 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 the local coordinate system in the source geometric modeling engine to the local coordinate system in the target geometric modeling engine;

[0065] Matching module 402, 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 convert 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 for the interface data processing method of the heterogeneous geometric modeling engine. When the processor 50 executes the computer program 52, the steps of 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 the modules / units in the above-mentioned device embodiments are realized, 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 geometry modeling engine mainly includes: converting a local coordinate system in a source geometry modeling engine to a local coordinate system in a target geometry modeling engine; matching corresponding topologies, geometric structures and relationships therebetween between the target geometry modeling engine and the source geometry modeling engine; and realizing conversion of related interfaces of the source geometry modeling engine to corresponding related interfaces of the target geometry modeling engine. The computer program 52 can be divided into one or more modules / units, the one or more modules / units are stored in the memory 51 and executed by the processor 50 to complete the present application. The one or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which 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 a virtual device), and specific functions of the modules are as follows: the first conversion module 401 is configured to convert a local coordinate system in a source geometry modeling engine to a local coordinate system in a target geometry modeling engine; the matching module 402 is configured to match corresponding topologies, geometric structures and relationships therebetween between the target geometry modeling engine and the source geometry modeling engine; and the second conversion module 403 is configured to realize conversion of related interfaces of the source geometry modeling engine to corresponding related interfaces of the target geometry modeling engine.

[0070] The electronic device 5 can include but is not limited to the processor 50 and the memory 51. Those skilled in the art can understand that the electronic device 5 can further include other components, for example, the electronic device 5 can further include an input / output device, a network access device, a bus and the like. Figure 5 The electronic device 5 is only an example and does not constitute a limitation on the electronic device 5, and can include more or fewer components than those shown, or combine certain components, or different components, for example, the electronic device can further include an input / output device, a network access device, a bus and the like.

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

[0072] The memory 51 can be an internal storage unit of the electronic device 5, for example, a hard disk or a memory of the electronic device 5. The memory 51 can also be an external storage device of the electronic device 5, for example, 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 can include both the internal storage unit and the external storage device of the electronic device 5. The memory 51 is used to store computer programs and other programs and data required by the electronic device. The memory 51 can also be used to temporarily store data that has been output or will be output.

[0073] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, 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. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the above device can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0074] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can refer to the relevant description of other embodiments.

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

[0076] In the embodiments of the present application, it should be understood that the disclosed apparatuses / devices and methods can be implemented in other manners. For example, the embodiments of the apparatuses / devices described above are merely illustrative. For example, the division of the modules or units is merely logical function division. There can be another division manner for the actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0077] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.

[0078] In addition, each functional unit in the embodiments of the present application can be integrated in a processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0079] The integrated modules / units, if implemented in the form of software functional units and sold or used as independent products, can be stored in a storage medium. Based on such understanding, all or part of the processes in the above-mentioned embodiment methods can also be instructed by a computer program to relevant hardware to complete. 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 a processor, the steps of each method embodiment can be implemented, that is, the local coordinate system in the source geometric modeling engine is converted to the local coordinate system in the target geometric modeling engine; the corresponding topologies, geometric structures and their relationships between the target geometric modeling engine and the source geometric modeling engine are matched; and the conversion of the related interfaces of the source geometric modeling engine to the corresponding related interfaces of the target geometric modeling engine is implemented. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The storage medium can include any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the storage medium can 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, the storage medium does not include electrical carrier signals and telecommunication signals.

[0080] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features; 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 above specific embodiments further illustrate the purpose, technical solutions and beneficial effects of the present application. It should be understood that the above description is only a specific embodiment of the present application, and is not used to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for processing interface data of a heterogeneous geometry modeling engine, characterized in that, The method comprises: Converting a local coordinate system in the source geometry modeling engine to a local coordinate system in the target geometry modeling engine; Matching corresponding topologies, geometric structures and their relationships between the target geometry modeling engine and the source geometry modeling engine; and Converting relevant interfaces of the source geometry modeling engine to corresponding relevant interfaces of the target geometry modeling engine; The matching of the corresponding topologies, geometric structures and their relationships between the target geometry modeling engine and the source geometry modeling engine comprises: creating topologies and geometric objects corresponding to the source geometry modeling engine in the target geometry modeling engine; maintaining boundary representation (BREP) hierarchical relationships between topology objects, geometric objects and topologies and geometric objects respectively; first creating a Body in the target geometry modeling engine, and then matching Edges under the Body with Edges of the target geometry modeling engine; The conversion of the relevant interfaces of the source geometry modeling engine to the corresponding relevant interfaces of the target geometry modeling engine comprises: converting algorithm layer interfaces of the source geometry modeling engine to algorithm layer interfaces of the target geometry modeling engine; if the source geometry modeling engine lacks relevant interfaces, selecting a replacement mode in the target geometry modeling engine to realize the functions of the missing relevant interfaces of the source geometry modeling engine; and converting interfaces of the source geometry modeling engine based on a first programming paradigm to interfaces of the target geometry modeling engine based on a second programming paradigm; the first programming paradigm is procedural programming, and the second programming paradigm is object-oriented programming; the conversion of the interfaces of the source geometry modeling engine based on the first programming paradigm to the interfaces of the target geometry modeling engine based on the second programming paradigm comprises: determining classes, objects, and methods and object properties of each class required by the target geometry modeling engine based on the object-oriented programming; converting functions in the source geometry modeling engine based on the procedural programming to methods of the classes; and encapsulating data structures in the source geometry modeling engine based on the procedural programming into properties of the objects.

2. The method of claim 1, wherein the interface data processing method of the heterogeneous geometry modeling engine is characterized by, The conversion of the local coordinate system in the source geometry modeling engine to the local coordinate system in the target geometry modeling engine comprises: Calculating a displacement vector from an origin of the local coordinate system in the source geometry modeling engine to an origin of the local coordinate system in the target geometry modeling engine; Adding a sum value obtained by adding the displacement vector to coordinates of a target geometric body in the local coordinate system in the source geometry modeling engine as coordinates of the geometric body in the local coordinate system in the target geometry modeling engine.

3. The method of claim 1, wherein the interface data processing method of the heterogeneous geometry modeling engine is characterized by, The conversion of the algorithm layer interfaces of the source geometry modeling engine to the algorithm layer interfaces of the target geometry modeling engine comprises: Converting input parameter data of the source geometry modeling engine to input parameter data of the target geometry modeling engine; Passing the converted input parameter data to the interfaces of the target geometry modeling engine by calling the interfaces of the target geometry modeling engine; Converting a type of output parameter data of the target geometry modeling engine to a data type supported by the source geometry modeling engine.

4. The interface data processing method of the heterogeneous geometry modeling engine according to any one of claims 1 to 3, characterized in that, The method further comprises: converting internal native data types in the source geometry modeling engine to internal native data types in the target geometry modeling engine; and converting a global coordinate system and its bounding box of the source geometry modeling engine to a global coordinate system and its bounding box of the target geometry modeling engine.

5. An interface data processing apparatus of a heterogeneous geometry modeling engine, characterized in that, The apparatus comprises: a first conversion module configured to convert a local coordinate system in the source geometry modeling engine to a local coordinate system in the target geometry modeling engine; a matching module configured to match corresponding topologies, geometric structures and their relationships between the target geometry modeling engine and the source geometry modeling engine; and a second conversion module configured to implement conversion of related interfaces of the source geometry modeling engine to corresponding related interfaces of the target geometry modeling engine. The matching of the corresponding topologies, geometric structures and their relationships between the target geometry modeling engine and the source geometry modeling engine comprises: creating corresponding topologies and geometric objects in the target geometry modeling engine as those in the source geometry modeling engine; maintaining boundary representation (BREP) hierarchical relationships between topology objects, geometric objects and between topologies and geometric objects respectively; creating a Body first and then matching Edges under the Body to Edges of the target geometry modeling engine on the target geometry modeling engine. The implementation of the conversion of the related interfaces of the source geometry modeling engine to the corresponding related interfaces of the target geometry modeling engine comprises: implementing conversion of algorithm layer interfaces of the source geometry modeling engine to algorithm layer interfaces of the target geometry modeling engine; if the source geometry modeling engine lacks related interfaces, then selecting a replacement mode in the target geometry modeling engine to implement functions of the related interfaces that are missing in the source geometry modeling engine; and converting interfaces of the source geometry modeling engine based on a first programming paradigm to interfaces of the target geometry modeling engine based on a second programming paradigm; the first programming paradigm is procedural programming, and the second programming paradigm is object-oriented programming; the conversion of the interfaces of the source geometry modeling engine based on the first programming paradigm to the interfaces of the target geometry modeling engine based on the second programming paradigm comprises: determining classes, objects, and properties of methods and objects of each class that are needed by the target geometry modeling engine based on the object-oriented programming; converting functions in the source geometry modeling engine based on the procedural programming to methods of the classes; and encapsulating data structures in the source geometry modeling engine based on the procedural programming into properties of the objects.

6. An electronic device, the device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor implements the steps of the method of any one of claims 1 to 4 when executing the computer program.

7. A storage medium storing a computer program, characterized by The computer program, when executed by the processor, implements the steps of the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Heterogeneous model transformation method based on unified modeling environment

    CN104484163A

  • Modeling Concrete Structures

    US20130275092A1