Geometry processing method and device based on three-dimensional description, equipment and medium
By storing only the unique identifier and orientation parameters of the geometry in the 3D model file, the problems of large file size and low efficiency of contact force calculation are solved, and efficient contact force calculation and data retrieval are achieved.
Patent Information
- Application Number
- CN202511698639.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-17
AI Technical Summary
Existing 3D model file formats result in large file sizes when processing scenes containing a large number of repetitive basic geometries, leading to low efficiency in contact force calculation.
By parsing the 3D model file, only the unique identifier, geometric type, and orientation parameters of the geometry are stored, reducing the storage of vertex data. The core data of duplicate geometries are stored by association using the identifier, and the stored data is quickly retrieved for contact force calculation during the calculation.
It greatly reduces file size, improves data retrieval and contact force calculation efficiency, and ensures the accuracy and efficiency of contact force calculation.
Smart Images

Figure CN121544830A_ABST
Abstract
Description
Technical Field
[0001] This application relates to data processing, and more particularly to a method, apparatus, device, and medium for processing geometry based on three-dimensional description. Background Technology
[0002] In the fields of 3D computer graphics, computer-aided design (CAD), digital twin, virtual reality (VR), and augmented reality (AR), handling complex 3D scenes containing a large number of geometric shapes is a core requirement.
[0003] Existing 3D model file formats (such as OBJ, Standard Triangle Language (STL), FBX (Filmbox)) have significant limitations in storing and processing this type of data: for scenes containing a large number of repetitive basic geometries, mesh formats can result in large file sizes, requiring the loading of redundant data when calling the file later, which seriously affects the efficiency of contact force calculation. Summary of the Invention
[0004] This application provides a method, apparatus, device, and medium for processing geometry based on three-dimensional description, in order to improve the efficiency of contact force calculation.
[0005] In a first aspect, embodiments of this application provide a geometry processing method based on three-dimensional description, including:
[0006] The imported project file is parsed to obtain multiple geometric shapes;
[0007] In response to the user selecting at least two target geometries for geometric contact from the geometry, export the geometry format file of each target geometry, which includes the identifier, geometry type and attitude parameters of the target geometry.
[0008] Calculate and output the contact force at the contact point based on the geometry file of each target geometry.
[0009] In one possible implementation, the attitude parameters include: position coordinates, geometric attitude indicating rotation direction and rotation angle, scaling parameters, and size parameters.
[0010] In one possible implementation, calculating and outputting the contact force at the contact point based on the geometry format file of each target geometry includes:
[0011] The geometry format file of each target geometry is parsed to obtain the geometric topology and geometric orientation of each target geometry.
[0012] Based on the geometric topology and geometric orientation of each target geometry, the contact amount at the specified contact points is calculated;
[0013] The contact force of the contact part is calculated based on the contact amount of the contact part;
[0014] The contact force at the contact point is displayed through an interactive interface.
[0015] In one possible implementation, the method further includes:
[0016] In response to the user's three-dimensional contact force processing operation, a three-dimensional contact force diagram is generated based on the contact force at the contact point;
[0017] A three-dimensional schematic diagram of the contact force is displayed on the interactive interface.
[0018] In one possible implementation, the project file includes multiple geometric models and the connection relationships between the geometric models. Parsing the imported project file to obtain multiple geometric bodies includes:
[0019] The project file is parsed to obtain multiple geometric models and the connection relationships between them;
[0020] The geometry is rendered in space based on the plurality of geometric models and the connection relationships between them, and the rendered geometry is displayed on the graphical user interface.
[0021] In one possible implementation, the engineering file also includes global units and the number of geometry elements; wherein the global units are used to indicate the units used for all dimensional parameters in the file.
[0022] In one possible implementation, the geometry type includes any of the following: cube, sphere, ellipsoid, cylinder, cone, capsule, or mesh model;
[0023] Among them, the size parameters of the cube's attitude parameters include the length, width, and height with the geometric center as the origin;
[0024] The dimensional parameters in the attitude parameters of a sphere include the radius with the center of the sphere as the origin;
[0025] The dimensional parameters in the attitude parameters of an ellipsoid include the radii of the three principal axes with the geometric center as the origin;
[0026] The dimensional parameters in the attitude parameters of a cylinder include the base radius and height, with the geometric center as the origin.
[0027] The dimensional parameters in the attitude parameters of a cone include the base radius and height;
[0028] The dimensional parameters in the capsule's attitude parameters include the hemispherical radius and the length of the cylindrical segment;
[0029] The size parameters in the pose parameters of the mesh model include a vertex list and a triangle patch list. The vertex list includes the three-dimensional coordinates of multiple vertices, and each triangle patch in the triangle patch list is represented by the indices or three-dimensional coordinates of three vertices.
[0030] Secondly, embodiments of this application provide a geometry processing apparatus based on three-dimensional description, comprising:
[0031] The parsing module is used to parse the imported project file and obtain multiple geometric shapes;
[0032] The export module is used to export a geometry format file for each target geometry in response to a user selecting at least two target geometries for geometric contact from the geometry. The geometry format file for each target geometry includes the identifier, geometry type, and attitude parameters of the target geometry.
[0033] The calculation module is used to calculate and output the contact force at the contact point based on the geometric format file of each target geometry.
[0034] In one possible implementation, the attitude parameters include: position coordinates, geometric attitude indicating rotation direction and rotation angle, scaling parameters, and size parameters.
[0035] In one possible implementation, the computing module is specifically used for:
[0036] The geometry format file of each target geometry is parsed to obtain the geometric topology and geometric orientation of each target geometry.
[0037] Based on the geometric topology and geometric orientation of each target geometry, the contact amount at the specified contact points is calculated;
[0038] The contact force of the contact part is calculated based on the contact amount of the contact part;
[0039] The contact force at the contact point is displayed through an interactive interface.
[0040] In one possible implementation, the geometry processing device based on three-dimensional description further includes a display module for:
[0041] In response to the user's three-dimensional contact force processing operation, a three-dimensional contact force diagram is generated based on the contact force at the contact point;
[0042] A three-dimensional schematic diagram of the contact force is displayed on the interactive interface.
[0043] In one possible implementation, the project file includes multiple geometric models and the connection relationships between the geometric models, and the parsing module is specifically used for:
[0044] The project file is parsed to obtain multiple geometric models and the connection relationships between them;
[0045] The geometry is rendered in space based on the plurality of geometric models and the connection relationships between them, and the rendered geometry is displayed on the graphical user interface.
[0046] In one possible implementation, the engineering file also includes global units and the number of geometry elements; wherein the global units are used to indicate the units used for all dimensional parameters in the file.
[0047] In one possible implementation, the geometry type includes any of the following: cube, sphere, ellipsoid, cylinder, cone, capsule, or mesh model;
[0048] Among them, the size parameters of the cube's attitude parameters include the length, width, and height with the geometric center as the origin;
[0049] The dimensional parameters in the attitude parameters of a sphere include the radius with the center of the sphere as the origin;
[0050] The dimensional parameters in the attitude parameters of an ellipsoid include the radii of the three principal axes with the geometric center as the origin;
[0051] The dimensional parameters in the attitude parameters of a cylinder include the base radius and height, with the geometric center as the origin.
[0052] The dimensional parameters in the attitude parameters of a cone include the base radius and height;
[0053] The dimensional parameters in the capsule's attitude parameters include the hemispherical radius and the length of the cylindrical segment;
[0054] The size parameters in the pose parameters of the mesh model include a vertex list and a triangle patch list. The vertex list includes the three-dimensional coordinates of multiple vertices, and each triangle patch in the triangle patch list is represented by the indices or three-dimensional coordinates of three vertices.
[0055] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0056] The memory stores computer-executed instructions;
[0057] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0058] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0059] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0060] The geometry processing method, apparatus, device, and medium based on 3D description provided in this application embodiment only contain a unique identifier, geometry type, and attitude parameters in the geometry format file of the target geometry, eliminating the need to store a large amount of vertex data and greatly reducing file size. Furthermore, for repetitive basic geometries, their core data (geometric type, attitude parameters, etc.) are stored in association with a unique identifier, requiring only one storage for subsequent reuse, eliminating the need to repeatedly store redundant data, further compressing file size, and effectively improving the efficiency of subsequent data retrieval and contact force calculation. Attached Figure Description
[0061] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0062] Figure 1 A flowchart illustrating the geometry processing method based on 3D description provided in this application. Figure 1 ;
[0063] Figure 2 A flowchart illustrating the geometry processing method based on 3D description provided in this application. Figure 2 ;
[0064] Figure 3 A flowchart illustrating the geometry processing method based on 3D description provided in this application. Figure 3 ;
[0065] Figure 4 A schematic diagram of the geometry processing device based on three-dimensional description provided in this application;
[0066] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.
[0067] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0068] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0069] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0070] Based on the technical problems mentioned in the background art, the technical concept of this application is as follows: When analyzing existing 3D model file formats, the inventors discovered that in scenarios containing a large number of repetitive basic geometries (such as bolts and nuts in industry), the structures and parameters of these geometries are completely identical. Traditional formats require storing each repetitive geometry separately and completely, resulting in bloated file sizes and the need to load redundant data during subsequent calls, severely impacting the efficiency of contact force calculation. Therefore, the inventors conceived of the following: First, the engineering file of the 3D model can be parsed, and all data contained in the file can be split into geometric units. For repetitive geometries with identical structural parameters, only the core data (geometric type, dimensions, topology, etc.) is stored once, and each geometry is labeled with a unique identifier. In practical applications, when a user selects the target geometry from the parsed geometry to be used for contact force calculation, only a dedicated geometric format file containing key information such as the target geometry identifier and attitude parameters needs to be exported. During calculation, the stored core data can be quickly retrieved through the identifier, and the contact quantity and contact force calculation can be completed by combining the attitude parameters, which reduces file size and improves data retrieval and calculation efficiency.
[0071] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0072] Figure 1 A flowchart illustrating the geometry processing method based on 3D description provided in this application. Figure 1 ,like Figure 1 As shown, the method includes:
[0073] S11. Parse the imported project file to obtain multiple geometric shapes.
[0074] The execution subject of this application embodiment is an electronic device, which can be a terminal device, such as a laptop, desktop computer, or tablet computer, or a server. In practical applications, whether the electronic device is a terminal device or a server can be determined according to the actual situation, and no specific limitation is imposed on it.
[0075] Among them, the engineering file is a digital file that carries complete information about the 3D scene, including multiple geometric models and the connection relationships between the geometric models.
[0076] Optionally, the project file may also include global units and the number of geometry.
[0077] The global unit is used to indicate the unit used for all dimensional parameters in the file. For example, it can be meters, centimeters, millimeters, etc., which can be preset according to actual conditions. This application embodiment does not impose specific limitations on this.
[0078] For example, the number of geometric objects can be one, two, three or more, which can be preset according to the actual situation. This application embodiment does not impose specific limitations on this.
[0079] Among them, geometry is the basic unit that constitutes a three-dimensional scene, including parametric basic geometry (such as cubes, spheres, cylinders, etc.) and complex mesh models (such as organic surfaces and non-parametric structures). Each geometry has independent spatial attributes and structural features, and is the core object of contact force calculation.
[0080] In one possible implementation, the project file type can be used to call the corresponding parsing algorithm to read the file. Then, the geometry within the project file is identified, revealing multiple initial geometries. Finally, duplicate initial geometries are deleted, resulting in the final set of geometry.
[0081] Furthermore, the geometry type and orientation parameters of each geometry can be extracted, and each geometry can be assigned a unique identifier.
[0082] Optionally, the project file may also include multiple geometric models and the connection relationships between them.
[0083] In another possible implementation, the project file can be parsed to obtain multiple geometric models and their connections. Based on these geometric models and their connections, geometric space is rendered, and the rendered geometry is displayed on a graphical user interface.
[0084] Among them, geometric space rendering refers to the process of transforming the abstract digital data (coordinates, size, type) of a geometric model into a three-dimensional image that can be perceived by the naked eye through a graphics engine (such as a 3D rendering engine). During the rendering process, basic visual attributes (such as outline, color, and transparency) are given to the geometric object, allowing users to intuitively see the shape of the geometric object.
[0085] The graphical user interface (GUI) is a visual window for users to interact with the system. It provides functions such as a 3D scene display area, operation buttons, and parameter setting panels. It is used to present the rendered 3D scene and also supports users to perform interactive operations (such as rotating the scene and selecting geometry) through devices such as mouse and keyboard.
[0086] S12. In response to the user selecting at least two target geometries from the geometry to make geometric contact, export the geometry format file for each target geometry.
[0087] In this system, users can select at least two target geometries from a set of geometries displayed in a graphical user interface using devices such as a mouse and keyboard. The electronic device then responds to the user's selection, confirms the target geometries, and exports a geometric format file for each target geometry.
[0088] Each target geometry's geometry format file includes the target geometry's identifier, geometry type, and attitude parameters.
[0089] The attitude parameters include: position coordinates, geometric attitude indicating the direction and angle of rotation, scaling parameters, and size parameters.
[0090] In practical applications, geometric pose can be represented by a 4x4 transformation matrix, which indicates the position and orientation of the geometry in the world coordinate system. It is typically simplified by using three floating-point numbers representing the position (Tx, Ty, Tz) and a quaternion (Qx, Qy, Qz, Qw) representing the rotation.
[0091] The scaling parameter can be a geometric scaling ratio, represented by three floating-point numbers (Sx, Sy, Sz), which represent the scaling ratio of the geometry along the three directions of the local coordinate axis.
[0092] The geometric types include any of the following: cube, sphere, ellipsoid, cylinder, cone, capsule, or mesh model.
[0093] Among them, the size parameters of the cube's orientation parameters include the length, width, and height with the geometric center as the origin.
[0094] The dimensional parameters in the attitude parameters of a sphere include the radius with the center of the sphere as the origin.
[0095] The dimensional parameters in the attitude parameters of the ellipsoid include the radii of the three principal axes (Rx, Ry, Rz) with the geometric center as the origin.
[0096] The dimensional parameters in the attitude parameters of a cylinder include the radius of the base (with the geometric center as the origin) and the height.
[0097] The dimensional parameters in the attitude parameters of a cone include the base radius and height.
[0098] The dimensional parameters in the capsule's attitude parameters include the hemispherical radius and the length of the cylindrical segment.
[0099] The size parameters in the pose parameters of the mesh model include a vertex list and a triangle patch list. The vertex list includes the three-dimensional coordinates of multiple vertices, and each triangle patch in the triangle patch list is represented by the indices or three-dimensional coordinates of three vertices.
[0100] In one possible implementation, after the target geometry is determined, the geometry type and attitude parameters corresponding to the identifier can be obtained from pre-stored data based on the identifier of the target geometry.
[0101] S13. Calculate and output the contact force at the contact point based on the geometric format file of each target geometry.
[0102] The contact area refers to the specific region in three-dimensional space where two or more target geometries are in contact, overlap, or interact with each other. Its location and range are determined by the geometric type and attitude parameters of the target geometries.
[0103] Among them, contact force is the interaction force generated by the target geometry at the contact point, and its magnitude is related to the area, geometry and amount of contact of the contact point.
[0104] In one possible implementation, the geometry file of each target geometry is parsed to obtain its topology and orientation. Based on the topology and orientation of each target geometry, the contact amount at a specified contact point is calculated. Based on the contact amount, the contact force at the contact point is calculated. The contact force at the contact point is then displayed through an interactive interface.
[0105] It should be understood that the contact force at the contact point can be calculated using existing physical models, such as Hooke's law and Coulomb friction, based on the amount of contact at the contact point. The embodiments of this application do not limit the specific calculation method.
[0106] Among them, geometric topology is the core information describing the internal structural features of the target geometry, including the way the geometry is constructed (such as the relationship between vertices, edges, and faces of parametric geometry, the vertex list of the mesh model, and the connection relationship of triangles and faces), boundary contours, internal structural logic, etc.
[0107] The designated contact area refers to the contact area preset by the user or identified by the electronic device. Examples include the mating surfaces of two bolts explicitly selected by the user, or the overlapping area identified through topology and attitude analysis.
[0108] Contact quantity is a quantitative indicator that describes the degree of interaction between target geometries at the contact points. It can be divided into two categories according to the geometries: one is the overlapping contact quantity (such as the volume and depth of the overlap of two cubes), and the other is the fitting contact quantity (such as the contact area of two planes). Its value is used to reflect the degree of contact between target geometries.
[0109] The geometry processing method based on 3D description provided in this application parses imported project files to obtain multiple geometries. In response to a user selecting at least two target geometries for geometric contact, a geometry format file for each target geometry is exported. Based on the geometry format file of each target geometry, the contact force at the contact point is calculated and output. Each target geometry's geometry format file includes its identifier, geometry type, and attitude parameters. In this technical solution, the geometry format file of the target geometries only contains a unique identifier, geometry type, and attitude parameters, eliminating the need to store a large amount of vertex data and significantly reducing file size. Furthermore, for repeated basic geometries, their core data (geometric type, attitude parameters, etc.) are stored in association with a unique identifier, requiring only one storage for subsequent reuse, eliminating the need to repeatedly store redundant data, further compressing file size, and effectively improving the efficiency of subsequent data retrieval and contact force calculation.
[0110] Figure 2 A flowchart illustrating the geometry processing method based on 3D description provided in this application. Figure 2 ,like Figure 2 As shown, the method also includes:
[0111] S21. In response to the user's three-dimensional contact force processing operation, generate a three-dimensional contact force diagram based on the contact force at the contact point.
[0112] Among them, the user's contact force 3D processing operation refers to the instruction operation triggered by the user in the graphical user interface to generate a contact force 3D diagram, including clicking the "Generate Contact Force 3D Diagram" button, checking the visualization display option, and setting the display parameters of the contact force 3D diagram (such as arrow size, color threshold), etc.
[0113] Among them, the three-dimensional contact force diagram is a spatial graphic that visualizes contact force data. It is usually presented in the form of arrows, color blocks, etc., and is directly superimposed on the contact part of the three-dimensional scene. It can intuitively reflect the magnitude (such as the length of the arrow), direction (such as the direction of the arrow), and distribution of the contact force.
[0114] In one possible implementation, the system first receives a user-triggered three-dimensional contact force processing command and reads the contact force data (magnitude and direction) and spatial location information of the contact area stored in step S13. Then, based on the geometry of the contact area (e.g., planar or curved surface), the attachment reference points (e.g., the center point of the contact area, key stress points) for the three-dimensional contact force diagram are determined. Finally, a three-dimensional contact force diagram is generated according to preset visualization rules.
[0115] For example, the preset visualization rules can be as follows: using arrows as the core representation, with the arrow's starting point precisely positioned at the reference point of the contact area, the arrow length being directly proportional to the magnitude of the contact force (a preset proportional coefficient that can be adjusted by the user), the arrow pointing in the same direction as the contact force, and the arrow color classifying the magnitude of the contact force (e.g., blue → green → red for increasing stress values); for multiple contact areas or complex contact regions, corresponding three-dimensional contact force diagrams are generated to distinguish the contact forces of different contact areas, for example, by using arrow thickness, to ensure that the three-dimensional contact force diagrams are clearly distinguishable.
[0116] Optionally, if the contact area is a curved surface or an irregular region, the attachment effect of the schematic diagram can be optimized through interpolation algorithms to ensure that the arrows conform to the normal direction of the contact surface, thus avoiding spatial misalignment. Simultaneously, users can customize parameters of the 3D contact force schematic diagram, such as adjusting the default arrow length, modifying the color level threshold, and selecting whether to display force value annotations (with specific numerical values next to the arrows), improving adaptability.
[0117] S22. Display a three-dimensional schematic diagram of the contact force on the interactive interface.
[0118] In one possible implementation, the rendering module can read the real-time positions of the target geometry and contact points in the 3D scene, and accurately overlay the 3D contact force diagram onto the corresponding contact points (when the scene rotates or scales, the diagram moves synchronously with the contact points, maintaining positional correlation). Furthermore, when displaying the diagram on the interface, its visual independence is preserved: the arrow color and length are distinguished from the geometry color, and users can control the display / hiding of the diagram via a toolbar switch to avoid obscuring key geometric structures.
[0119] In the above embodiments, by transforming abstract contact force data into a three-dimensional schematic diagram of contact force, the user's intuitive understanding of the abstract contact force data is improved, allowing the user to intuitively visualize the spatial distribution, direction of action, and strength differences of the contact force, thereby improving the user experience.
[0120] Next, we will explain the geometry processing method based on 3D description through the following examples, combined with specific application scenarios.
[0121] Figure 3 A flowchart illustrating the geometry processing method based on 3D description provided in this application. Figure 3 ,like Figure 3 As shown, the method includes:
[0122] S301. Import project files.
[0123] S302. Parse the project files.
[0124] S303: Displays multiple geometric shapes obtained from the analysis.
[0125] S304. Determine that the user selects at least two target geometries from all geometries to make geometric contact.
[0126] S305. Obtain the basic data for each target geometry.
[0127] The basic data includes the identifier and geometry type of the target geometry.
[0128] S306. Determine whether the target geometry is a parametric geometry.
[0129] If yes, then execute S307; otherwise, execute S308.
[0130] S307, Analyze the attitude parameters of the parametric geometry.
[0131] Specifically, the analytical dimensions of a cube are its length, width, and height with its geometric center as the origin; the analytical radius of a sphere; the analytical radii of an ellipsoid are its three principal axes with its geometric center as the origin; the analytical radii and height of a cylinder and a cone are both analytical; and the analytical radius and length of a capsule are analytical.
[0132] S308, Geometric topology of analytical mesh model.
[0133] S309. Obtain the geometric format file for each target geometry.
[0134] S310. Calculate the contact amount of the specified contact part based on the geometric topology and geometric orientation of each target geometry.
[0135] S311. Calculate the contact force at the contact point based on the amount of contact at the contact point.
[0136] Based on the geometric processing methods described in the above embodiments for three-dimensional geometry, it can be seen that the embodiments of this application have the following technical effects:
[0137] 1. High compression ratio: For basic geometry, only a small number of core parameters are stored instead of a large amount of vertex data, which greatly reduces the file size; for repeated basic geometry, data is reused by identifying associations, which further reduces redundancy.
[0138] 2. Infinite precision: Preserves the precise mathematical definition of parametric geometry, completely avoids the precision loss caused by mesh approximation, and ensures the accuracy of geometric data.
[0139] 3. Rich semantics: It contains clear geometric type identifiers, which facilitates semantic processing by applications. For example, the physics engine can directly identify types such as spheres and cubes and perform collision calculations, and the CAD system can directly perform parametric editing.
[0140] 4. High flexibility: Through the attitude (position + quaternion) and scaling fields, complex rigid body transformations of any geometry can be easily performed to adapt to diverse spatial layout requirements.
[0141] 5. Easy to expand: The file structure adopts a modular design, which can easily add new geometric types such as torus and curved surfaces in the future without affecting the compatibility of the existing parser; at the same time, it supports user-defined keywords. As long as it does not repeat the original keywords (i.e., identifiers), the parser can be expanded by adapting to the keyword.
[0142] 6. Format compatibility: Supports switching between plain text and binary formats, combining the efficiency of binary format with the readability of text format, thus balancing transmission efficiency and viewing needs.
[0143] 7. High ease of use: The text format organizes content through structured keywords, making it easy to understand and troubleshoot errors, while simplifying the file generation and parsing process.
[0144] 8. Precise Identification and Dual-Mode Representation: Compared to OBJ and STL formats, which can only represent meshes and lack geometric identification, this format can accurately locate the corresponding geometry through a unique identifier; it also supports two representation modes, which can be parametrically represented by parameters such as orientation, length × width × height (e.g., a cube), or discretized into mesh faces (e.g., a cube with six faces).
[0145] Figure 4 A schematic diagram of the structure of the geometry processing device based on three-dimensional description provided in this application is shown below. Figure 4 As shown, the geometry processing device 40 based on three-dimensional description provided in this embodiment includes:
[0146] The parsing module 401 is used to parse the imported project file to obtain multiple geometric shapes.
[0147] The export module 402 is used to export a geometry format file for each target geometry in response to the user selecting at least two target geometries for geometric contact from the geometry. The geometry format file of each target geometry includes the identifier, geometry type and attitude parameters of the target geometry.
[0148] The calculation module 403 is used to calculate and output the contact force at the contact point based on the geometric format file of each target geometry.
[0149] In one possible implementation, the attitude parameters include: position coordinates, geometric attitude indicating the direction and angle of rotation, scaling parameters, and size parameters.
[0150] In one possible implementation, the computing module 403 is specifically used for:
[0151] The geometry format file of each target geometry is parsed to obtain the geometric topology and geometric orientation of each target geometry.
[0152] Based on the geometric topology and geometric orientation of each target geometry, the contact amount at the specified contact points is calculated.
[0153] The contact force at the contact point is calculated based on the amount of contact at the contact point.
[0154] The contact force at the contact point is displayed through an interactive interface.
[0155] In one possible implementation, the geometry processing device 40 based on three-dimensional description further includes a display module for:
[0156] In response to the user's three-dimensional contact force processing operation, a three-dimensional contact force diagram is generated based on the contact force at the contact point.
[0157] A three-dimensional diagram of the contact force is displayed on the interactive interface.
[0158] In one possible implementation, the project file includes multiple geometric models and the connection relationships between the geometric models. The parsing module 401 is specifically used for:
[0159] The project file is parsed to obtain multiple geometric models and the connection relationships between them.
[0160] The geometry is rendered in space based on multiple geometric models and the connections between them, and the rendered geometry is displayed on the graphical user interface.
[0161] In one possible implementation, the project file also includes global units and the number of geometry elements. The global units indicate the units used for all dimensional parameters in the file.
[0162] In one possible implementation, the geometry type includes any of the following: cube, sphere, ellipsoid, cylinder, cone, capsule, or mesh model.
[0163] Among them, the size parameters of the cube's orientation parameters include the length, width, and height with the geometric center as the origin.
[0164] The dimensional parameters in the attitude parameters of a sphere include the radius with the center of the sphere as the origin.
[0165] The dimensional parameters in the attitude parameters of an ellipsoid include the radii of the three principal axes with the geometric center as the origin.
[0166] The dimensional parameters in the attitude parameters of a cylinder include the radius of the base and the height, with the geometric center as the origin.
[0167] The dimensional parameters in the attitude parameters of a cone include the base radius and height.
[0168] The dimensional parameters in the capsule's attitude parameters include the hemispherical radius and the length of the cylindrical segment.
[0169] The size parameters in the pose parameters of the mesh model include a vertex list and a triangle patch list. The vertex list includes the three-dimensional coordinates of multiple vertices, and each triangle patch in the triangle patch list is represented by the indices or three-dimensional coordinates of three vertices.
[0170] The geometry processing device based on three-dimensional description provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0171] Figure 5 A schematic diagram of the structure of the electronic device provided in this application. Figure 5As shown, the electronic device 50 provided in this embodiment includes at least one processor 501 and a memory 502. Optionally, the electronic device 50 further includes a communication component 503. The processor 501, memory 502, and communication component 503 are connected via a bus 504.
[0172] In a specific implementation, at least one processor 501 executes computer execution instructions stored in memory 502, causing at least one processor 501 to perform the above-described method.
[0173] The specific implementation process of processor 501 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0174] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0175] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0176] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0177] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0178] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0179] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random-Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0180] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an application-specific integrated circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0181] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0182] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0183] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0184] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0185] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0186] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for processing a geometric body based on a three-dimensional description, characterized in that, The method comprises the following steps: parsing the imported engineering file to obtain a plurality of geometric bodies; in response to the user selecting at least two target geometric bodies for geometric contact from the geometric bodies, deriving a geometric format file of each target geometric body, the geometric format file of each target geometric body comprising the identification, geometric type and pose parameter of the target geometric body; calculating and outputting the contact force of the contact position according to the geometric format file of each target geometric body.
2. The method of claim 1, wherein, The pose parameter comprises a position coordinate, a geometric pose indicating a rotation direction and a rotation angle, a scaling parameter and a size parameter.
3. The method of claim 1, wherein, The calculation and output of the contact force of the contact position according to the geometric format file of each target geometric body comprises: parsing the geometric format file of each target geometric body to obtain the geometric topology and pose of each target geometric body; calculating the contact amount of the specified contact position according to the geometric topology and pose of each target geometric body; calculating the contact force of the contact position according to the contact amount of the contact position; displaying the contact force of the contact position through an interactive interface.
4. The method according to any one of claims 1 to 3, characterized in that, The method further comprises: in response to the user's contact force three-dimensional processing operation, generating a contact force three-dimensional sketch according to the contact force of the contact position; displaying the contact force three-dimensional sketch on the interactive interface.
5. The method according to any one of claims 1 to 3, characterized in that, The engineering file comprises a plurality of geometric models and connection relationships between the geometric models, and the parsing of the imported engineering file to obtain a plurality of geometric bodies comprises: parsing the engineering file to obtain a plurality of geometric models and connection relationships between the geometric models; performing geometric body space rendering according to the plurality of geometric models and the connection relationships between the geometric models, and displaying the rendered plurality of geometric bodies on a graphical user interface.
6. The method of claim 5, wherein, The engineering file further comprises a global unit and a geometric body quantity; wherein the global unit is used to indicate the unit used by all size parameters in the file.
7. The method according to any one of claims 1 to 3, characterized in that, The geometric type comprises any one of the following: a cube, a sphere, an ellipsoid, a cylinder, a cone, a capsule or a mesh model; wherein the size parameter in the pose parameter of the cube comprises a length, a width and a height with the geometric center as the origin; the size parameter in the pose parameter of the sphere comprises a radius with the sphere center as the origin; the size parameter in the pose parameter of the ellipsoid comprises three principal axis radii with the geometric center as the origin; the size parameter in the pose parameter of the cylinder comprises a bottom radius and a height with the geometric center as the origin; the size parameter in the pose parameter of the cone comprises a bottom radius and a height; the size parameter in the pose parameter of the capsule comprises a hemisphere radius and a cylinder segment length; the size parameter in the pose parameter of the mesh model comprises a vertex list and a triangle patch list, the vertex list comprising three-dimensional coordinates of a plurality of vertices, and each patch in the triangle patch list being represented by three vertex indices or three-dimensional coordinates.
8. A three-dimensional description based geometry processing apparatus, characterized by The method comprises the following steps: a parsing module for parsing the imported engineering file to obtain a plurality of geometric bodies; The derivation module is configured to, in response to a user selecting at least two target geometries for geometric contact from the geometries, derive a geometry format file for each target geometry, wherein the geometry format file for each target geometry comprises an identification of the target geometry, a geometry type, and a pose parameter; The calculation module is configured to calculate and output a contact force of the contact position according to the geometry format file of each target geometry.
9. An electronic device, comprising: The method comprises: a memory and a processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the 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-executable instructions, and the computer-executable instructions are executed by the processor to implement the method according to any one of claims 1-7.