A method and device for realizing computer autonomous lightweight structure modeling

By creating a multi-threaded structure in the autonomous lightweight structure modeling program, separating interface logic, interaction logic and computing logic, the problems of interface lag and development progress management are solved, and efficient lightweight structure modeling and version management are achieved.

CN118862533BActive Publication Date: 2025-03-04HANGZHOU XIANHENG CALIBRATION TESTING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411357842.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-03-04
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

In the prior art, autonomous lightweight structural modeling programs are prone to problems such as interface lag when dealing with flexible and changeable user input, and lack effective development progress management control.

Method used

By creating platform interactive threads and platform operation threads other than the main thread in the main function of the modeling program, the separation of interface logic, interaction logic and computing logic during the modeling process is achieved, avoiding interface lags, and supporting version management.

Benefits of technology

It effectively avoids interface lag, improves program response speed and user experience, and makes independent and lightweight structural modeling more convenient and efficient through the version management mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118862533B_ABST
    Figure CN118862533B_ABST
Patent Text Reader

Abstract

The present invention relates to a method and device for realizing computer autonomous lightweight structure modeling. The method realizes the separation of interface logic, interaction logic and calculation logic in the modeling process by creating a platform interaction thread and a platform operation thread in the main function of the modeling program, thereby avoiding the situation of interface freezing or pseudo-death in fast user interaction. The user can import or directly develop the model, and the platform interaction thread responds to the user's instructions, reads and parses the stl file, obtains the version data information or the modeling structure type and parameter setting information, and sends it to the platform operation thread for model calculation. The calculation result is processed by the platform interaction thread and triggers the main thread to perform dynamic rendering and update of the interface. In addition, the supported stl format files are compatible with the standard stl format, and version management of the modeling process is realized. The method and device improve the convenience and efficiency of autonomous lightweight structure modeling and meet the needs of complex lightweight structures in industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer model design, and in particular relates to a method and device for realizing computer autonomous lightweight structure modeling. Background Art

[0002] Realizing the generation of structures on industrial software, such as the need for lightweight 3D printing, can not only complete the generation of some complex structures, but also reduce the weight by changing the implementation method to eliminate redundant structures, and assist in hollowing out individual parts, replacing low-density materials, etc., so that under given limited conditions, the weight of the structure itself is minimized while meeting performance requirements. Algorithms are interconnected and integrated so that users can obtain the required structure according to their needs, reduce the cost of original materials consumed by the model during use, ensure excellent performance during use, meet the needs and applications of complex lightweight spatial mesh structures in the industry, and provide diversified structures for 3D printing.

[0003] However, currently, lightweight structure modeling has not formed a unified standard or a typical product application with appeal. Autonomous lightweight structure modeling programs are prone to problems such as interface freezes when dealing with flexible and changeable user inputs. Moreover, as a technical means with development iterative properties, it lacks effective development progress management and control. Summary of the invention

[0004] In order to solve the problems of the prior art, the present invention proposes a method and device for realizing computer autonomous lightweight structure modeling. Specifically, the present application relates to a method for realizing computer autonomous lightweight structure modeling, characterized in that it includes:

[0005] In the main function of the modeling program, create a platform interaction thread and a platform computing thread in addition to the main thread;

[0006] If the user imports the first stl file to develop the model, the platform interactive thread responds to the user's import instruction, reads and parses the first stl file to obtain the version data information currently being developed;

[0007] If the user does not import and develops directly, the platform interaction thread responds to the user's modeling structure type selection instruction and parameter setting information;

[0008] The platform interaction thread sends the version data information, or the modeling structure type and parameter setting information currently being developed, to the platform calculation thread for model calculation, and receives the calculation result returned by the platform calculation thread;

[0009] The platform interaction thread sets the operation result to trigger the main thread to perform dynamic rendering and update of the interface;

[0010] The platform interaction thread also saves the current model development data in a second stl file in response to a version saving instruction from the user, and the second stl file is an independent data file for saving all versions of model development data.

[0011] Furthermore, the platform computing thread performs model calculation including:

[0012] If the received version data information is the version currently being developed, the modeling structure type and development parameter information are obtained according to the version data information, and the platform computing thread performs model data calculation according to the modeling structure type and development parameter information.

[0013] Furthermore, it is characterized in that the modeling structure types include: lattice structure, TPMS structure and Voronoi structure.

[0014] Furthermore, it is characterized in that the platform interaction thread sets the calculation result, including: the platform interaction thread stores the calculation result in a memory area shared by it and the main thread, and triggers the main thread to dynamically render and update the interface by setting a state variable.

[0015] Further, it is characterized in that the second stl file format is compatible with the standard stl format, and the format types of the first stl file include: standard stl format, which is the same as the second stl file format.

[0016] Furthermore, it is characterized in that the second stl file format includes, in order of data content:

[0017] The stl data of the version currently under development, the partition code, the version number, the historical version description information, and the stl data of each historical version;

[0018] The separation code is a 4-byte preset identification data, and the version number is a 4-byte integer.

[0019] Furthermore, it is characterized in that the historical version description information includes: version number, submission time, submission information, and relative file position, wherein the version number is the 16-bit MD5 value of the model development status data of the corresponding version, the submission time is the timestamp corresponding to the version saving time, the submission information is the record information submitted by the user when saving the version, and the relative file position is the offset relative to the starting position of the version description information.

[0020] The present application also relates to a device for realizing computer autonomous lightweight structure modeling, characterized in that a modeling program is run on the device, and the modeling program executes the steps of the method as described above to realize lightweight structure modeling.

[0021] The present application also relates to a computer-readable storage medium, on which a program code is stored. When the program code is executed by a processor, the steps of the method described above are executed.

[0022] The beneficial technical effects of the patent of the present invention include: the modeling program of the present invention realizes the separation of interface logic, interaction logic and calculation logic in the modeling process through the cooperation of the main thread and multiple platform threads, avoids the interface freezing or pseudo-death in fast user interaction, and is more conducive to the subsequent management and maintenance of the program. In addition, the stl format file supported by the present invention is not only fully compatible with the existing standard stl file format, but also can realize the version management of the modeling process, making autonomous lightweight structure modeling more convenient and efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 : Standard stl file format diagram in the prior art.

[0024] Figure 2 : Framework diagram of the method flow according to an embodiment of the present invention.

[0025] Figure 3 : A second stl file format diagram according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] The present invention relates to some terms in the field of computer modeling. In order to avoid ambiguity in meaning caused by different technical fields, necessary explanations are given here. Among them:

[0028] Lightweight: Lightweight is an interdisciplinary engineering science, which consists of knowledge bases in the fields of material mechanics, computing technology, materials science and manufacturing technology. Under limited conditions, the optimal structure is achieved within limited boundaries, which not only meets the requirements of minimizing its own weight, but also meets the requirements of reliability and considerable life of the structure. In different requirements, appropriate materials, appropriate structures, connection technologies, achievable manufacturing processes and as accurate designs as possible are selected.

[0029] Voronoi structure: Voronoi structure is a mathematical structure that divides space into different regions. Each region is generated by a set of specific points (called seed points, generators or sites). Each position in space belongs to the region defined by the closest seed point. In the Voronoi diagram, for a given set of seed points, several polygonal regions can be divided on the plane, so that the distance from any point in each polygon to a specific seed point in the region is less than the distance to other seed points.

[0030] TPMS structure: TPMS (Triply Periodic Minimal Surfaces) are minimal surfaces with a periodic structure, which means they have repeating patterns in three independent directions. These surfaces are often used in fields such as materials science, architecture, and bioengineering due to their unique geometric properties, such as high specific surface area and continuous curvature. TPMS are particularly useful in design optimization, lightweighting, and additive manufacturing (such as 3D printing), and can be used to create efficient heat exchangers, filters, and structural components.

[0031] Lattice structures: Lattice structures are defined as complex architectures containing arrays of interconnected struts or plates that are repeatedly aligned in 3D space. Incorporating lattice structures into metallic implant structures allows the constructs to have mechanical properties close to those of surrounding bone tissue. In addition, lattice structures constitute interconnected pore structures that allow for cell ingrowth and better tissue integration. 3 Lattice structures with simple geometries have been fabricated using conventional manufacturing techniques such as water jet cutting, casting, electroless plating, and electrodeposition.

[0032] stl file: is a file format widely used in 3D printing and computer-aided design (CAD). An stl file is a triangular representation of the geometry of a three-dimensional surface. The surface is subdivided or logically decomposed into a series of small triangles (faces). Each face is described by a vertical direction (normal vector) and three points representing the vertices (corners) of the triangle. The slicing algorithm uses this data to determine the cross-section of the three-dimensional shape that the manufacturer wants to build. Figure 1 The format of the standard stl file is shown.

[0033] This embodiment provides a method for realizing computer autonomous lightweight structure modeling, which is realized by a computer modeling program. In some embodiments, Python libraries (such as vtk, PyQt5, spilpy, gmsh, etc.) can be used to realize interface interaction and program operation. Figure 2As shown, in addition to the main thread, a platform interaction thread and a platform computing thread are created in the main function of the program. Among them, the main thread is responsible for initializing the entire modeling program, including loading interface components and setting basic parameters, and the platform interaction thread is responsible for responding to various user operations and sending instruction data to the platform computing thread, which performs model data calculations.

[0034] When developing a model, the developer can choose to import the first stl file for model development. At this time, the platform interactive thread responds to the user's import instruction, reads and parses the first stl file to obtain the version data information currently being developed. It can be understood that the version data information here includes the modeling structure type and parameter setting information. The former indicates the modeling structure adopted by the developed model, and the latter indicates the various parameter setting information during the model development process.

[0035] In some embodiments, developers can also directly develop models. In this case, they need to select the type of modeling structure to be adopted, and then make design adjustments based on this. It can be understood that the platform interaction thread can obtain the corresponding parameter setting information through the developer's design adjustments.

[0036] The platform interaction thread sends the version data information, modeling structure type and parameter setting information currently being developed to the platform computing thread for model calculation. The platform computing thread receives data from the platform interaction thread, parses the version data information, extracts the necessary modeling parameters, and verifies the legitimacy of the modeling structure type and development parameter information.

[0037] In some embodiments, the platform computing thread also performs optimization calculations to ensure that the generated structure meets the performance requirements while achieving the goal of lightweight, including using topology optimization algorithms, removing redundant materials, and performing stress analysis to ensure the stability and safety of the structure during use. The platform computing thread generates calculation results, including: generated 3D model data, intermediate data generated during the calculation process, and log information. The platform computing thread returns the calculation results to the platform interaction thread.

[0038] In some embodiments, the modeling structure types include: lattice structure, TPMS structure and Voronoi structure. The lattice structure has high specific strength and stiffness, and can significantly reduce weight while maintaining strength; the TPMS structure has a smooth periodic surface, without sharp turns or connection points, reducing stress concentration; the Voronoi structure imitates the cell distribution in nature, has good mechanical properties and material utilization, and the combined use of these structural types can play their respective advantages in different application scenarios to meet the needs of lightweight, strength and versatility.

[0039] In some embodiments, after receiving the calculation result of the model calculation from the platform computing thread, the platform interaction thread stores it in a memory area shared with the main thread. The platform interaction thread can set a state variable renderUpdateFlag to notify the main thread that dynamic rendering updates of the interface are required. The main thread periodically checks the state of renderUpdateFlag in its main loop. If renderUpdateFlag is detected to be True, calculationResult is read and dynamic rendering updates of the interface are performed.

[0040] In some embodiments, the platform interaction thread also responds to the user's version saving instruction to save the current model development data in a second stl file, where the second stl file is an independent data file for saving all versions of model development data. Specifically, the second stl file format is as follows: Figure 3 As shown, the data content order includes: the stl data of the version currently being developed, the separation code, the version number, the historical version description information, and the stl data of each historical version. Among them, the separation code is a 4-byte preset identification data, and the version number is a 4-byte integer. It can be understood that the stl data of the version currently being developed is standard stl format data. Figure 1 It can be seen that since the parsing method of the standard stl format data is sequential parsing, the data behind the stl data of the currently developing version in the second stl file does not affect its normal parsing, that is, the second stl file format is fully compatible with the standard stl format.

[0041] Considering reliability, a separation code is set to identify the end position of the stl data of the version currently being developed. In some embodiments, the separation code is represented by four ASCII characters "$$$$".

[0042] The historical version description information includes: version number, submission time, submission information, and relative file position, wherein the version number is the 16-bit MD5 value of the model development status data of the corresponding version, the submission time is the timestamp corresponding to the version save time, the submission information is the record information submitted by the user when saving the version, and the relative file position is the offset relative to the starting position of the version description information. In actual parsing, the program can quickly define the overall position of the historical version description information and the stl data of each historical version through the separation code, and determine the position of the specific version of the stl data in the file through the relative file position of the specific version in the historical version description information. The following is an example of the json text format of the historical version description information:

[0043] {

[0044] "history_description": [

[0045] {

[0046] "version_number": "0dcc509a6f75849b",

[0047] "timestamp": 1723865958,

[0048] "commit_message": "Version 1 commit message",

[0049] "relative_position": 825

[0050] },

[0051] {

[0052] "version_number": "c4ca4238a0b92382",

[0053] "timestamp": 1723816283,

[0054] "commit_message": "Version 2 commit message",

[0055] "relative_position": 863

[0056] } ]

[0058] }

[0059] The specific historical version description information may adopt various text organization formats well known to those skilled in the art, which are not limited here.

[0060] In some embodiments, the format type of the first stl file is the standard stl format. In this case, the first stl file is equivalent to saving only the model development information of the current development version. In other embodiments, the format type of the first stl file is the same as the second stl file format, that is, it contains historical version model development information. At this time, since the second stl file format is fully compatible with the standard stl format, the model development information of the current development version can be parsed normally.

[0061] The disclosed embodiment also provides a device for realizing computer autonomous lightweight structure modeling, characterized in that a modeling program is run on the device, and the modeling program executes the steps of the method described above to realize lightweight structure modeling.

[0062] The embodiments of the present disclosure further provide a non-volatile computer storage medium, wherein the computer-readable storage medium stores program code; the computer storage medium stores computer-executable instructions, and the computer-executable instructions can execute the method steps described in the above embodiments.

[0063] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include: an electrical connection with 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 the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted by any appropriate medium, including: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above. The above-mentioned computer-readable medium may be contained in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device. The computer program code for performing the operation of the present disclosure may be written in one or more programming languages ​​or a combination thereof, and the above-mentioned programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, C++, and also conventional procedural programming languages—such as "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network including a Local Area Network (AN) or a Wide Area Network (WAN), or may be connected to an external computer.

[0064] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions. The units involved in the embodiments described in the present disclosure can be implemented by software or by hardware. Among them, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.

[0065] The above introduces the preferred embodiments of the present invention, which is intended to make the spirit of the present invention clearer and easier to understand, but is not intended to limit the present invention. All modifications, substitutions, and improvements made within the spirit and principles of the present invention should be included in the scope of protection outlined by the claims attached to the present invention.

Claims

1. A method for realizing computer autonomous lightweight structure modeling, characterized in that: include: In the main function of the modeling program, create a platform interaction thread and a platform computing thread in addition to the main thread; If the user imports the first stl file to develop the model, the platform interactive thread responds to the user's import instruction, reads and parses the first stl file to obtain the version data information currently being developed; If the user does not import and develops directly, the platform interaction thread responds to the user's modeling structure type selection instruction and parameter setting information; The platform interaction thread sends the version data information, or the modeling structure type and parameter setting information currently being developed, to the platform calculation thread for model calculation, and receives the calculation result returned by the platform calculation thread; The platform interaction thread sets the calculation result to trigger the main thread to perform dynamic rendering and update of the interface; Among them, the platform interaction thread also responds to the user's version save instruction to save the current model development data in a second stl file, and the second stl file is an independent data file used to save all versions of model development data; the platform interaction thread sets the calculation result, including: the platform interaction thread stores the calculation result in a memory area shared by it and the main thread, and triggers the main thread to dynamically render and update the interface by setting state variables.

2. The method for realizing computer autonomous lightweight structure modeling according to claim 1, characterized in that: The platform computing thread performs model calculation including: If the received version data information is the version currently being developed, the modeling structure type and development parameter information are obtained according to the version data information, and the platform computing thread performs model data calculation according to the modeling structure type and development parameter information.

3. The method for realizing computer autonomous lightweight structure modeling according to claim 2, characterized in that: The modeling structure types include: lattice structure, TPMS structure and Voronoi structure.

4. The method for realizing computer autonomous lightweight structure modeling according to claim 1, characterized in that: The second stl file format is compatible with the standard stl format, and the format types of the first stl file include: the standard stl format, and the same as the second stl file format.

5. The method for realizing computer autonomous lightweight structure modeling according to claim 1, characterized in that: The second stl file format includes, in order of data content: The stl data of the version currently being developed, the separation code, the version number, the historical version description information, and the stl data of each historical version; wherein the separation code is a 4-byte preset identification data and the version number is a 4-byte integer.

6. The method for realizing computer autonomous lightweight structure modeling according to claim 5, characterized in that: The historical version description information includes: version number, submission time, submission information, and relative file position, wherein the version number is the 16-bit MD5 value of the model development status data of the corresponding version, the submission time is the timestamp corresponding to the version save time, the submission information is the record information submitted by the user when saving the version, and the relative file position is the offset relative to the starting position of the version description information.

7. A device for realizing computer autonomous lightweight structure modeling, characterized in that: A modeling program is run thereon, and the modeling program executes the steps of the method for realizing computer autonomous lightweight structure modeling according to any one of claims 1 to 6 to realize lightweight structure modeling.

8. A computer-readable storage medium having a program code stored thereon, wherein the program code is executed by a processor to execute the steps of the method for realizing computer autonomous lightweight structure modeling according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • System and method for using an engine model for multiple functions

    CN110023852A

  • Method for issuing and rendering dynamic UI (user interface) template at App (application) end

    CN117389557A