A three-dimensional design model optimization method and device, electronic equipment and storage medium
By obtaining the actual data of the construction scene in the 3D design model and adjusting the part geometry and material data in the model, the problem of interference between parts during construction was solved, and efficient and safe construction of the model was achieved.
Patent Information
- Application Number
- CN202411492416.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-10-24
AI Technical Summary
The existing three-dimensional design models do not fully consider the actual needs of the construction scenario, which leads to spatial interference between parts during the construction process, affecting the safety and efficiency of construction.
By obtaining the actual data requirements of the construction scene, parsing the 3D design model file, generating the geometric and material data of the parts, and repeatedly adjusting the geometric and material data of the parts until the spatial interference between the parts is eliminated, an optimized 3D design model is generated.
Ensure that the 3D design model can be implemented efficiently and safely during construction, avoid spatial interference between parts, and improve the reliability and accuracy of construction.
Smart Images

Figure CN119227412B_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. Therefore, they cannot be directly used in actual construction scenarios. These actual needs may include space limitations at the construction site, actual equipment installation locations, 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 a 3D design model, geometric interference between the various parts in the model often occurs. 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 other parts, causing assembly interference. If these interference issues are not discovered and properly addressed in a timely manner, they may have a variety of 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] Embodiments of the present invention provide a 3D design model optimization method, apparatus, electronic device, and storage medium. By implementing the present invention, 3D design model files can be adjusted based on actual data requirements to ensure efficient and safe implementation 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 file to be optimized and the actual data requirements of the construction scene.
[0007] Analyze 3D design model files and generate part geometry data.
[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 do not interfere with each other in space, 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 secondary 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 the 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 based on the plurality of representation diagrams.
[0020] The information matrix is analyzed to generate geometric data of the part.
[0021] Further, the first distance between the current one-time adjustment part and the current part to be compared is calculated according to the coordinates of the current one-time adjustment part and the coordinates of the current part to be compared, and the first distance comprises:
[0022] According to the coordinates of the current one-time adjustment part and the coordinates of the current part to be compared, the Euclidean distance between the current one-time adjustment part and the current part to be compared is calculated, and the Euclidean distance is taken as the first distance between the current one-time adjustment part and the current part to be compared.
[0023] Further, 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 adjusting comprises:
[0024] For each part in the interference part set, a corresponding volume adjustment amount is calculated according to the size and volume of the part.
[0025] According to the volume adjustment amount and the volume of the current one-time adjustment part, an adjusted volume is calculated; and the adjusted volume is used to update the volume of the current one-time adjustment part.
[0026] Further, after the geometric data of the part to be adjusted is initially adjusted according to the actual data requirement of the construction scene to obtain a one-time adjustment part, the method further comprises:
[0027] The material data of the part is generated by analyzing the three-dimensional design model file.
[0028] According to the actual data requirement of the construction scene, the material data of the part to be adjusted is adjusted to update the material data of the part to be adjusted.
[0029] Further, after the optimized three-dimensional design model is generated, the method further comprises:
[0030] According to the plurality of representation graphs, the topological relationship between the parts is generated.
[0031] According to the number of topological relationships between the parts and the number of parts, the complexity of generating the three-dimensional design model is calculated.
[0032] According to whether the complexity is greater than a preset complexity threshold, the output format of the three-dimensional design model file is determined.
[0033] The three-dimensional design model file is output according to the output format.
[0034] On the basis of the above-mentioned method embodiment, the application provides a device embodiment.
[0035] An embodiment of the present invention provides a three-dimensional design model optimization device, comprising: 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 obtain 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 the 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 configured to repeatedly perform a part secondary adjustment operation until all parts in the three-dimensional design model are spatially free of interference, thereby generating an optimized three-dimensional design model. The part secondary adjustment operation includes obtaining a current primary adjustment part. The initial primary adjustment part is any primary adjustment part that has not undergone secondary adjustment. Based on the coordinates of the current primary adjustment part and the coordinates of the current part to be compared, a first distance is calculated between the current primary adjustment part and the current part to be compared. The parts to be compared are the remaining parts in the three-dimensional design model except the current primary adjustment part, and the initial part to be compared is any part to be compared that has not undergone comparison. Based on the dimensions of the current primary adjustment part and the dimensions of the current part to be compared, the sum of the dimensions between the current primary adjustment part and the current part to be compared is calculated. If the first distance is less than the sum of the dimensions, the current part to be compared is added to the interference part set. A determination is then made as to whether the current part to be compared is the last uncompared part of the current primary adjustment part. If so, the volume of the current primary adjustment part is adjusted based on the geometric data of all parts in the interference part set, thereby updating the geometric data of the current part to be compared. Clear the interference part set and reselect a primary adjustment part that has not been adjusted twice to update the current primary adjustment part. If not, select the next unmatched part to be compared after the current primary 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, comprising 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-mentioned method embodiments can be implemented.
[0047] Based on the above method embodiment, the present invention provides a corresponding storage medium 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] Embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for optimizing a three-dimensional design model. The method preliminarily adjusts the geometric data of parts requiring adjustment in a three-dimensional design model file based on the actual data requirements of the construction scenario, generating a primary adjustment part. The volume of the primary adjustment part is appropriately adjusted based on the degree of interference between the primary adjustment part and other parts. Repeated adjustments are performed until spatial interference between parts is eliminated, generating an optimized three-dimensional design model.
[0051] The present invention solves 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, by appropriately adjusting the volume of the primary adjustment part that is interfered with by other parts. 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 flowchart of a secondary adjustment operation of a part provided by an 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 clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall 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 includes at least 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's important to note that 3D design model files are data files used to store the geometric information, topological structure, and related properties of 3D objects. They are widely used in fields such as industrial design, architecture, manufacturing, game development, and virtual reality to represent the 3D form and structure of objects, supporting subsequent visualization, analysis, simulation, and manufacturing operations.
[0059] 3D design models are typically generated under idealized conditions based on standard geometry and design data. These models fail to fully account for the practical requirements of specific construction scenarios and, therefore, cannot be directly applied to actual construction. In actual construction scenarios, spatial constraints, equipment installation locations, material selection, and other issues may differ from those encountered during the design phase. For example, the construction site's spatial dimensions, equipment installation locations, and building geometry may deviate from the theoretical model. Therefore, to ensure efficient and safe implementation of the model in actual construction, the 3D design model file must be adjusted based on 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 obstacle locations.
[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 architectural 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 based on the plurality of representation diagrams.
[0073] The information matrix is analyzed to generate geometric data of the part.
[0074] It's important to note that when optimizing a 3D design model file, you first need to structure the model in layers. Layer construction involves organizing the model's assembly information into layers, with assemblies representing the most complete components within the model. This layered management allows for more efficient organization and processing of assembly information within the model, facilitating subsequent analysis and adjustments.
[0075] After building a layer, you need to generate a representation of the layer. This representation contains information about each part in the model, visually reflecting the structure and layout of the parts. This representation allows for a clearer understanding of the relationships between parts in the model and provides a foundation for acquiring and parsing geometric data.
[0076] Next, the representation graph can be used to obtain the information matrix of the 3D design model. This 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 evaluation and optimization of the model. This 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, based on the actual data requirements of the construction scene, the geometric data of the parts that need to be adjusted will be initially adjusted. This means that the geometric data of the parts must first be modified based on the actual conditions such as on-site load requirements, environmental conditions, geometric shape and space limitations of the building, and equipment installation location. These adjusted geometric data will generate an adjusted 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 3D design model files and generate material data of 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 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 subsequent further optimization and interference checking.
[0083] Step S4: Repeat the secondary adjustment operation of the parts 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.
[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. The initial primary adjustment part is any primary adjustment part that has not undergone secondary adjustment;
[0086] Step S4.2: Calculate a first distance between the current one-time adjustment part and the current part to be compared based on the coordinates of the current one-time adjustment part and the coordinates of the current part to be compared.
[0087] In an optional embodiment, the calculating the first distance between the current one-time adjustment part and the current one-time adjustment part based on the coordinates of the current one-time adjustment part and the coordinates of the current one-time adjustment part includes:
[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: Calculate the sum of the sizes of the current once-adjusted part and the current part to be compared based on the size of 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 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 that if the first distance is less than the sum of the dimensions, it is considered that there is spatial interference between the current adjustment part and the current part to be compared. Spatial interference means that the two parts overlap or are too close in real space, which may cause them to not fit or function properly during actual construction or assembly. Therefore, these interfering parts need to be optimized and adjusted.
[0096] In this case, the part to be compared is first added to the interference part set, which records all parts that interfere with the part to be compared. Next, the part to be compared needs to be analyzed and adjusted based on 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, adjusting the volume of the current one-time adjustment part according to the geometric data of all parts in the interfering parts set includes:
[0099] For each part in the interference parts set, the corresponding volume adjustment amount is calculated based on the size and volume of the part;
[0100] The adjusted volume is calculated based on the volume adjustment amount and the current volume of the primary adjustment part; and the volume of the current primary adjustment part is updated with the adjusted volume.
[0101] Specifically, for each part in the interfering parts set, the volume adjustment amount for that part is calculated based on its size and volume. Specifically, the size of each interfering part is multiplied by the volume adjustment coefficient 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; the volume adjustment coefficient can be selected based on actual conditions. This calculation method aims to determine the degree of interference of a part on the currently adjusted part based on its geometric proportions. In this way, the impact 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 adjustments, the volume of the current primary adjustment part is optimized. Specifically, the volume of the current primary adjustment part is recalculated by combining these volume adjustments to obtain a new volume value. The formula is: the adjusted volume is equal to the initial volume of the current primary 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 primary adjustment part is properly considered, ultimately resulting in the adjusted volume.
[0103] Finally, the geometric data of the current single-adjustment part is updated using the adjusted volume, and the new volume data is applied to the model to ensure that it no longer spatially interferes with other parts. 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 scenario while avoiding assembly problems caused by spatial interference. 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, the optimization process is complete. At this point, an optimized 3D design model that meets construction requirements 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 the parts according to the plurality of representation graphs;
[0106] Calculating and generating the complexity of the three-dimensional design model based on 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] Output the three-dimensional design model file according to the output format.
[0109] In practice, topological relationships between parts are constructed based on the generated representations. Topological relationships reflect the connections, adjacencies, and interactions between parts in a 3D design model. These relationships encompass not only geometric adjacency but also structural connections or functional dependencies. By analyzing these relationships, the relative positions and functional connections between parts in the model can be clarified, providing a foundation for subsequent complexity calculation and optimization.
[0110] Next, based on the topological relationships between parts, the model's topological relationship count is calculated. This refers to the number of geometric or structural connections between different parts in the model. The quotient of the number of topological relationships between parts and the number of parts is calculated as the complexity of the 3D design model. This calculation formula indicates 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 finer 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 and the connection relationship between the parts is more intuitive. It is sufficient to choose a simpler surface subdivision display method. 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 embodiments, the present invention provides corresponding device embodiments.
[0114] like Figure 3 As shown, an embodiment of the present invention provides a three-dimensional design model optimization device, comprising: 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 that needs 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 undergone secondary adjustment; according to the coordinates of the current one-time adjustment part and the coordinates of the current part to be compared, calculating the first distance between the current one-time 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 one-time adjustment part, and the initial one-time adjustment part is any one-time adjustment part that has not undergone secondary adjustment; according to the size of the current one-time adjustment part and the current 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 configured 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-mentioned 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 can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the embodiment of the device 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. 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 each module 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 performing specific functions, and the instruction segments 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 computer, 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, connecting various parts of the entire terminal device using various interfaces and lines.
[0130] The memory can be used to store the computer programs and / or modules, and the processor implements various functions of the terminal device by running or executing the computer programs and / or modules 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 based on 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 (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0131] Based on the above method embodiment, the present invention provides a corresponding 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 of the above-mentioned three-dimensional design model optimization methods of the present invention.
[0133] The above-mentioned 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. 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 reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean 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 appropriate manner in any one or more embodiments or examples. In addition, those skilled in the art may combine and integrate different embodiments or examples described in this specification, as well as features of different embodiments or examples, unless they are mutually inconsistent.
[0135] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles 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; Construct layers of the 3D design model to 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; parsing the information matrix to generate geometric data of the part; 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 adjusted parts; Repeat the secondary adjustment operation 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 primary adjustment part; wherein the initial primary adjustment part is any primary adjustment part that has not undergone secondary adjustment; Calculating a first distance between the current one-time adjustment part and the current one-time comparison part based on the coordinates of the current one-time adjustment part and the coordinates of the current one-time comparison part; wherein the one-time comparison part is the remaining parts in the three-dimensional design model except the current one-time adjustment part, and the initial one-time comparison part is any one-time comparison part that has not been compared; Calculate the sum of the sizes of the current one-time adjustment part and the current part to be compared based on the size of the current one-time adjustment part and the size of the current part to be compared; 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; 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: For each part in the interference parts set, the corresponding volume adjustment amount is calculated based on the size and volume of the part; The adjusted volume is calculated based on the volume adjustment amount and the current volume of the primary adjustment part; and the volume of the current primary adjustment part is updated with the adjusted volume.
2. The three-dimensional design model optimization method according to claim 1, characterized in that: The step of calculating the first distance between the current one-time adjustment part and the current one-time adjustment part based on the coordinates of the current one-time adjustment part and the coordinates of the current one-time adjustment part includes: 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.
3. The three-dimensional design model optimization method according to claim 2, characterized in that: After the geometric data of the parts that need to be adjusted are initially adjusted according to the actual data requirements of the construction scene and the adjusted parts are obtained, the following steps are also included: Analyze 3D design model files and generate material data of 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 updated.
4. The three-dimensional design model optimization method according to claim 3, characterized in that: After generating the optimized 3D design model, it also includes: generating a topological relationship between the parts according to the plurality of representation graphs; Calculating and generating the complexity of the three-dimensional design model based on 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; Output the three-dimensional design model file according to the output format.
5. 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 obtain the 3D design model file to be optimized and the actual data requirements of the construction scene; The model file parsing module is used to construct layers of the three-dimensional design model to generate a plurality of layers; construct representation graphs of the plurality of layers to generate a plurality of representation graphs; generate an information matrix of the three-dimensional design model based on the plurality of representation graphs; and parse the information matrix to generate geometric data of the part; 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; 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 one-time adjustment part; wherein the initial one-time adjustment part is any one-time adjustment part that has not undergone secondary adjustment; according to the coordinates of the current one-time adjustment part and the coordinates of the current part to be compared, calculating the first distance between the current one-time 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 one-time adjustment part, and the initial one-time adjustment part is any one-time adjustment part that has not undergone comparison; according to the size of the current one-time adjustment part and the size of the current part to be compared Compare the sizes of the parts and calculate the sum of the sizes of 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; 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: For each part in the interference parts set, the corresponding volume adjustment amount is calculated based on the size and volume of the part; The adjusted volume is calculated based on the volume adjustment amount and the current volume of the primary adjustment part; and the volume of the current primary adjustment part is updated with the adjusted volume.
6. 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 according to any one of claims 1 to 4 can be implemented.
7. 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 4.
Citation Information
Patent Citations
Three-dimensional model assembly method and system
CN103761408A
Three-dimensional cellular automaton based lightweight model and optimizing method
CN105528494A