Three-dimensional design model optimization method and device, electronic equipment and storage medium
By adjusting the geometric data of parts according to the actual needs of the construction scenario in the three-dimensional design model, the problem of interference between parts during construction is solved, the efficient and safe implementation of the model is achieved, and the adaptability and accuracy of construction is improved.
Patent Information
- Application Number
- CN202411492416.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2044-10-24
AI Technical Summary
In the construction scenario, the existing three-dimensional design model fails to fully consider actual needs, resulting in geometric interference between parts, affecting the efficiency, safety and accuracy of construction.
By obtaining the actual data requirements of the construction scenario, analyzing the three-dimensional design model files, generating the geometric data of the parts, and adjusting the volume and position of the parts multiple times until spatial interference is eliminated, an optimized three-dimensional design model is generated.
Ensure that the three-dimensional design model is implemented efficiently and safely during construction, avoid spatial interference between parts, and improve the adaptability and reliability of construction.
Smart Images

Figure CN119227412A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of modeling technology, and in particular to a three-dimensional design model optimization method, device, electronic equipment and storage medium. Background Art
[0002] With the continuous advancement of construction engineering and manufacturing technology, three-dimensional design models have been widely used in construction scenarios. However, three-dimensional design model files are usually generated based on standard geometric structures and design data, and do not fully consider the actual needs of specific construction scenarios, so they cannot be directly used in actual construction scenarios. These actual needs may include space limitations at the construction site, installation locations of actual equipment, material selection, load requirements, and environmental conditions. For example, in actual construction, the spatial data of the construction scene (such as the size of the site, the specific location of equipment installation, the geometry of the building, etc.) may differ from the theoretical model in the design stage. Therefore, in the construction scenario, the three-dimensional design model file needs to be adjusted according to the actual data requirements to ensure that it can be implemented efficiently and safely in actual construction.
[0003] However, when adjusting the 3D design model, geometric interference problems between the various parts in the model often occur. Specifically, when the geometric size, volume or position of certain parts are adjusted according to construction requirements, these adjustments may cause spatial interference between the parts and other adjacent parts. For example, when a part is enlarged or moved, it may overlap or contact with other parts, causing assembly interference. If these interference problems are not discovered and properly handled in time, they may have many adverse effects on the construction process, such as installation obstacles, construction delays, material waste, and even affect the safety and accuracy of construction. Summary of the invention
[0004] The embodiments of the present invention provide a 3D design model optimization method, device, electronic device and storage medium. By implementing the present invention, the 3D design model file can be adjusted according to actual data requirements to ensure that it can be implemented efficiently and safely in actual construction, thereby ensuring the safety and accuracy of model construction.
[0005] An embodiment of the present invention provides a three-dimensional design model optimization method, comprising:
[0006] Obtain the 3D design model files to be optimized and the actual data requirements of the construction scene.
[0007] Parse the 3D design model file and generate the geometric data of the part.
[0008] According to the actual data requirements of the construction scene, the geometric data of the parts that need to be adjusted are initially adjusted to obtain an adjusted part.
[0009] Repeat the secondary adjustment operation of the parts until all parts in the 3D design model have no spatial interference, and generate an optimized 3D design model.
[0010] The secondary adjustment operation of the parts includes:
[0011] Get the current one-time adjustment part; wherein the initial one-time adjustment part is any one-time adjustment part that has not undergone a second adjustment.
[0012] According to the coordinates of the current one-time adjustment part and the coordinates of the current part to be compared, the first distance between the current one-time adjustment part and the current part to be compared is calculated; wherein the parts to be compared are the remaining parts in the three-dimensional design model except the current one-time adjustment part, and the initial part to be compared is any part to be compared that has not been compared.
[0013] According to the size of the current one-time adjustment part and the size of the current part to be compared, the sum of the sizes of the current one-time adjustment part and the current part to be compared is calculated.
[0014] If the first distance is smaller than the sum of the sizes, the current part to be compared is added to the interference part set.
[0015] Determine whether the current part to be compared is the last unmatched part to be compared of the current one-time adjustment part; if so, adjust the volume of the current one-time adjustment part according to the geometric data of all parts in the interference part set, and update the geometric data of the current one-time adjustment part; clear the interference part set, and reselect a one-time adjustment part that has not been adjusted twice, and update the current one-time adjustment part; if not, select the next unmatched part to be compared of the current one-time adjustment part, and update the current part to be compared.
[0016] Furthermore, the parsing of the 3D design model file to generate geometric data of the part includes:
[0017] The three-dimensional design model is constructed in layers to generate several layers.
[0018] A representation graph is constructed for the plurality of layers to generate a plurality of representation graphs.
[0019] An information matrix of a three-dimensional design model is generated according to the plurality of representation diagrams.
[0020] The information matrix is parsed to generate geometric data of the part.
[0021] Further, the calculating of the first distance between the current first-adjusted part and the current part to be compared according to the coordinates of the current first-adjusted part and the coordinates of the current part to be compared includes:
[0022] According to the coordinates of the current first-adjusted part and the coordinates of the current part to be compared, the Euclidean distance between the current first-adjusted part and the current part to be compared is calculated, and the Euclidean distance is used as the first distance between the current first-adjusted part and the current part to be compared.
[0023] Furthermore, adjusting the volume of the current one-time adjustment part according to the geometric data of all parts in the interfering part set includes:
[0024] For each part in the interference parts set, the corresponding volume adjustment amount is calculated according to the size and volume of the part.
[0025] The adjusted volume is calculated according to the volume adjustment amount and the current volume of the one-time adjustment part; and the volume of the current one-time adjustment part is updated with the adjusted volume.
[0026] Furthermore, after the geometric data of the parts to be adjusted are adjusted for the first time according to the actual data requirements of the construction scene to obtain the first adjusted parts, the following is further included:
[0027] Parse the 3D design model file and generate the material data of the parts.
[0028] According to the actual data requirements of the construction scene, the material data of the parts that need to be adjusted will be adjusted, and the material data of the parts that need to be adjusted will be updated.
[0029] Furthermore, after generating the optimized three-dimensional design model, it also includes:
[0030] Based on the plurality of representation graphs, a topological relationship between the parts is generated.
[0031] The complexity of the three-dimensional design model is calculated and generated according to the number of topological relationships between the parts and the number of parts.
[0032] The output format of the three-dimensional design model file is determined according to whether the complexity is greater than a preset complexity threshold.
[0033] The three-dimensional design model file is output according to the output format.
[0034] Based on the above method embodiment, the present invention provides a corresponding device embodiment.
[0035] An embodiment of the present invention provides a three-dimensional design model optimization device, including: a data acquisition module, a model file parsing module, a part initial adjustment module and a model optimization module.
[0036] The data acquisition module is used to acquire the three-dimensional design model file to be optimized and the actual data requirements of the construction scene.
[0037] The model file parsing module is used to parse the three-dimensional design model file and generate geometric data of the part.
[0038] The part initial adjustment module is used to perform initial adjustment on the geometric data of the part that needs to be adjusted according to the actual data requirements of the construction scene to obtain a primary adjusted part.
[0039] The model optimization module is used to repeatedly perform the part secondary adjustment operation until all parts in the three-dimensional design model do not interfere with each other in space, and an optimized three-dimensional design model is generated. The part secondary adjustment operation includes: obtaining the current one-time adjustment part. The initial one-time adjustment part is any one-time adjustment part that has not been adjusted twice. According to the coordinates of the current one-time adjustment part and the coordinates of the current part to be compared, the first distance between the current one-time adjustment part and the current part to be compared is calculated. The part to be compared is the remaining parts in the three-dimensional design model except the current one-time adjustment part, and the initial part to be compared is any one-time comparison part that has not been compared. According to the size of the current one-time adjustment part and the size of the current part to be compared, the sum of the sizes between the current one-time adjustment part and the current part to be compared is calculated. If the first distance is less than the sum of the sizes, the current part to be compared is added to the interference part set. It is determined whether the current part to be compared is the last one to be compared that has not been compared in the current one-time adjustment part. If so, the volume of the current one-time adjustment part is adjusted according to the geometric data of all parts in the interference part set, and the geometric data of the current one-time adjustment part is updated. Clear the interference part set, and reselect a first adjustment part that has not been adjusted twice, and update the current first adjustment part. If not, select the next unmatched part to be compared under the current first adjustment part, and update the current part to be compared.
[0040] Furthermore, the model file parsing module includes: a layer construction unit, a representation graph construction unit, an information matrix generation unit and a geometric data generation unit;
[0041] The layer construction unit is used to perform layer construction on the three-dimensional design model to generate a plurality of layers.
[0042] The representation graph construction unit is used to construct representation graphs for the plurality of layers to generate a plurality of representation graphs.
[0043] The information matrix generating unit is used to generate an information matrix of a three-dimensional design model according to the plurality of representation diagrams.
[0044] The geometric data generating unit is used to analyze the information matrix and generate geometric data of the part.
[0045] Based on the above method embodiment, the present invention provides a corresponding electronic device embodiment.
[0046] An embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the three-dimensional design model optimization method described in any one of the above method embodiments can be implemented.
[0047] Based on the above method item embodiments, the present invention provides a corresponding storage medium item embodiment.
[0048] An embodiment of the present invention provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the three-dimensional design model optimization method described in any one of the above method embodiments can be implemented.
[0049] Compared with the prior art, the present invention has the following beneficial effects:
[0050] The embodiment of the present invention provides a three-dimensional design model optimization method, device, electronic device and storage medium. The method preliminarily adjusts the geometric data of the parts to be adjusted in the three-dimensional design model file according to the actual data requirements of the construction scene, and generates a primary adjustment part. According to the interference degree between the primary adjustment part and other parts, the volume of the primary adjustment part is appropriately adjusted, and multiple adjustments are made until there is no spatial interference between the parts, thereby generating an optimized three-dimensional design model.
[0051] The present invention appropriately adjusts the volume of the primary adjustment part interfered by other parts, thereby solving the problem in the prior art that due to the adaptive adjustment of the model in the construction scene, the parts interfere with each other during the actual installation process, thereby affecting the smooth installation of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 It is a flow chart of a three-dimensional design model optimization method provided by one embodiment of the present invention.
[0053] Figure 2 It is a flow chart of a secondary adjustment operation of a part provided in one embodiment of the present invention.
[0054] Figure 3 It is a structural schematic diagram of a three-dimensional design model optimization device provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of 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.
[0056] like Figure 1 As shown, an embodiment of the present invention provides a three-dimensional design model optimization method, which at least includes the following steps:
[0057] Step S1: Obtain the 3D design model file to be optimized and the actual data requirements of the construction scene.
[0058] It should be noted here that the 3D design model file is a data file used to store the geometric information, topological structure and related attributes of a 3D object. It is widely used in industrial design, architecture, manufacturing, game development, virtual reality and other fields to represent the 3D shape and structure of an object and support subsequent visualization, analysis, simulation and manufacturing operations.
[0059] 3D design models are usually generated under idealized conditions based on standard geometry and design data, without fully considering the actual needs of specific construction scenarios, and therefore cannot be directly applied to actual construction. In actual construction scenarios, there may be problems such as space constraints, equipment installation locations, material selection, etc. that are different from the design stage. For example, the spatial dimensions of the construction site, the installation location of the equipment, the geometric shape of the building, etc. may deviate from the theoretical model. Therefore, in order to ensure that the model can be executed efficiently and safely in actual construction, the 3D design model file must be adjusted according to the actual data requirements.
[0060] The actual data requirements of the construction scene mainly include spatial data, equipment installation location, material selection, load requirements, environmental conditions and building geometry;
[0061] The spatial data includes the actual size of the construction site, available space, and locations of obstacles.
[0062] The equipment installation location includes information such as the installation location and installation angle of the specific equipment at the construction site.
[0063] The material selection includes the materials actually used and their physical properties (such as density and strength) may be different from those set during design.
[0064] The load requirements include the load and stress requirements of the building structure or equipment in actual use.
[0065] The environmental conditions include environmental factors such as temperature, humidity, wind speed, etc., which will affect the construction plan and material properties.
[0066] The geometric shape of the building, including the actual building form, may differ from the theoretical model and need to be adjusted based on actual on-site data.
[0067] These adjustments based on actual needs ensure the adaptability and reliability of the model in real construction.
[0068] Step S2, parsing the 3D design model file to generate geometric data of the part;
[0069] In a preferred embodiment, the step of parsing the 3D design model file to generate geometric data of the part includes:
[0070] The three-dimensional design model is constructed in layers to generate several layers.
[0071] A representation graph is constructed for the plurality of layers to generate a plurality of representation graphs.
[0072] An information matrix of a three-dimensional design model is generated according to the plurality of representation diagrams.
[0073] The information matrix is parsed to generate geometric data of the part.
[0074] It should be noted that when optimizing a 3D design model file, you first need to construct the model in layers. Layer construction refers to the hierarchical management of the model's assembly information, where the assembly represents a relatively complete component in the model. This hierarchical management can more effectively organize and process the assembly information in the model, facilitating subsequent analysis and adjustment.
[0075] After completing the layer construction, you need to generate a representation diagram of the layer. The representation diagram contains the information of each part in the model, and it intuitively reflects the structure and layout of the parts in the model. Through the representation diagram, you can more clearly view and understand the relationship between the parts in the model, and provide a basis for the acquisition and analysis of geometric data.
[0076] Next, the information matrix of the 3D design model can be obtained through the representation diagram. The information matrix contains the geometric data of each part in the model. By parsing the information matrix, the geometric data of each part in the model can be extracted for evaluating and optimizing the model. The geometric data includes volume, coordinates, and dimensions.
[0077] Step S3: According to the actual data requirements of the construction scene, the geometric data of the parts that need to be adjusted are initially adjusted to obtain the primary adjusted parts.
[0078] Specifically, according to the actual data requirements of the construction scene, the geometric data of the parts that need to be adjusted will be adjusted for the first time, which means that the geometric data of the parts must first be modified in combination with the actual conditions such as the on-site load requirements, environmental conditions, geometric shape space limitations of the building, and equipment installation location. These adjusted geometric data will generate a primary adjustment part. For example, if the space on the construction site is small, the volume or size of the part needs to be reduced;
[0079] In addition, in a preferred embodiment, after the geometric data of the part to be adjusted is initially adjusted according to the actual data requirements of the construction scene to obtain the primary adjusted part, the method further includes:
[0080] Analyze the 3D design model file and generate the material data of the parts;
[0081] According to the actual data requirements of the construction scene, the material data of the parts that need to be adjusted will be adjusted, and the material data of the parts that need to be adjusted will be updated.
[0082] In actual operation, the material selection of certain parts may also be adjusted due to actual environmental conditions (such as temperature, humidity, etc.). The material data of the parts must be modified and updated once to make them more in line with the actual needs of the construction scenario, laying the foundation for further optimization and interference checking.
[0083] Step S4, repeatedly performing the secondary adjustment operation of the parts until all the parts in the three-dimensional design model have no spatial interference, and generating an optimized three-dimensional design model.
[0084] like Figure 2 As shown, the secondary adjustment operation of the parts includes at least the following steps:
[0085] Step S4.1, obtaining the current primary adjustment part, wherein the initial primary adjustment part is any primary adjustment part that has not undergone secondary adjustment;
[0086] Step S4.2: Calculate the first distance between the current once-adjusted part and the current part to be compared according to the coordinates of the current once-adjusted part and the coordinates of the current part to be compared.
[0087] In an optional embodiment, the first distance between the current first adjustment part and the current part to be compared is calculated according to the coordinates of the current first adjustment part and the coordinates of the current part to be compared, including:
[0088] According to the coordinates of the current first-adjusted part and the coordinates of the current part to be compared, the Euclidean distance between the current first-adjusted part and the current part to be compared is calculated, and the Euclidean distance is used as the first distance between the current first-adjusted part and the current part to be compared.
[0089] In a specific implementation, the coordinates of the current one-time adjustment part are {x1, y1, z1}, and the coordinates of the current part to be compared are {x2, y2, z2}. The first distance between the current one-time adjustment part and the current part to be compared is calculated by the following formula:
[0090]
[0091] Wherein, d is the first distance;
[0092] Step S4.3, according to the size of the current once-adjusted part and the size of the current part to be compared, calculate the sum of the sizes between the current once-adjusted part and the current part to be compared.
[0093] The size of the part can be obtained from the geometric data of the part, and the sum of the size of the current once-adjusted part and the size of the current part to be compared is calculated, and the result obtained is the sum of the sizes.
[0094] Step S4.4: If the first distance is smaller than the sum of the sizes, the current part to be compared is added to the interference part set.
[0095] It should be noted here that if the first distance is less than the sum of the sizes, it is considered that there is spatial interference between the current primary adjustment part and the current part to be compared. Spatial interference means that the two parts overlap or are too close in the actual space, which may lead to incorrect installation or operation in actual construction or assembly. Therefore, it is necessary to optimize and adjust these interfering parts.
[0096] In this case, the current part to be compared is first added to the interference part set, which is used to record all parts that interfere with the current part to be compared. Next, the current part to be compared needs to be analyzed and adjusted according to the geometric data of these interfering parts to eliminate the interference.
[0097] Step S4.5, determine whether the current part to be compared is the last unmatched part to be compared of the current one-time adjustment part; if so, adjust the volume of the current one-time adjustment part according to the geometric data of all parts in the interference part set, and update the geometric data of the current one-time adjustment part; clear the interference part set, and reselect a one-time adjustment part that has not been adjusted twice, and update the current one-time adjustment part; if not, select the next unmatched part to be compared of the current one-time adjustment part, and update the current part to be compared.
[0098] In a preferred embodiment, the step of adjusting the volume of the current one-time adjustment part according to the geometric data of all parts in the interfering part set includes:
[0099] For each part in the interference parts set, the corresponding volume adjustment amount is calculated according to the size and volume of the part;
[0100] The adjusted volume is calculated according to the volume adjustment amount and the current volume of the one-time adjustment part; and the volume of the current one-time adjustment part is updated with the adjusted volume.
[0101] Specifically, for each part in the interference parts set, the volume adjustment amount of the part is calculated based on its size and volume. Specifically, the product of the size of each interfering part and the volume adjustment coefficient is calculated to obtain the corresponding product result; the volume of each interfering part is divided by its corresponding product result to generate the corresponding volume adjustment amount; wherein the volume adjustment coefficient can be selected according to the actual situation. This calculation method aims to determine the degree of interference of the part on the current adjustment part through the geometric proportion of the part. In this way, the influence of each interfering part on the adjustment can be reasonably reflected, ensuring that the volume and size differences of each part are taken into account during the adjustment process.
[0102] Next, based on the calculated volume adjustment, the volume of the current one-time adjustment part is optimized and adjusted. Specifically, the volume of the current one-time adjustment part will be recalculated by combining with these volume adjustments to obtain a new volume value. The formula is: the adjusted volume is equal to the initial volume of the current one-time adjustment part minus the sum of the volume adjustments of all interfering parts. This process ensures that the contribution of each interfering part to the volume optimization of the one-time adjustment part is reasonably considered, and the adjusted volume is finally obtained.
[0103] Finally, the geometric data of the current one-time adjustment part is updated using the adjusted volume, and the new volume data is applied to the model to ensure that it no longer interferes with other parts in space. The key to this optimization process is to dynamically adjust the volume and size of the interfering parts to reduce or eliminate spatial conflicts and ensure the rationality and feasibility of the 3D design model. In this way, the optimized parts can better adapt to the actual needs of the construction scene while avoiding assembly problems caused by spatial interference. The optimization process is completed when the volume, coordinates, and sizes of all parts have been adjusted as necessary and there are no longer any spatial conflicts in the model. At this point, an optimized 3D design model that meets the construction needs is generated.
[0104] In a preferred embodiment, after generating the optimized three-dimensional design model, the method further includes:
[0105] Generating a topological relationship between parts according to the plurality of representation graphs;
[0106] Calculating and generating the complexity of the three-dimensional design model according to the number of topological relationships between the parts and the number of parts;
[0107] Determining an output format of the three-dimensional design model file according to whether the complexity is greater than a preset complexity threshold;
[0108] The three-dimensional design model file is output according to the output format.
[0109] In the specific implementation, the topological relationship between parts is constructed based on the generated representation diagrams. The topological relationship reflects the way in which the parts in the 3D design model are connected, adjacent, and interact with each other. These relationships include not only geometric adjacency, but may also involve structural connections or functional dependencies. By analyzing these relationships, the relative positions and functional associations between parts in the model can be clarified, providing a basis for subsequent complexity calculation and optimization.
[0110] Next, based on the topological relationships between the parts, the number of topological relationships of the model is calculated. This number refers to the number of various geometric or structural connections between different parts in the model. The quotient of the number of topological relationships between the parts and the number of parts is calculated as the complexity of the 3D design model. This calculation formula shows that if the number of parts is small but the number of topological relationships is large, the complexity is high; conversely, if the number of parts is large but the topological relationships are simple, the complexity is low.
[0111] According to the calculated complexity, the output format of the 3D design model file is determined. Taking the output gim format as an example, the complexity is compared with the preset complexity threshold. The complexity threshold is a pre-set standard used to measure whether the model has a high complexity. If the complexity of the 3D design model is higher than the threshold, it means that the connection relationship between the parts in the model is complex and may contain more details and precision. Therefore, it is necessary to select a more refined geometric accuracy and attribute fineness for display, and use a higher quality output format to maintain the integrity and accuracy of the model. On the contrary, if the complexity of the model is lower than the threshold, it means that the structure of the model is relatively simple, the connection relationship between the parts is more intuitive, and a simpler surface subdivision display method can be selected. At this time, a relatively lightweight output format can be used to improve efficiency and facilitate subsequent operations.
[0112] This output method based on model complexity ensures that the output of the 3D design model can be dynamically adjusted according to actual needs, which not only guarantees the accuracy of complex geometric structures, but also takes into account the efficiency of model rendering.
[0113] Based on the above method embodiment, the present invention provides a corresponding device embodiment.
[0114] like Figure 3 As shown, an embodiment of the present invention provides a three-dimensional design model optimization device, including: a data acquisition module 101, a model file parsing module 102, a part initial adjustment module 103 and a model optimization module 104;
[0115] The data acquisition module 101 is used to acquire the 3D design model file to be optimized and the actual data requirements of the construction scene.
[0116] The model file parsing module 102 is used to parse the 3D design model file and generate geometric data of the part.
[0117] The part initial adjustment module 103 is used to perform initial adjustment on the geometric data of the part to be adjusted according to the actual data requirements of the construction scene to obtain a primary adjusted part.
[0118] The model optimization module 104 is used to repeatedly perform the part secondary adjustment operation until all parts in the three-dimensional design model do not interfere with each other in space, thereby generating an optimized three-dimensional design model; the part secondary adjustment operation includes: obtaining the current one-time adjustment part; wherein the initial one-time adjustment part is any one-time adjustment part that has not been subjected to secondary adjustment; calculating the first distance between the current one-time adjustment part and the current part to be compared according to the coordinates of the current one-time adjustment part and the coordinates of the current part to be compared; wherein the part to be compared is the remaining parts in the three-dimensional design model except the current one-time adjustment part, and the initial one-time adjustment part is any one-time adjustment part that has not been compared; calculating the first distance between the current one-time adjustment part and the current one-time adjustment part according to the size of the current one-time adjustment part and the current one-time adjustment part; The size of the part to be compared, calculate the sum of the sizes between the current one-time adjustment part and the current part to be compared; if the first distance is less than the sum of the sizes, add the current part to be compared to the interference part set; determine whether the current part to be compared is the last unmatched part to be compared of the current one-time adjustment part; if so, adjust the volume of the current one-time adjustment part according to the geometric data of all parts in the interference part set, and update the geometric data of the current one-time adjustment part; clear the interference part set, and reselect a one-time adjustment part that has not been adjusted twice, and update the current one-time adjustment part; if not, select the next unmatched part to be compared of the current one-time adjustment part, and update the current part to be compared.
[0119] In an optional embodiment, the model file parsing module 102 includes: a layer construction unit 1021, a representation graph construction unit 1022, an information matrix generation unit 1023 and a geometric data generation unit 1024;
[0120] The layer construction unit 1021 is used to perform layer construction on the three-dimensional design model to generate a plurality of layers.
[0121] The representation graph construction unit 1022 is used to construct representation graphs for the plurality of layers to generate a plurality of representation graphs.
[0122] The information matrix generating unit 1023 is used to generate an information matrix of a three-dimensional design model according to the plurality of representation diagrams.
[0123] The geometric data generating unit 1024 is used to analyze the information matrix to generate geometric data of the part.
[0124] It should be noted that the embodiments of the device described above correspond to the above embodiments of the present invention, and can implement any of the methods described above in the present invention. In addition, the embodiments of the above-mentioned device are merely schematic, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art can understand and implement it without paying any creative work.
[0125] Based on the above method embodiment of the present invention, a corresponding electronic device embodiment is provided.
[0126] An embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the three-dimensional design model optimization method described in any one of the present invention is implemented, or, when the processor executes the computer program, the functions of the modules in the above-mentioned device embodiments are implemented.
[0127] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the terminal device.
[0128] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0129] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.
[0130] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0131] Based on the above method embodiment, the present invention provides a storage medium embodiment;
[0132] Another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute any one of the above-mentioned three-dimensional design model optimization methods of the present invention.
[0133] The storage medium is a computer-readable storage medium, and the computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0134] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0135] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A three-dimensional design model optimization method, characterized in that: include: Obtain the 3D design model files to be optimized and the actual data requirements of the construction scene; Analyze the 3D design model file and generate the geometric data of the parts; According to the actual data requirements of the construction scene, the geometric data of the parts that need to be adjusted are initially adjusted to obtain the primary adjusted parts; Repeat the secondary adjustment operation of the parts until all parts in the 3D design model do not interfere with each other in space, and generate an optimized 3D design model; The secondary adjustment operation of the parts includes: Obtain the current one-time adjustment part; wherein the initial one-time adjustment part is any one-time adjustment part that has not undergone a second adjustment; Calculate the first distance between the current one-time adjustment part and the current one-time adjustment part according to the coordinates of the current one-time adjustment part and the coordinates of the current one-time adjustment part; wherein the one-time adjustment part is the remaining parts in the three-dimensional design model except the current one-time adjustment part, and the initial one-time adjustment part is any one-time adjustment part that has not been compared; According to the size of the current one-time adjustment part and the size of the current part to be compared, the sum of the sizes between the current one-time adjustment part and the current part to be compared is calculated; If the first distance is smaller than the sum of the sizes, the current part to be compared is added to the interference part set; Determine whether the current part to be compared is the last unmatched part to be compared of the current one-time adjustment part; if so, adjust the volume of the current one-time adjustment part according to the geometric data of all parts in the interference part set, and update the geometric data of the current one-time adjustment part; clear the interference part set, and reselect a one-time adjustment part that has not been adjusted twice, and update the current one-time adjustment part; if not, select the next unmatched part to be compared of the current one-time adjustment part, and update the current part to be compared.
2. The three-dimensional design model optimization method according to claim 1, characterized in that: The step of parsing the 3D design model file and generating geometric data of the part includes: Construct layers for the three-dimensional design model and generate several layers; constructing representation graphs for the plurality of layers to generate a plurality of representation graphs; generating an information matrix of a three-dimensional design model according to the plurality of representation diagrams; The information matrix is parsed to generate geometric data of the part.
3. The three-dimensional design model optimization method according to claim 2, characterized in that: The step of calculating the first distance between the current first-adjusted part and the current part to be compared according to the coordinates of the current first-adjusted part and the coordinates of the current part to be compared comprises: According to the coordinates of the current first-adjusted part and the coordinates of the current part to be compared, the Euclidean distance between the current first-adjusted part and the current part to be compared is calculated, and the Euclidean distance is used as the first distance between the current first-adjusted part and the current part to be compared.
4. The three-dimensional design model optimization method according to claim 3, characterized in that: The step of adjusting the volume of the current one-time adjustment part according to the geometric data of all parts in the interfering part set comprises: For each part in the interference parts set, the corresponding volume adjustment amount is calculated according to the size and volume of the part; The adjusted volume is calculated according to the volume adjustment amount and the current volume of the one-time adjustment part; and the volume of the current one-time adjustment part is updated with the adjusted volume.
5. The three-dimensional design model optimization method according to claim 4, characterized in that: According to the actual data requirements of the construction scene, the geometric data of the parts that need to be adjusted are adjusted for the first time. After the adjusted parts are obtained, it also includes: Analyze the 3D design model file and generate the material data of the parts; According to the actual data requirements of the construction scene, the material data of the parts that need to be adjusted will be adjusted, and the material data of the parts that need to be adjusted will be updated.
6. The three-dimensional design model optimization method according to claim 5, characterized in that: After generating the optimized 3D design model, it also includes: Generating a topological relationship between parts according to the plurality of representation graphs; Calculating and generating the complexity of the three-dimensional design model according to the number of topological relationships between the parts and the number of parts; Determining an output format of the three-dimensional design model file according to whether the complexity is greater than a preset complexity threshold; The three-dimensional design model file is output according to the output format.
7. A three-dimensional design model optimization device, characterized in that: include: Data acquisition module, model file parsing module, parts initial adjustment module and model optimization module; The data acquisition module is used to acquire the three-dimensional design model file to be optimized and the actual data requirements of the construction scene; The model file parsing module is used to parse the three-dimensional design model file and generate geometric data of the part; The part initial adjustment module is used to perform initial adjustment on the geometric data of the part to be adjusted according to the actual data requirements of the construction scene to obtain a primary adjusted part; The model optimization module is used to repeatedly perform the part secondary adjustment operation until all parts in the three-dimensional design model do not interfere with each other in space, thereby generating an optimized three-dimensional design model; the part secondary adjustment operation includes: obtaining the current first adjustment part; wherein the initial first adjustment part is any first adjustment part that has not undergone secondary adjustment; according to the coordinates of the current first adjustment part and the coordinates of the current part to be compared, calculating the first distance between the current first adjustment part and the current part to be compared; wherein the part to be compared is the remaining parts in the three-dimensional design model except the current first adjustment part, and the initial part to be compared is any part to be compared that has not undergone comparison; according to the size of the current first adjustment part and the size of the current part to be compared Compare the sizes of the parts, calculate the sum of the sizes between the current one-time adjustment part and the current part to be compared; if the first distance is less than the sum of the sizes, add the current part to be compared to the interference parts set; determine whether the current part to be compared is the last uncompared part to be compared of the current one-time adjustment part; if so, adjust the volume of the current one-time adjustment part according to the geometric data of all parts in the interference parts set, and update the geometric data of the current one-time adjustment part; clear the interference parts set, and reselect a one-time adjustment part that has not been adjusted twice, and update the current one-time adjustment part; if not, select the next uncompared part to be compared of the current one-time adjustment part, and update the current part to be compared.
8. The three-dimensional design model optimization device according to claim 7, characterized in that: The model file parsing module includes: a layer construction unit, a representation graph construction unit, an information matrix generation unit and a geometric data generation unit; The layer construction unit is used to construct layers on the three-dimensional design model to generate a plurality of layers; The representation graph construction unit is used to construct representation graphs for the plurality of layers to generate a plurality of representation graphs; The information matrix generating unit is used to generate an information matrix of the three-dimensional design model according to the plurality of representation diagrams; The geometric data generating unit is used to analyze the information matrix and generate geometric data of the part.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the three-dimensional design model optimization method described in any one of claims 1 to 6 can be implemented.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it can implement the three-dimensional design model optimization method described in any one of claims 1 to 6.
Citation Information
Patent Citations
Three-dimensional model assembly method and system
CN103761408A
Three-dimensional cellular automaton based lightweight model and optimizing method
CN105528494A
