Model conversion method and device, electronic equipment and storage medium
By acquiring and processing the pending data of the geometric model, creating adaptive sub-models and changing attribute parameters, the data compatibility problem of the multi-body constraint system model is solved, and the accuracy and reliability of simulation results are improved.
Patent Information
- Application Number
- CN202510371977.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-07-11
AI Technical Summary
In the prior art, the multi-body constraint system model due to the differences in different modeling software has data compatibility problems and accuracy losses during joint simulation, which affects the accuracy and reliability of the simulation results.
By obtaining the pending data of the geometric model with motion constraint relationships, determining the relative position constraint information, creating an adapted rigid body submodel and motion auxiliary submodel, and changing the attribute parameters, a system simulation model suitable for the target model platform is generated.
The automatic conversion of geometric model into a multi-body constraint system simulation model is realized, which avoids data differences and improves the accuracy and reliability of simulation results.
Smart Images

Figure CN120296818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a model conversion method, apparatus, electronic device, and storage medium. Background Art
[0002] With the improvement of user requirements and the development of technology, many single mechanical products have evolved into complex products integrating machinery, electronics, hydraulics, and control. For the design of complex products, a system modeling and simulation platform, for example, a modeling and simulation platform based on the Modelica language, can meet complex design requirements, and through the system modeling and simulation platform, visual unified modeling of multi-domain physical systems in engineering practice can be achieved.
[0003] For a system model with complex functions, it often involves multi-body modeling with motion constraint relationships. Currently, different functional components in the system model can use different modeling and simulation software (such as multi-rigid-body system dynamics simulation software, control system design software, etc.) to construct corresponding sub-models. When simulating the system model, different sub-models constructed by different software are connected through established interfaces to share data and achieve co-simulation.
[0004] However, in the above multi-body constraint modeling and simulation method, due to the use of multiple different modeling software during modeling, there are compatibility problems caused by data differences; in addition, when transferring interface data between sub-models constructed by different software during the co-simulation of the system model, accuracy may be lost, resulting in technical problems of poor accuracy and reliability of the simulation results of the multi-body constraint system model. Summary of the Invention
[0005] The present invention provides a model conversion method, apparatus, electronic device, and storage medium to automatically convert a geometric model with motion constraint relationships into a multi-body constraint system simulation model. Through model conversion processing, the problem of data differences in the model is avoided, and data transmission errors during the co-simulation of the multi-body constraint system model are circumvented, providing a data basis for improving the accuracy and reliability of the simulation results of the multi-body constraint system model.
[0006] In a first aspect, an embodiment of the present invention provides a model conversion method, which includes:
[0007] In response to a first trigger operation, obtain to-be-processed model data corresponding to the to-be-converted geometric model; wherein, the to-be-converted geometric model includes a first geometric model and a second geometric model with motion constraint relationships, the to-be-processed model data includes the first centroid coordinates corresponding to the first geometric model, the second centroid coordinates corresponding to the second geometric model, and the motion constraint information between the two geometric models, and the motion constraint information includes a motion constraint type, direction constraint information, and the target three-dimensional coordinates corresponding to the constraint action point;
[0008] Determine relative position constraint information corresponding to the first geometric model and the second geometric model based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinate corresponding to the constraint action point;
[0009] In response to a second trigger operation for creating a system simulation model, create a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the kinematic constraint type;
[0010] Perform a change process on the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model based on the direction constraint information and the relative position constraint information to obtain a first target translational connection sub-model, a second target translational connection sub-model, and a target kinematic pair sub-model;
[0011] Generate a target system simulation model applicable to a target model platform based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model.
[0012] In a second aspect, an embodiment of the present invention further provides a model conversion device, and the device includes:
[0013] A model data acquisition module, configured to acquire to-be-processed model data corresponding to a geometric model to be converted in response to a first trigger operation; wherein, the geometric model to be converted includes a first geometric model and a second geometric model having a kinematic constraint relationship, and the to-be-processed model data includes a first centroid coordinate corresponding to the first geometric model, a second centroid coordinate corresponding to the second geometric model, and kinematic constraint information between the two geometric models, and the kinematic constraint information includes a kinematic constraint type, direction constraint information, and a target three-dimensional coordinate corresponding to a constraint action point;
[0014] A relative position determination module, configured to determine relative position constraint information corresponding to the first geometric model and the second geometric model based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinate corresponding to the constraint action point;
[0015] A sub-model creation module, configured to create a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the kinematic constraint type in response to a second trigger operation for creating a system simulation model;
[0016] An attribute parameter change module, configured to perform change processing on the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model based on the direction constraint information and the relative position constraint information, to obtain a first target translational connection sub-model, a second target translational connection sub-model, and a target kinematic pair sub-model;
[0017] A target model determination module, configured to generate a target system simulation model applicable to a target model platform based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model.
[0018] In a third aspect, an embodiment of the present invention further provides an electronic device, which includes:
[0019] One or more processors;
[0020] A storage device, configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the model conversion method according to any one of the embodiments of the present invention.
[0021] In a fourth aspect, an embodiment of the present invention further provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute the model conversion method according to any one of the embodiments of the present invention when executed by a computer processor.
[0022] In the technical solution of the embodiment of the present invention, by obtaining the to-be-processed model data of the first geometric model and the second geometric model with a motion constraint relationship, where the to-be-processed model data includes the first centroid coordinate corresponding to the first geometric model, the second centroid coordinate corresponding to the second geometric model, and the motion constraint information between the two geometric models, and the motion constraint information includes the motion constraint type, the direction constraint information, and the target three-dimensional coordinates corresponding to the constraint action point. Further, based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinates, the relative position constraint information corresponding to the first geometric model and the second geometric model is determined. Furthermore, in response to the model creation trigger operation, a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the motion constraint type are created. Further, based on the direction constraint information and the relative position constraint information, the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model are processed to obtain a first target translational connection sub-model, a second target translational connection sub-model, and a target kinematic pair sub-model. Thus, based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model, a target system simulation model applicable to the target model platform is generated. The technical solution provided in this embodiment realizes the automatic conversion of geometric models with a motion constraint relationship into a multi-body constraint system simulation model. Through model conversion processing, the problem of model data difference is avoided, thereby avoiding data transmission errors during the co-simulation of multi-body constraint system models, and providing a data basis for improving the accuracy and reliability of the simulation results of multi-body constraint system models. Brief Description of the Drawings
[0023] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the introduced drawings are only the drawings of a part of the embodiments to be described by the present invention, rather than all the drawings. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0024] Figure 1 It is a flowchart showing a model conversion method provided by an embodiment of the present invention;
[0025] Figure 2 It is a schematic diagram showing the data content included in the to-be-processed model data corresponding to the geometric model to be converted involved in an embodiment of the present invention;
[0026] Figure 3 It is a schematic diagram showing the relative position constraint information corresponding to the first geometric model and the second geometric model involved in an embodiment of the present invention;
[0027] Figure 4 Schematic diagrams of the BodyShape component and the FixedTranslation component involved in the embodiments of the present invention;
[0028] Figure 5 Schematic diagram of the Revolute component involved in the embodiments of the present invention;
[0029] Figure 6 Schematic diagrams of each sub-model created in the embodiments of the present invention;
[0030] Figure 7 Schematic diagram of the implementation process for determining the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model involved in the embodiments of the present invention;
[0031] Figure 8 Schematic diagram of the target system simulation model involved in the embodiments of the present invention;
[0032] Figure 9 Schematic diagram of the process of another model conversion method provided in the embodiments of the present invention;
[0033] Figure 10 Schematic diagram of the structure of a model conversion device provided in the embodiments of the present invention;
[0034] Figure 11 Schematic diagram of the structure of an electronic device provided in the embodiments of the present invention. Detailed implementation manners
[0035] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. Additionally, it should be noted that for the sake of description, only parts related to the present invention are shown in the drawings, rather than all the structures.
[0036] Embodiment 1
[0037] Figure 1 Schematic diagram of the process of a model conversion method provided in the embodiments of the present invention. This embodiment is applicable to any situation where a geometric model with kinematic constraint relationships needs to be converted into a system simulation model. This method can be executed by a model conversion device, which can be implemented in the form of software and / or hardware. The hardware can be an electronic device, such as a mobile terminal, a PC, or a server, etc.
[0038] As Figure 1 shown, the model conversion method includes:
[0039] S110. In response to a first triggering operation, obtain the to-be-processed model data corresponding to the geometric model to be converted.
[0040] Among them, the first triggering operation is an operation to perform model conversion processing on the geometric model to be converted. The geometric model to be converted is a three-dimensional mechanical model on which model conversion processing will be performed. Specifically, the geometric model to be converted includes a first geometric model and a second geometric model with motion constraint relationships, that is, any two geometric models with motion constraint relationships can be used as the geometric model to be converted. The motion constraint relationship refers to the restrictive conditions that two geometric models are subject to during the motion process, and these conditions determine their relative motion modes. For example, the motion constraint relationship can include fixed constraint relationships, translational constraint relationships, rotational constraint relationships, etc. The geometric model to be converted is edited on a model platform with three-dimensional model editing and visualization display.
[0041] Among them, the to-be-processed model data is the data representation corresponding to the geometric model to be converted. More specifically, the to-be-processed model data includes the first centroid coordinates corresponding to the first geometric model, the second centroid coordinates corresponding to the second geometric model, and the motion constraint information between the two geometric models. The motion constraint information includes the motion constraint type, direction constraint information, and the target three-dimensional coordinates corresponding to the constraint action point. The first centroid coordinates refer to the position coordinates of the mass center of the first geometric model in the world reference coordinate system. The second centroid coordinates refer to the position coordinates of the mass center of the second geometric model in the world reference coordinate system. The motion constraint information refers to the restrictive information imposed on the relative motion between rigid bodies in a multi-body system dynamics. In this embodiment, the motion constraint information includes the motion constraint type, direction constraint information, and the target three-dimensional coordinates corresponding to the constraint action point. The motion constraint type represents the relative motion type between rigid bodies. For example, the motion constraint type can include, but is not limited to, fixed constraint type, rotational constraint type, translational constraint type, cylindrical constraint type, spherical constraint type, universal joint constraint type, helical constraint type, etc. The direction constraint information represents the direction limit of the relative motion between rigid bodies, and the direction constraint information can be characterized by a direction vector. The target three-dimensional coordinates corresponding to the constraint action point refer to the three-dimensional spatial coordinates of the action point of the motion constraint on the rigid body.
[0042] It is understandable that the model data to be processed is the data content generated during the design stage of the geometric model to be converted. These model data to be processed have been stored in a preset storage space. When it is necessary to perform model conversion processing on the geometric model to be converted, the corresponding model data to be processed can be obtained from the preset storage space. In the specific application process, the data format and data specifications of the model data to be processed can be preset. For example, the data format of the model data to be processed is set as a JSON data structure, and the data specifications stipulate that the model data to be processed should at least include the first centroid coordinates corresponding to the first geometric model, the second centroid coordinates corresponding to the second geometric model, the type of motion constraint, the direction constraint information, and the target three-dimensional coordinates corresponding to the constraint application point between the two geometric models. Based on this, when designing the geometric model to be converted, the corresponding model data to be processed can be generated synchronously.
[0043] Exemplarily, for the schematic diagram of the data content included in the model data to be processed corresponding to the geometric model to be converted, see Figure 2 , Figure 2 The text content in the first rectangular box in represents the first centroid coordinates corresponding to the first geometric model and the second centroid coordinates corresponding to the second geometric model; the text content in the second rectangular box represents the type of motion constraint; the text content in the third rectangular box represents the target three-dimensional coordinates corresponding to the constraint application point; the text content in the fourth rectangular box represents the direction constraint information. Figure 2 In, "Marker" represents a frame, and "Part" represents a rigid body (i.e., the first geometric model and the second geometric model). Optionally, the direction constraint information and the target three-dimensional coordinates corresponding to the constraint application point can be represented in the form of a frame. A frame is a body-fixed coordinate system fixed on a rigid body and has position information and attitude information. The position information is the absolute position, represented by the Cartesian coordinate system space coordinates, with the unit of meter (m); the attitude information is represented by Euler angles, with the unit of degree (°). A kinematic pair contains two frames: i_marker and j_marker. j_marker is referenced from i_marker, and their coordinate attributes are the same, respectively describing the application points of the constraint on the two rigid bodies, that is, the two application points coincide.
[0044] In this embodiment, the model conversion method can be integrated into a target conversion tool, and the target conversion tool can be added to the target model platform. The first trigger operation can include the operation of opening the target conversion tool and the operation of obtaining the to-be-processed model data corresponding to the to-be-converted geometric model. For example, when the user clicks the start control of the target conversion tool in the target model platform, at this time, in response to the operation of opening the target conversion tool, the main page of the target conversion tool can be entered. The main page can include a target control pre-set for obtaining the to-be-processed model data corresponding to the to-be-converted geometric model. Further, when the user triggers the target control, the to-be-converted geometric model can be generated, and the to-be-processed model data corresponding to the to-be-converted geometric model can be obtained, or the to-be-processed model data of the to-be-converted geometric model can be obtained from the preset storage space.
[0045] Specifically, the specific implementation method for obtaining the to-be-processed model data corresponding to the to-be-converted geometric model can include: in response to the trigger operation of the target conversion tool in the target model platform, obtaining the to-be-processed model data corresponding to the to-be-converted geometric model edited in the first model platform.
[0046] Among them, the first model platform refers to a software platform that can perform three-dimensional model editing and visual display. The target model platform refers to a software platform that can perform system simulation three-dimensional model editing and visual display. In addition, the target model platform can also perform system simulation on the three-dimensional model and simulate the state evolution of the dynamic behavior of the simulation three-dimensional model. In this embodiment, the model conversion method provided in this embodiment can be integrated into a component, and such a component can be called a target conversion tool. In this way, the model conversion method can be efficiently reused without the complex operation process of the user, and the to-be-converted geometric model can be converted into a target system simulation model suitable for the target model platform through a simple click trigger operation.
[0047] Specifically, the target conversion tool integrated with the model conversion method can be added to the target model platform, and an icon control corresponding to the target conversion tool can be displayed on the display page of the target model platform. When the user triggers the icon control corresponding to the target conversion tool in the target model platform, the target conversion tool is in an enabled state at this time. Further, the user can enter the main page of the target conversion tool. The main page can include a target control pre-set for obtaining the to-be-processed model data corresponding to the to-be-converted geometric model. When the user triggers the target control, the to-be-processed model data corresponding to the to-be-converted geometric model can be retrieved from the first model platform and displayed on the current display page. Thus, the to-be-processed model data can be added to the target conversion tool, and the target conversion tool processes the to-be-processed model data according to the internally integrated model conversion method to obtain a target system simulation model suitable for the target model platform.
[0048] S120. Determine the relative position constraint information corresponding to the first geometric model and the second geometric model based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinate corresponding to the constraint action point.
[0049] Among them, the relative position constraint information represents the relative position between the centroid of the geometric model and the constraint action point. The relative position constraint information can be characterized by the relative offset coordinate value between the rigid body centroid coordinate and the target three-dimensional coordinate corresponding to the constraint action point.
[0050] Specifically, the first relative position constraint information corresponding to the first geometric model can be determined according to the first centroid coordinate and the target three-dimensional coordinate corresponding to the constraint action point; the second relative position constraint information corresponding to the second geometric model can be determined according to the second centroid coordinate and the target three-dimensional coordinate corresponding to the constraint action point.
[0051] Optionally, the specific implementation method for determining the relative position constraint information corresponding to the first geometric model and the second geometric model may include: determining the first offset coordinate based on the target three-dimensional coordinate corresponding to the constraint action point and the first centroid coordinate, and determining the first offset coordinate as the first relative position constraint information corresponding to the first geometric model; determining the second offset coordinate based on the target three-dimensional coordinate corresponding to the constraint action point and the second centroid coordinate, and determining the second offset coordinate as the second relative position constraint information corresponding to the second geometric model.
[0052] In this embodiment, the relative position constraint information includes the first relative position constraint information corresponding to the first geometric model and the second relative position constraint information corresponding to the second geometric model. In the specific implementation process, for the schematic diagram of the relative position constraint information corresponding to the first geometric model and the second geometric model, see Figure 3 . As Figure 3 shown, the target three-dimensional coordinate can be expressed as (x0, y0, z0), the first centroid coordinate corresponding to the first geometric model can be expressed as (x1, y1, z1), the second centroid coordinate corresponding to the second geometric model can be expressed as (x2, y2, z2), the first offset coordinate can be expressed as (x0 - x1, y0 - y1, z0 - z1); the second offset coordinate can be expressed as (x2 - x0, y2 - y0, z2 - z0). Based on this, the first relative position constraint information corresponding to the first geometric model is (x0 - x1, y0 - y1, z0 - z1), and the second relative position constraint information corresponding to the second geometric model is (x2 - x0, y2 - y0, z2 - z0).
[0053] S130. In response to a second triggering operation for creating a system simulation model, create a first rigid body sub-model corresponding to the first geometric model, a first translational connection sub-model, a second rigid body sub-model corresponding to the second geometric model, a second translational connection sub-model, and a kinematic pair sub-model adapted to the type of motion constraint.
[0054] Among them, the second triggering operation is an operation for creating an initial system simulation model. The first rigid body sub-model is a rigid body sub-model corresponding to the first geometric model. The second rigid body sub-model is a rigid body sub-model corresponding to the second geometric model. The rigid body sub-model is a standard rigid body component in the Modelica language system. The first translational connection sub-model is a translational connection sub-model used to represent the relative position relationship between the first geometric model and the position where the motion constraint is applied (i.e., the constraint action point). The second translational connection sub-model is a translational connection sub-model used to represent the relative position relationship between the second geometric model and the position where the motion constraint is applied. The translational connection sub-model is a standard translational connection component in the Modelica language system. The translational connection component is mainly responsible for encapsulating the relative position relationship between 3D models. The attribute information in the translational connection sub-model is the default value. The kinematic pair sub-model is a standard kinematic pair component in the Modelica language system. The standard kinematic pair component is mainly responsible for encapsulating the direction information of the motion constraint of the 3D model. The attribute information in the kinematic pair sub-model is the default value. For example, the standard kinematic pair component can include a fixed pair component, a revolute pair component, a prismatic pair component, a cylindrical pair component, a spherical pair component, a universal joint pair component, a screw pair, or a planar pair component, etc. Different types of kinematic pairs correspond to different types of motion constraints.
[0055] For example, the rigid body component is a mechanical multi-body component in the mechanical multi-body standard model library: Modelica.Mechanics.MultiBody.Parts.BodyShape component. The translational connection component is a mechanical multi-body component in the mechanical multi-body standard model library component: Modelica.Mechanics.MultiBody.Parts.FixedTranslation component. For the schematic diagrams of the BodyShape component and the FixedTranslation component, see Figure 4 , such as Figure 4 shown. The BodyShape component has parameters such as the physical properties of a rigid body, such as mass m, moment of inertia I, etc. The FixedTranslation component has a main parameter r. r is a relative position vector, indicating that there is a relative position offset between the elements connected at both ends of this component. Taking the revolute pair as the kinematic pair as an example, the revolute pair sub-model can be represented by the Modelica.Mechanics.MultiBody.Joints.Revolute component in the mechanical multi-body standard model library. For the schematic diagram of the Revolute component, seeFigure 5 , as Figure 5 shown, Revolute has two connection ports frame_a and frame_b, with a main parameter n, where n is the direction vector of the rotation axis, representing the direction of the revolute pair relative to port frame_a. Since the local coordinate system of the rigid body is in the same direction as the world coordinate system, therefore, the direction of the constraint relative to the rigid body is the direction relative to the world coordinate system, that is, the absolute direction. After taking the Z-axis direction of i_marker (or j_marker), it can be directly written into the parameter n of the Revolute component.
[0056] In this embodiment, the user can click on the creation control for the system simulation model in the target model platform. At this time, according to the model data to be processed corresponding to the geometric model to be converted, the first rigid body sub-model and the first translational connection sub-model corresponding to the first geometric model, the second rigid body sub-model and the second translational connection sub-model corresponding to the second geometric model, and the kinematic pair sub-model adapted to the type of motion constraint can be automatically created. In addition, the user can click on the first model creation control for creating a standard rigid body component in the target model platform. At this time, the first rigid body sub-model corresponding to the first geometric model and the second rigid body sub-model corresponding to the second geometric model can be created; in the same way, the user can also click on the second model creation control for creating a standard translational connection component in the target model platform. At this time, the first translational connection sub-model corresponding to the first geometric model and the second translational connection sub-model corresponding to the second geometric model can be created; in the same way, the user can also click on the third model creation control for creating a kinematic pair component in the target model platform. At this time, the kinematic pair sub-model adapted to the type of motion constraint can be created.
[0057] Exemplarily, the schematic diagrams of the created sub-models are shown in Figure 6 . Figure 6 Schematic diagrams of the first rigid body sub-model, the first translational connection sub-model, the second rigid body sub-model, the second translational connection sub-model, and the kinematic pair sub-model (taking the revolute pair as an example) adapted to the type of motion constraint.
[0058] S140. Modify the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model based on the direction constraint information and the relative position constraint information to obtain the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model.
[0059] Specifically, the schematic diagram of the implementation process for determining the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model is shown in Figure 7 , as Figure 7As shown in the figure, the attribute parameters of the first translational connection sub-model are processed by changing them according to the first relative position constraint information corresponding to the first geometric model, obtaining the first target translational connection sub-model; the attribute parameters of the second translational connection sub-model are processed by changing them according to the second relative position constraint information corresponding to the second geometric model, obtaining the second target translational connection sub-model; the attribute parameters of the kinematic pair sub-model are processed by changing them according to the direction constraint information, obtaining the target kinematic pair sub-model.
[0060] On the basis of the above example, the example table of the relevant parameters after changing the rotational pair sub-model is shown in Table 1; the example table of the relevant parameters after changing the first translational connection sub-model is shown in Table 2; the example table of the relevant parameters after changing the second translational connection sub-model is shown in Table 3.
[0061] Table 1 Example table of relevant parameters after changing the rotational pair sub-model
[0062] Parameter Name Description Parameter Value Example n Direction Vector of the Rotation Axis (0,0,-90)
[0063] Table 2 Example table of relevant parameters after changing the first translational connection sub-model
[0064] Parameter Name Description Parameter Value Example r1 Relative Position Vector (x0 - x1, y0 - y1, z0 - z1)
[0065] Table 3 Example table of relevant parameters after changing the second translational connection sub-model
[0066] Parameter Name Description Parameter Value Example r2 Relative Position Vector (x2 - x0, y2 - y0, z2 - z0)
[0067] S150. Based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model, a target system simulation model applicable to the target model platform is generated.
[0068] Among them, the target system simulation model is the finally generated multi-body system constraint model that can be edited, operated, displayed, and analyzed in the state space on the target model platform. Optionally, the target system simulation model is a Modelica system simulation model.
[0069] Optionally, the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model are sequentially connected in order to obtain a target system simulation model applicable to the target model platform.
[0070] In this embodiment, after the parameter change process is completed, the changed first target translational connection sub-model, second target translational connection sub-model, and target kinematic pair sub-model can be obtained. Further, by sequentially connecting the first rigid body sub-model, first target translational connection sub-model, target kinematic pair sub-model, second target translational connection sub-model, and second rigid body sub-model in sequence, a target system simulation model that can perform system simulation on the target model platform is obtained. Based on the above example, for the schematic diagram of the target system simulation model, see Figure 8 , such as Figure 8 shown, the target system simulation model can be obtained by binding each sub-model through connection lines.
[0071] The technical solution of the embodiment of the present invention is to obtain the to-be-processed model data of the first geometric model and the second geometric model with kinematic constraint relationships. Among them, the to-be-processed model data includes the first centroid coordinates corresponding to the first geometric model, the second centroid coordinates corresponding to the second geometric model, and the kinematic constraint information between the two geometric models. The kinematic constraint information includes the kinematic constraint type, direction constraint information, and the target three-dimensional coordinates corresponding to the constraint action point. Further, based on the first centroid coordinates, the second centroid coordinates, and the target three-dimensional coordinates, the relative position constraint information corresponding to the first geometric model and the second geometric model is determined. Furthermore, in response to the model creation trigger operation, a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the kinematic constraint type are created. Further, based on the direction constraint information and the relative position constraint information, the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model are changed to obtain the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model. Thus, based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model, a target system simulation model applicable to the target model platform is generated. The technical solution provided in this embodiment realizes the automatic conversion of geometric models with kinematic constraint relationships into multi-body constraint system simulation models. Through the model conversion process, the problem of model data differences is avoided, thereby avoiding data transmission errors during the co-simulation of multi-body constraint system models, and providing a data basis for improving the accuracy and reliability of the simulation results of multi-body constraint system models.
[0072] Embodiment 2
[0073] Figure 9A schematic diagram of a model conversion method provided by an embodiment of the present invention. On the basis of the foregoing embodiment, S140 is further refined, and its specific implementation manner can refer to the technical solution of this embodiment. Among them, the same or corresponding technical terms as those in the above embodiment will not be described in detail here.
[0074] As Figure 9 shown, the method specifically includes the following steps:
[0075] S210. In response to a first trigger operation, obtain the to-be-processed model data corresponding to the geometric model to be converted.
[0076] Among them, the geometric model to be converted includes a first geometric model and a second geometric model with a motion constraint relationship. The to-be-processed model data includes the first centroid coordinates corresponding to the first geometric model, the second centroid coordinates corresponding to the second geometric model, and the motion constraint information between the two geometric models. The motion constraint information includes the motion constraint type, direction constraint information, and the target three-dimensional coordinates corresponding to the constraint application point.
[0077] S220. Based on the first centroid coordinates, the second centroid coordinates, and the target three-dimensional coordinates corresponding to the constraint application point, determine the relative position constraint information corresponding to the first geometric model and the second geometric model.
[0078] S230. In response to a second trigger operation for creating a system simulation model, create a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the motion constraint type.
[0079] S240. Based on the direction constraint information, perform a change process on the first attribute parameter of the kinematic pair sub-model to obtain a target kinematic pair sub-model.
[0080] Among them, the first attribute parameter is the default attribute parameter corresponding to the kinematic pair sub-model. Specifically,
[0081] The first attribute parameter includes a direction vector attribute parameter.
[0082] Optionally, the specific implementation steps for performing a change process on the first attribute parameter of the kinematic pair sub-model based on the direction constraint information to obtain a target kinematic pair sub-model may include:
[0083] S2401. Obtain the kinematic pair attribute script corresponding to the kinematic pair sub-model.
[0084] Among them, the kinematic pair attribute script refers to a script including all attribute parameters of the kinematic pair sub-model.
[0085] In this embodiment, when constructing a kinematic pair sub-model in the target model platform, a kinematic pair attribute script corresponding to the kinematic pair sub-model can be created simultaneously. Therefore, it is easy to obtain the kinematic pair attribute script.
[0086] S2402. Modify the content of the first field corresponding to the direction vector attribute parameter in the kinematic pair attribute script based on the direction constraint information to obtain the target kinematic pair attribute script.
[0087] Based on the above embodiment, the kinematic pair attribute script includes the content of the first field corresponding to the direction vector attribute parameter. Based on this, the content of the first field can be modified to the direction constraint information, and the modified kinematic pair attribute script is the target kinematic pair attribute script.
[0088] S2403. Determine the target kinematic pair sub-model based on the target kinematic pair attribute script.
[0089] In this embodiment, based on the obtained target kinematic pair attribute script, the attribute parameters in the kinematic pair sub-model have been modified. At this time, the target kinematic pair attribute script corresponds to the target kinematic pair sub-model.
[0090] S250. Modify the attribute parameters of the first translational connection sub-model and the second translational connection sub-model based on the relative position constraint information to obtain the first target translational connection sub-model and the second target translational connection sub-model.
[0091] Optionally, the specific implementation steps for determining the first target translational connection sub-model and the second target translational connection sub-model may include:
[0092] S2501. Obtain the first translational attribute script corresponding to the first translational connection sub-model and the second translational attribute script corresponding to the second translational connection sub-model.
[0093] Herein, the translational attribute script refers to the script information including all the attribute parameters of the translational connection sub-model.
[0094] In this embodiment, when creating the first translational connection sub-model and the second translational connection sub-model in the target model platform, the first translational attribute script corresponding to the first translational connection sub-model and the second translational attribute script corresponding to the second translational connection sub-model can be created simultaneously. Therefore, it is easy to obtain the first translational attribute script and the second translational attribute script.
[0095] S2502. Modify the content of the second field corresponding to the relative position vector attribute parameter in the first translational attribute script based on the first relative position constraint information to obtain the first target translational connection sub-model.
[0096] Based on the above embodiments, the first translation attribute script includes the content of the second field corresponding to the relative position vector attribute parameter. Based on this, the content of the second field can be modified to the first relative position constraint information, and the modified first translation attribute script is the target first translation attribute script. At this time, the target first translation attribute script corresponds to the first target translation connection sub-model.
[0097] S2503. Modify the content of the third field corresponding to the relative position vector attribute parameter in the second translation attribute script based on the second relative position constraint information to obtain the second target translation connection sub-model.
[0098] Based on the above embodiments, the second translation attribute script includes the content of the third field corresponding to the relative position vector attribute parameter. Based on this, the content of the third field can be modified to the second relative position constraint information, and the modified second translation attribute script is the target second translation attribute script. At this time, the target second translation attribute script corresponds to the second target translation connection sub-model.
[0099] S260. Generate for the target model platform based on the first rigid body sub-model, the second rigid body sub-model, the first target translation connection sub-model, the second target translation connection sub-model, and the target kinematic pair sub-model.
[0100] In the technical solution of the embodiment of the present invention, when determining the first target translation connection sub-model, the second target translation connection sub-model, and the target kinematic pair sub-model, by changing the attribute parameters of the kinematic pair sub-model based on the direction constraint information, the target kinematic pair sub-model is obtained; based on the relative position constraint information, the attribute parameters of the first translation connection sub-model and the second translation connection sub-model are changed to obtain the first target translation connection sub-model and the second target translation connection sub-model. The technical solution of this embodiment can, based on obtaining the motion constraint information, change the parameters of the script of the system simulation standard model according to the motion constraint information, obtain a multi-body system constraint model, simplify the operation process of multi-body system constraint modeling, improve the modeling efficiency, and improve the reliability of the multi-body system constraint model.
[0101] Embodiment Three
[0102] Figure 10 It is a schematic structural diagram of a model conversion device provided by an embodiment of the present invention. The device includes: a model data acquisition module 310, a relative position determination module 320, a sub-model construction module 330, an attribute parameter change module 340, and a target model determination module 350.
[0103] Among them, the model data acquisition module 310 is configured to obtain the to-be-processed model data corresponding to the geometric model to be converted in response to a first trigger operation. Among them, the geometric model to be converted includes a first geometric model and a second geometric model with a motion constraint relationship. The to-be-processed model data includes the first centroid coordinate corresponding to the first geometric model, the second centroid coordinate corresponding to the second geometric model, and the motion constraint information between the two geometric models. The motion constraint information includes the motion constraint type, the direction constraint information, and the target three-dimensional coordinates corresponding to the constraint application point.
[0104] The relative position determination module 320 is configured to determine the relative position constraint information corresponding to the first geometric model and the second geometric model based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinates.
[0105] The sub-model creation module 330 is configured to create a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the motion constraint type in response to a second trigger operation for creating a system simulation model.
[0106] The attribute parameter change module 340 is configured to perform a change process on the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model based on the direction constraint information and the relative position constraint information to obtain a first target translational connection sub-model, a second target translational connection sub-model, and a target kinematic pair sub-model.
[0107] The target model determination module 350 is configured to generate a target system simulation model applicable to the target model platform based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model.
[0108] Based on the above device, optionally, the model data acquisition module 310 is specifically configured to obtain the to-be-processed model data corresponding to the geometric model to be converted edited in the first model platform in response to a trigger operation for triggering a target conversion tool in the target model platform.
[0109] Based on the above device, optionally, the relative position determination module 320 is specifically configured to determine a first offset coordinate based on the target three-dimensional coordinates corresponding to the constraint application point and the first centroid coordinate, and determine the first offset coordinate as the first relative position constraint information corresponding to the first geometric model; determine a second offset coordinate based on the target three-dimensional coordinates corresponding to the constraint application point and the second centroid coordinate, and determine the second offset coordinate as the second relative position constraint information corresponding to the second geometric model.
[0110] Based on the above device, optionally, the attribute parameter change module 330 includes:
[0111] A direction parameter change unit, configured to perform a change process on the first attribute parameter of the kinematic pair sub-model based on the direction constraint information to obtain a target kinematic pair sub-model;
[0112] A position parameter change unit, configured to perform a change process on the attribute parameters of the first translational connection sub-model and the second translational connection sub-model based on the relative position constraint information to obtain a first target translational connection sub-model and a second target translational connection sub-model.
[0113] Based on the above device, optionally, the direction parameter change unit includes:
[0114] A kinematic pair script acquisition subunit, configured to acquire a kinematic pair attribute script corresponding to the kinematic pair sub-model;
[0115] A kinematic pair script change subunit, configured to change the content of the first field corresponding to the direction vector attribute parameter in the kinematic pair attribute script based on the direction constraint information to obtain a target kinematic pair attribute script;
[0116] A kinematic pair model determination subunit, configured to determine a target kinematic pair sub-model based on the target kinematic pair attribute script.
[0117] Based on the above device, optionally, the position parameter change unit includes:
[0118] A translational attribute script acquisition subunit, configured to acquire a first translational attribute script corresponding to the first translational connection sub-model and a second translational attribute script corresponding to the second translational connection sub-model;
[0119] A first translational script change subunit, configured to change the content of the second field corresponding to the relative position vector attribute parameter in the first translational attribute script based on the first relative position constraint information to obtain a first target translational connection sub-model;
[0120] A second translational script change subunit, configured to change the content of the third field corresponding to the relative position vector attribute parameter in the second translational attribute script based on the first relative position constraint information to obtain a second target translational connection sub-model.
[0121] The technical solution of the embodiment of the present invention obtains the to-be-processed model data of the first geometric model and the second geometric model with a motion constraint relationship. Among them, the to-be-processed model data includes the first centroid coordinate corresponding to the first geometric model, the second centroid coordinate corresponding to the second geometric model, and the motion constraint information between the two geometric models. The motion constraint information includes the motion constraint type, the direction constraint information, and the target three-dimensional coordinates corresponding to the constraint action point. Further, based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinates, the relative position constraint information corresponding to the first geometric model and the second geometric model is determined. Furthermore, in response to the model creation trigger operation, a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the motion constraint type are created. Further, based on the direction constraint information and the relative position constraint information, the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model are changed to obtain a first target translational connection sub-model, a second target translational connection sub-model, and a target kinematic pair sub-model. Thus, based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model, a target system simulation model applicable to the target model platform is generated. The technical solution provided in this embodiment realizes the automatic conversion of geometric models with a motion constraint relationship into a multi-body constraint system simulation model. Through model conversion processing, the problem of model data differences is avoided, thereby avoiding data transmission errors during the co-simulation of multi-body constraint system models, and providing a data basis for improving the accuracy and reliability of the simulation results of multi-body constraint system models.
[0122] The model conversion device provided by the embodiment of the present invention can execute the model conversion method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0123] It should be noted that the various units and modules included in the above system are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the embodiments of the present invention.
[0124] Embodiment 4
[0125] Figure 11 It is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. Figure 11 The displayed electronic device 40 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention.
[0126] Such as Figure 11As shown, the electronic device 40 is presented in the form of a general-purpose computing device. The components of the electronic device 40 may include, but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 that connects different system components (including the system memory 402 and the processing unit 401).
[0127] The bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus structures. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0128] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.
[0129] The system memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. The electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 406 can be used for reading and writing on non-removable, non-volatile magnetic media ( Figure 11 not shown, commonly referred to as a "hard disk drive"). Although Figure 11 not shown in the figure, a disk drive for reading and writing on removable non-volatile disks (such as a "floppy disk") and an optical disk drive for reading and writing on removable non-volatile optical disks (such as a CD-ROM, DVD-ROM, or other optical media) can be provided. In these cases, each drive can be connected to the bus 403 through one or more data media interfaces. The memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the embodiments of the present invention.
[0130] A program / utilities 408 having a set (at least one) of program modules 407 can be stored, for example, in the memory 402. Such program modules 407 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment. The program modules 407 generally execute the functions and / or methods in the embodiments described in the present invention.
[0131] The electronic device 40 can also communicate with one or more external devices 409 (such as a keyboard, a pointing device, a display 810, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 40, and / or communicate with any device that enables the electronic device 40 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 411. Moreover, the electronic device 40 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 412. As shown in the figure, the network adapter 412 communicates with other modules of the electronic device 40 through the bus 403. It should be understood that although Figure 11 not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 40, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0132] The processing unit 401 executes various functional applications and page processing by running programs stored in the system memory 402, for example, implementing the model conversion method provided by the embodiments of the present invention.
[0133] In particular, according to the embodiments of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present invention include a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the I / O interface 411, or installed from the storage system 406. When the computer program is executed by the processing unit 401, the above-mentioned functions defined in the method of the embodiments of the present invention are executed.
[0134] Embodiment Five
[0135] The embodiments of the present invention also provide a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a model conversion method when executed by a computer processor, including:
[0136] In response to a first trigger operation, obtaining to-be-processed model data corresponding to a to-be-converted geometric model; wherein, the to-be-converted geometric model includes a first geometric model and a second geometric model having a motion constraint relationship, the to-be-processed model data includes a first centroid coordinate corresponding to the first geometric model, a second centroid coordinate corresponding to the second geometric model, and motion constraint information between the two geometric models, and the motion constraint information includes a motion constraint type, direction constraint information, and target three-dimensional coordinates corresponding to a constraint application point;
[0137] Determine relative position constraint information corresponding to the first geometric model and the second geometric model based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinate corresponding to the constraint action point;
[0138] In response to a second trigger operation for creating a system simulation model, create a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the kinematic constraint type;
[0139] Perform a change process on the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model based on the direction constraint information and the relative position constraint information to obtain a first target translational connection sub-model, a second target translational connection sub-model, and a target kinematic pair sub-model;
[0140] Generate a target system simulation model applicable to the target model platform based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model.
[0141] The computer storage medium of the embodiments of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage medium may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0142] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which computer-readable program code is carried. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0143] The program code contained on a computer-readable medium can be transmitted by any appropriate medium, including - but not limited to - wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0144] The computer program code for performing the operations of the embodiments of the present invention can be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages - such as Java, Smalltalk, C++, and also include conventional procedural programming languages - such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network - including a local area network (LAN) or a wide area network (WAN) - or, alternatively, can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).
[0145] Note that the above is only the preferred embodiments of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A model conversion method, characterized in that Including: In response to a first trigger operation, obtain the to-be-processed model data corresponding to the geometric model to be converted; wherein, the geometric model to be converted includes a first geometric model and a second geometric model with a motion constraint relationship, and the to-be-processed model data includes the first centroid coordinate corresponding to the first geometric model, the second centroid coordinate corresponding to the second geometric model, and the motion constraint information between the two geometric models, and the motion constraint information includes a motion constraint type, direction constraint information, and the target three-dimensional coordinates corresponding to the constraint action point; Based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinates corresponding to the constraint action point, determine the relative position constraint information corresponding to the first geometric model and the second geometric model; In response to a second trigger operation for creating a system simulation model, create a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the motion constraint type; Based on the direction constraint information and the relative position constraint information, perform a change process on the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model to obtain a first target translational connection sub-model, a second target translational connection sub-model, and a target kinematic pair sub-model; Based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model, generate a target system simulation model applicable to the target model platform.
2. The method according to claim 1, wherein The step of, in response to the first trigger operation, obtaining the to-be-processed model data corresponding to the geometric model to be converted includes: In response to a trigger operation for triggering a target conversion tool in the target model platform, obtain the to-be-processed model data corresponding to the geometric model to be converted edited in the first model platform.
3. The method according to claim 1, characterized in that, The step of, based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinates corresponding to the constraint action point, determining the relative position constraint information corresponding to the first geometric model and the second geometric model includes: Based on the target three-dimensional coordinates corresponding to the constraint action point and the first centroid coordinate, determine a first offset coordinate, and determine the first offset coordinate as the first relative position constraint information corresponding to the first geometric model; Based on the target three-dimensional coordinates corresponding to the constraint action point and the second centroid coordinate, determine a second offset coordinate, and determine the second offset coordinate as the second relative position constraint information corresponding to the second geometric model.
4. The method according to claim 1, wherein The step of, based on the direction constraint information and the relative position constraint information, performing a change process on the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model to obtain a first target translational connection sub-model, a second target translational connection sub-model, and a target kinematic pair sub-model includes: Based on the direction constraint information, perform a change process on the first attribute parameter of the kinematic pair sub-model to obtain a target kinematic pair sub-model; Based on the relative position constraint information, perform change processing on the attribute parameters of the first translational connection sub-model and the second translational connection sub-model to obtain a first target translational connection sub-model and a second target translational connection sub-model.
5. The method according to claim 4, characterized in that, The performing change processing on the first attribute parameter of the kinematic pair sub-model based on the direction constraint information to obtain a target kinematic pair sub-model includes: Obtain a kinematic pair attribute script corresponding to the kinematic pair sub-model; Based on the direction constraint information, change the content of the first field corresponding to the direction vector attribute parameter in the kinematic pair attribute script to obtain a target kinematic pair attribute script; Based on the target kinematic pair attribute script, determine a target kinematic pair sub-model.
6. The method according to claim 4, wherein The performing change processing on the attribute parameters of the first translational connection sub-model and the second translational connection sub-model based on the relative position constraint information to obtain a first target translational connection sub-model and a second target translational connection sub-model includes: Obtain a first translational attribute script corresponding to the first translational connection sub-model and a second translational attribute script corresponding to the second translational connection sub-model; Based on the first relative position constraint information, change the content of the second field corresponding to the relative position vector attribute parameter in the first translational attribute script to obtain a first target translational connection sub-model; Based on the second relative position constraint information, change the content of the third field corresponding to the relative position vector attribute parameter in the second translational attribute script to obtain a second target translational connection sub-model.
7. The method according to claim 1, characterized in that, The generating a target system simulation model applicable to a target model platform based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model includes: Sequentially connect the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model in sequence to obtain a target system simulation model applicable to the target model platform.
8. A model conversion device, characterized in that, The device includes: A model data acquisition module, configured to, in response to a first trigger operation, acquire to-be-processed model data corresponding to a to-be-converted geometric model; wherein, the to-be-converted geometric model includes a first geometric model and a second geometric model having a motion constraint relationship, and the to-be-processed model data includes a first centroid coordinate corresponding to the first geometric model, a second centroid coordinate corresponding to the second geometric model, and motion constraint information between the two geometric models, and the motion constraint information includes a motion constraint type, direction constraint information, and a target three-dimensional coordinate corresponding to a constraint action point; A relative position determination module, configured to determine relative position constraint information corresponding to the first geometric model and the second geometric model based on the first centroid coordinate, the second centroid coordinate, and the target three-dimensional coordinate corresponding to the constraint action point; A sub-model creation module, configured to create a first rigid body sub-model and a first translational connection sub-model corresponding to the first geometric model, a second rigid body sub-model and a second translational connection sub-model corresponding to the second geometric model, and a kinematic pair sub-model adapted to the kinematic constraint type in response to a second triggering operation for creating a system simulation model; An attribute parameter change module, configured to perform change processing on the attribute parameters of the first translational connection sub-model, the second translational connection sub-model, and the kinematic pair sub-model based on the direction constraint information and the relative position constraint information to obtain a first target translational connection sub-model, a second target translational connection sub-model, and a target kinematic pair sub-model; A target model determination module, configured to generate a target system simulation model applicable to a target model platform based on the first rigid body sub-model, the second rigid body sub-model, the first target translational connection sub-model, the second target translational connection sub-model, and the target kinematic pair sub-model.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the model conversion method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions for causing a processor to implement the model conversion method according to any one of claims 1-7 when executed.