Model collision detection method and system
Through the combination of area division and bounding box detection algorithm, the problems of low collision detection efficiency and insufficient accuracy in the prior art are solved, efficient collision detection of complex models is achieved, and material waste in the 3D printing process is reduced.
Patent Information
- Application Number
- CN202510429287.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-29
AI Technical Summary
In the prior art, the grid-based point-by-point detection calculation is large and it is difficult to meet the real-time requirements. The geometric enclosure method cannot perform fine detection of local collisions in complex models, resulting in insufficient collision detection accuracy and may lead to waste of materials and printing failures during 3D printing.
The target model data is divided by region division rules, and the bounding box detection algorithm is combined with the bounding box detection algorithm to determine the bounding box of each area data part, and the collision detection results are calculated through the intersection detection algorithm, including the use of the octree algorithm and the triangular cross-section algorithm.
It improves the computing efficiency of collision detection, improves the real-time collision detection capability of complex models in the physics engine, and reduces errors and waste in the printing process.
Smart Images

Figure CN120388213A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular, to a method and system for model collision detection. Background Art
[0002] Collision detection is widely used in fields such as computer graphics, physical simulation, and 3D printing. Common methods include point-by-point detection based on grids and detection based on geometric bounding volumes. However, in the prior art, the point-by-point detection based on grids has a large amount of calculation and is difficult to meet the real-time requirement. And the existing methods based on geometric bounding volumes often use overall bounding boxes and cannot perform fine detection on the local collision situation of complex models, resulting in insufficient accuracy of collision detection. In addition, during the 3D printing process, if the collision detection is inaccurate, it may lead to incorrect printing path planning, thereby causing material waste and printing failure. It can be seen that the prior art has defects and urgent solutions are needed. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a method and system for model collision detection, which can effectively improve the calculation efficiency of collision detection, improve the real-time collision detection ability of complex models in a physical engine, and reduce mistakes and waste during the printing process.
[0004] To solve the above technical problem, in the first aspect of the present invention, a method for model collision detection is disclosed, and the method includes: Obtain target model data to be detected; Based on a region division rule, divide the target model data to obtain multiple region data parts; Based on a bounding box detection algorithm, determine a bounding box corresponding to each region data part; According to the bounding box corresponding to each region data part and a preset intersection detection algorithm, determine a collision detection result corresponding to the target model data.
[0005] As an optional implementation manner, in the first aspect of the present invention, the step of dividing the target model data based on a region division rule to obtain multiple region data parts includes: Determine the model size and model use corresponding to the target model data; According to the model size and the model use, determine the region division accuracy; According to the region division accuracy and a preset division algorithm, divide the target model data to obtain multiple region data parts; the division algorithm is an octree algorithm.
[0006] As an alternative implementation, in the first aspect of the present invention, the model size is the actual volume data of the target model data after being 3D printed and formed.
[0007] As an alternative implementation, in the first aspect of the present invention, the model uses include one or more of product design use, architectural planning use, medical diagnosis use, film and television production use, game development use, virtual reality environment modeling use, urban planning use, cultural relic protection use, education and training use, and engineering analysis use.
[0008] As an alternative implementation, in the first aspect of the present invention, determining the regional division accuracy according to the model size and the model use includes: Determining a plurality of first division data records matching the model size and a plurality of second division data records matching the model use in the historical division database; Calculating the average value of the division accuracies in all the first division data records to obtain the first division accuracy; Calculating the average value of the division accuracies in all the second division data records to obtain the second division accuracy; Calculating the weighted sum average value of the first division accuracy and the second division accuracy to obtain the regional division accuracy.
[0009] As an alternative implementation, in the first aspect of the present invention, when calculating the weighted sum average value of the first division accuracy and the second division accuracy, the first weight corresponding to the first division accuracy is greater than the second weight corresponding to the second division accuracy; the first weight is proportional to the total number of records of the first division data records; the second weight is proportional to the total number of records of the second division data records.
[0010] As an alternative implementation, in the first aspect of the present invention, determining the collision detection result corresponding to the target model data according to the bounding box corresponding to each region data part and a preset intersection detection algorithm includes: Determining the moving route of the print head corresponding to the target model data; For the bounding box corresponding to each region data part, determining the intersection situation between the bounding box and the moving route of the print head based on the triangle facet intersection algorithm; Determining the intersection situations corresponding to all the bounding boxes as the collision detection result corresponding to the target model data.
[0011] As an alternative implementation, in the first aspect of the present invention, determining the moving route of the print head corresponding to the target model data includes: Input the target model data into the trained print head route prediction neural network to obtain the print head movement route corresponding to the target model data; the print head route prediction neural network is trained by a training data set including a plurality of training model data and corresponding print head movement route annotations.
[0012] The second aspect of the embodiments of the present invention discloses a model collision detection system, the system includes: An acquisition module, configured to acquire target model data to be detected; A division module, configured to divide the target model data based on a region division rule to obtain a plurality of region data parts; A determination module, configured to determine a bounding box corresponding to each of the region data parts based on a bounding box detection algorithm; A detection module, configured to determine a collision detection result corresponding to the target model data according to the bounding box corresponding to each of the region data parts and a preset intersection detection algorithm.
[0013] As an optional implementation manner, in the second aspect of the present invention, the specific manner in which the division module divides the target model data based on a region division rule to obtain a plurality of region data parts includes: Determine the model size and model use corresponding to the target model data; Determine the region division accuracy according to the model size and the model use; Divide the target model data according to the region division accuracy and a preset division algorithm to obtain a plurality of region data parts; the division algorithm is an octree algorithm.
[0014] As an optional implementation manner, in the second aspect of the present invention, the model size is the actual volume data of the target model data after being 3D printed and formed.
[0015] As an optional implementation manner, in the second aspect of the present invention, the model use includes one or more of product design use, architectural planning use, medical diagnosis use, film and television production use, game development use, virtual reality environment modeling use, urban planning use, cultural relic protection use, education and training use, and engineering analysis use.
[0016] As an optional implementation manner, in the second aspect of the present invention, the specific manner in which the division module determines the region division accuracy according to the model size and the model use includes: Determine a plurality of first division data records matching the model size and a plurality of second division data records matching the model use in a historical division database; Calculate the average value of the partitioning accuracies in all the first partition data records to obtain the first partitioning accuracy; Calculate the average value of the partitioning accuracies in all the second partition data records to obtain the second partitioning accuracy; Calculate the weighted sum average of the first partitioning accuracy and the second partitioning accuracy to obtain the regional partitioning accuracy.
[0017] As an alternative implementation, in the second aspect of the present invention, when calculating the weighted sum average of the first partitioning accuracy and the second partitioning accuracy, the first weight corresponding to the first partitioning accuracy is greater than the second weight corresponding to the second partitioning accuracy; the first weight is proportional to the total number of records of the first partition data records; the second weight is proportional to the total number of records of the second partition data records.
[0018] As an alternative implementation, in the second aspect of the present invention, the specific manner in which the detection module determines the collision detection result corresponding to the target model data according to the bounding box corresponding to each region data part and a preset intersection detection algorithm includes: Determine the print head movement route corresponding to the target model data; For the bounding box corresponding to each region data part, based on the triangle facet intersection algorithm, determine the intersection situation between the bounding box and the print head movement route; Determine the intersection situations corresponding to all the bounding boxes as the collision detection result corresponding to the target model data.
[0019] As an alternative implementation, in the second aspect of the present invention, the specific manner in which the detection module determines the print head movement route corresponding to the target model data includes: Input the target model data into a trained print head route prediction neural network to obtain the print head movement route corresponding to the target model data; the print head route prediction neural network is trained by a training data set including a plurality of training model data and corresponding print head movement route annotations.
[0020] The third aspect of the present invention discloses another model collision detection system, the system includes: A memory storing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory and executes some or all of the steps in the model collision detection method disclosed in the first aspect of the present invention.
[0021] A fourth aspect of the present invention discloses a computer storage medium storing computer instructions, which are used to execute some or all of the steps in the model collision detection method disclosed in the first aspect of the present invention when called.
[0022] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: The present invention can partition the target model data based on the region partitioning rule, combine the bounding box detection algorithm to determine the bounding boxes of each region, and then calculate the collision detection result through the intersection detection algorithm, so as to effectively improve the calculation efficiency of collision detection, improve the real-time collision detection ability of complex models in the physics engine, and reduce mistakes and waste in the printing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0024] Figure 1 It is a flowchart of a model collision detection method disclosed in an embodiment of the present invention.
[0025] Figure 2 It is a structural diagram of a model collision detection system disclosed in an embodiment of the present invention.
[0026] Figure 3 It is a structural diagram of another model collision detection system disclosed in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0028] In the description, claims and the above-mentioned drawings of the present invention, terms such as "first", "second", etc. are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include unlisted steps or units, or may optionally further include other steps or units inherent to these processes, methods, products or equipment.
[0029] Reference to "embodiment" herein means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present invention. The phrase appears in various places in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein can be combined with other embodiments.
[0030] The present invention discloses a model collision detection method and system, which can divide target model data based on region division rules, determine the bounding boxes of each region in combination with the bounding box detection algorithm, and then calculate the collision detection result through the intersection detection algorithm, thereby effectively improving the computational efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and wastes during the printing process. The following will be described in detail respectively.
[0031] Embodiment 1 Please refer to Figure 1 , Figure 1 which is a schematic flowchart of a model collision detection method disclosed in an embodiment of the present invention. Among them, Figure 1 the described model collision detection method can be applied to a data processing system / data processing device / data processing server (wherein, the server includes a local processing server or a cloud processing server). As Figure 1 shown, the model collision detection method may include the following operations: 101. Obtain target model data to be detected.
[0032] 102. Based on the region division rules, divide the target model data to obtain multiple region data parts. 103. Based on the bounding box detection algorithm, determine the bounding box corresponding to each region data part. 104. According to the bounding box corresponding to each region data part and a preset intersection detection algorithm, determine the collision detection result corresponding to the target model data.
[0033] It can be seen that the above-described inventive embodiments can partition the target model data based on the region partitioning rule, determine the bounding boxes of each region in combination with the bounding box detection algorithm, and then calculate the collision detection result through the intersection detection algorithm, thereby effectively improving the computational efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0034] As an alternative embodiment, in the above steps, partitioning the target model data based on the region partitioning rule to obtain multiple region data parts includes: Determine the model size and model usage corresponding to the target model data; Determine the region partitioning accuracy according to the model size and model usage; Partition the target model data according to the region partitioning accuracy and a preset partitioning algorithm to obtain multiple region data parts; the partitioning algorithm is the octree algorithm.
[0035] It can be seen that through the above alternative embodiment, the region partitioning accuracy is determined based on the size and usage of the target model data, and the region partitioning is performed through the octree algorithm, enabling the granularity of the region partitioning to adapt to the requirements of different models, thereby improving the computational efficiency and detection accuracy of subsequent collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0036] As an alternative embodiment, in the above steps, the model size is the actual volume data of the target model data after being formed by 3D printing.
[0037] It can be seen that through the above alternative embodiment, the content of the model size is defined to comprehensively represent the characteristics related to the model size, facilitating subsequent precise model partitioning, assisting in improving the computational efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0038] As an alternative embodiment, in the above steps, the model usage includes one or more of product design usage, architectural planning usage, medical diagnosis usage, film and television production usage, game development usage, virtual reality environment modeling usage, urban planning usage, cultural relic protection usage, education and training usage, and engineering analysis usage.
[0039] It can be seen that through the above alternative embodiment, the content of the model usage is defined to comprehensively represent the characteristics related to the model usage, facilitating subsequent precise model partitioning, assisting in improving the computational efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0040] As an alternative embodiment, in the above steps, determining the regional division accuracy according to the model size and the model usage includes: Determine a plurality of first division data records matching the model size and a plurality of second division data records matching the model usage in the historical division database; Calculate the average value of the division accuracies in all the first division data records to obtain the first division accuracy; Calculate the average value of the division accuracies in all the second division data records to obtain the second division accuracy; Calculate the weighted sum average of the first division accuracy and the second division accuracy to obtain the regional division accuracy.
[0041] It can be seen that through the above alternative embodiment, by matching the division data records corresponding to the model size and usage in the historical division database and calculating the weighted sum average of their division accuracies, the regional division accuracy is dynamically determined, enabling the division accuracy to be adaptively adjusted according to historical data, assisting in improving the calculation efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste in the printing process.
[0042] As an alternative embodiment, in the above steps, when calculating the weighted sum average of the first division accuracy and the second division accuracy, the first weight corresponding to the first division accuracy is greater than the second weight corresponding to the second division accuracy; the first weight is proportional to the total number of records of the first division data records; the second weight is proportional to the total number of records of the second division data records.
[0043] It can be seen that through the above alternative embodiment, the weight details in the calculation of the division accuracy are defined, enabling the division accuracy to be adaptively adjusted according to historical data, assisting in improving the calculation efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste in the printing process.
[0044] As an alternative embodiment, in the above steps, determining the collision detection result corresponding to the target model data according to the bounding box corresponding to each regional data part and a preset intersection detection algorithm includes: Determine the movement route of the print head corresponding to the target model data; For the bounding box corresponding to each regional data part, based on the triangle facet intersection algorithm, determine the intersection situation between the bounding box and the movement route of the print head; Determine the intersection situations corresponding to all the bounding boxes as the collision detection result corresponding to the target model data.
[0045] It can be seen that through the above optional embodiments, by detecting the intersection between the bounding box of each regional data part and the moving route of the print head based on the triangular patch intersection algorithm, and synthesizing the intersection conditions of all bounding boxes, the collision detection result of the target model data is determined, so as to accurately identify the possible collisions during the printing process, improve the calculation efficiency of collision detection, enhance the real-time collision detection ability of complex models in the physics engine, and reduce mistakes and waste during the printing process.
[0046] As an optional embodiment, in the above steps, determining the moving route of the print head corresponding to the target model data includes: Inputting the target model data into a trained print head route prediction neural network to obtain the moving route of the print head corresponding to the target model data; the print head route prediction neural network is trained through a training data set including multiple training model data and corresponding print head moving route annotations.
[0047] It can be seen that through the above optional embodiments, by inputting the target model data into a trained print head route prediction neural network, the corresponding moving route of the print head is automatically predicted, thereby improving the accuracy of the printing path, enhancing the calculation efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0048] Embodiment 2 Please refer to Figure 2 , Figure 2 which is a schematic structural diagram of a model collision detection system disclosed in an embodiment of the present invention. Among them, Figure 2 the described model collision detection system can be applied to a data processing system / data processing device / data processing server (wherein, the server includes a local processing server or a cloud processing server). As Figure 2 shown, the model collision detection system may include: An acquisition module 201, configured to acquire target model data to be detected.
[0049] A partitioning module 202, configured to partition the target model data based on a region partitioning rule to obtain multiple regional data parts. A determination module 203, configured to determine the bounding box corresponding to each regional data part based on a bounding box detection algorithm. A detection module 204, configured to determine the collision detection result corresponding to the target model data according to the bounding box corresponding to each regional data part and a preset intersection detection algorithm.
[0050] It can be seen that the above-described invention embodiments can divide the target model data based on the region division rule, determine the bounding boxes of each region in combination with the bounding box detection algorithm, and then calculate the collision detection result through the intersection detection algorithm, thereby effectively improving the calculation efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0051] As an optional embodiment, the specific manner in which the division module divides the target model data based on the region division rule to obtain multiple region data parts includes: Determine the model size and model usage corresponding to the target model data; Determine the region division accuracy according to the model size and model usage; Divide the target model data according to the region division accuracy and a preset division algorithm to obtain multiple region data parts; the division algorithm is the octree algorithm.
[0052] It can be seen that through the above optional embodiment, the region division accuracy is determined based on the size and usage of the target model data, and the region division is performed through the octree algorithm, so that the granularity of the region division can adapt to the needs of different models, thereby improving the calculation efficiency and detection accuracy of subsequent collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0053] As an optional embodiment, the model size is the actual volume data of the target model data after being formed by 3D printing.
[0054] It can be seen that through the above optional embodiment, the content of the model size is defined to comprehensively represent the characteristics related to the model size, so as to facilitate subsequent precise model division and assist in improving the calculation efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0055] As an optional embodiment, the model usage includes one or more of product design usage, architectural planning usage, medical diagnosis usage, film and television production usage, game development usage, virtual reality environment modeling usage, urban planning usage, cultural relic protection usage, education and training usage, and engineering analysis usage.
[0056] It can be seen that through the above optional embodiment, the content of the model usage is defined to comprehensively represent the characteristics related to the model usage, so as to facilitate subsequent precise model division and assist in improving the calculation efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0057] As an optional embodiment, the specific manner in which the partitioning module determines the regional partitioning accuracy according to the model size and model usage includes: Determine multiple first partitioning data records that match the model size and multiple second partitioning data records that match the model usage in the historical partitioning database; Calculate the average value of the partitioning accuracies in all the first partitioning data records to obtain the first partitioning accuracy; Calculate the average value of the partitioning accuracies in all the second partitioning data records to obtain the second partitioning accuracy; Calculate the weighted summation average of the first partitioning accuracy and the second partitioning accuracy to obtain the regional partitioning accuracy.
[0058] It can be seen that through the above optional embodiment, by matching the partitioning data records corresponding to the model size and usage in the historical partitioning database and calculating the weighted summation average of their partitioning accuracies, the regional partitioning accuracy is dynamically determined, enabling the partitioning accuracy to be adaptively adjusted according to historical data, assisting in improving the calculation efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physical engine, and reducing mistakes and waste during the printing process.
[0059] As an optional embodiment, when calculating the weighted summation average of the first partitioning accuracy and the second partitioning accuracy, the first weight corresponding to the first partitioning accuracy is greater than the second weight corresponding to the second partitioning accuracy; the first weight is proportional to the total number of records of the first partitioning data records; the second weight is proportional to the total number of records of the second partitioning data records.
[0060] It can be seen that through the above optional embodiment, the weight details during the calculation of the partitioning accuracy are defined, enabling the partitioning accuracy to be adaptively adjusted according to historical data, assisting in improving the calculation efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physical engine, and reducing mistakes and waste during the printing process.
[0061] As an optional embodiment, the specific manner in which the detection module determines the collision detection result corresponding to the target model data according to the bounding box corresponding to each region data part and the preset intersection detection algorithm includes: Determine the movement route of the print head corresponding to the target model data; For the bounding box corresponding to each region data part, determine the intersection situation between the bounding box and the movement route of the print head based on the triangle facet intersection algorithm; Determine the intersection situations corresponding to all the bounding boxes as the collision detection result corresponding to the target model data.
[0062] It can be seen that through the above optional embodiments, by detecting the intersection between the bounding box of each regional data part and the moving route of the print head based on the triangular patch intersection algorithm, and comprehensively considering the intersection situations of all bounding boxes, the collision detection result of the target model data is determined, thereby accurately identifying possible collisions during the printing process, improving the computational efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0063] As an optional embodiment, the specific manner for the detection module to determine the moving route of the print head corresponding to the target model data includes: Inputting the target model data into a trained print head route prediction neural network to obtain the moving route of the print head corresponding to the target model data; the print head route prediction neural network is trained through a training data set including multiple training model data and corresponding print head moving route annotations.
[0064] It can be seen that through the above optional embodiments, by inputting the target model data into a trained print head route prediction neural network, the corresponding moving route of the print head is automatically predicted, thereby improving the accuracy of the printing path, enhancing the computational efficiency of collision detection, enhancing the real-time collision detection ability of complex models in the physics engine, and reducing mistakes and waste during the printing process.
[0065] Embodiment III Please refer to Figure 3 , Figure 3 which is another model collision detection system disclosed in the embodiments of the present invention. Figure 3 The described model collision detection system is applied to a data processing system / data processing device / data processing server (wherein, the server includes a local processing server or a cloud processing server). As Figure 3 shown, the model collision detection system may include: A memory 301 storing executable program code; A processor 302 coupled to the memory 301; Wherein, the processor 302 calls the executable program code stored in the memory 301 to execute the steps of the model collision detection method described in Embodiment I.
[0066] Embodiment IV The embodiments of the present invention disclose a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the model collision detection method described in Embodiment I.
[0067] Embodiment V An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps of the model collision detection method described in Embodiment 1.
[0068] The above describes specific embodiments of this specification, and other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily have to be performed in the specific order or continuous order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0069] The systems, devices, modules, or units illustrated in the above embodiments may be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0070] For convenience of description, the above device is described by dividing it into various units according to functions. Of course, when implementing this specification, the functions of each unit may be implemented in one or more software and / or hardware.
[0071] Those skilled in the art should understand that the embodiments of this specification may be provided as a method, a system, or a computer program product. Therefore, the embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0072] This specification is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of this specification. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable data processing devices to generate a machine, such that the instructions executed by the processors of the computer or other programmable data processing devices generate for implementing in the process Figure 1one or more processes and / or blocks Figure 1 means for the functions specified in one or more blocks
[0073] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction means that implements the functions in the process Figure 1 one or more processes and / or blocks Figure 1 the functions specified in one or more blocks
[0074] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus, such that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions in the process Figure 1 one or more processes and / or blocks Figure 1 the steps of the functions specified in one or more blocks
[0075] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0076] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
[0077] Computer-readable media includes both permanent and non-permanent, removable and non-removable media implemented by any method or technology for information storage. The information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.
[0078] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, commodity or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, commodity or device comprising said element.
[0079] This specification can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0080] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and reference can be made to the corresponding part of the method embodiment for the relevant content.
[0081] Finally, it should be noted that the model collision detection method and system disclosed in the embodiments of the present invention only disclose the preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for model collision detection, characterized in that, The method includes: Obtaining target model data to be detected; Based on the region division rule, dividing the target model data to obtain multiple regional data parts; Based on the bounding box detection algorithm, determining the bounding box corresponding to each regional data part; According to the bounding box corresponding to each regional data part and a preset intersection detection algorithm, determining the collision detection result corresponding to the target model data.
2. The model collision detection method according to claim 1, wherein The dividing the target model data based on the region division rule to obtain multiple regional data parts includes: Determining the model size and model usage corresponding to the target model data; According to the model size and the model usage, determining the region division accuracy; According to the region division accuracy and a preset division algorithm, dividing the target model data to obtain multiple regional data parts; the division algorithm is an octree algorithm.
3. The model collision detection method according to claim 2, wherein The model size is the actual volume data of the target model data after being 3D printed and formed.
4. The model collision detection method according to claim 2, wherein The model usage includes one or more of product design usage, architectural planning usage, medical diagnosis usage, film and television production usage, game development usage, virtual reality environment modeling usage, urban planning usage, cultural relic protection usage, education and training usage, and engineering analysis usage.
5. The model collision detection method according to claim 2, characterized in that, The determining the region division accuracy according to the model size and the model usage includes: Determining multiple first division data records matching the model size and multiple second division data records matching the model usage in the historical division database; Calculating the average value of the division accuracies in all the first division data records to obtain a first division accuracy; Calculating the average value of the division accuracies in all the second division data records to obtain a second division accuracy; Calculating the weighted summation average value of the first division accuracy and the second division accuracy to obtain the region division accuracy.
6. The model collision detection method according to claim 5, wherein, When calculating the weighted summation average value of the first division accuracy and the second division accuracy, the first weight corresponding to the first division accuracy is greater than the second weight corresponding to the second division accuracy; the first weight is proportional to the total number of records of the first division data records; the second weight is proportional to the total number of records of the second division data records.
7. The model collision detection method according to claim 1, wherein The determining the collision detection result corresponding to the target model data according to the bounding box corresponding to each regional data part and a preset intersection detection algorithm includes: Determining the print head movement route corresponding to the target model data; For the bounding box corresponding to each regional data part, based on the triangular facet intersection algorithm, determining the intersection situation between the bounding box and the print head movement route; Determining the intersection situations corresponding to all the bounding boxes as the collision detection result corresponding to the target model data.
8. The model collision detection method according to claim 7, wherein The determining the print head movement route corresponding to the target model data includes: Input the target model data into the trained print head route prediction neural network to obtain the print head movement route corresponding to the target model data; the print head route prediction neural network is trained through a training data set including a plurality of training model data and corresponding print head movement route annotations.
9. A model collision detection system, characterized in that, The system includes: An acquisition module, configured to acquire target model data to be detected; A division module, configured to divide the target model data based on a region division rule to obtain a plurality of region data parts; A determination module, configured to determine a bounding box corresponding to each of the region data parts based on a bounding box detection algorithm; A detection module, configured to determine a collision detection result corresponding to the target model data according to the bounding box corresponding to each of the region data parts and a preset intersection detection algorithm.
10. A model collision detection system, characterized in that, The system includes: A memory storing executable program code; A processor coupled to the memory; The processor calls the executable program code stored in the memory and executes the model collision detection method according to any one of claims 1-8.