Model batch punching method, device and equipment and medium

By constructing a parallel Boolean operation method for circumscribed geometry, the problems of complexity accumulation and low efficiency in batch punching of models are solved, achieving efficient parallel batch punching and simplifying the 3D modeling process.

CN122023707APending Publication Date: 2026-05-12PLANT RESOURCE TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PLANT RESOURCE TECH CO LTD
Filing Date
2026-04-10
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing technologies for batch punching of models suffer from problems of accumulated complexity and low efficiency. In particular, during 3D modeling, serial Boolean operations increase the complexity of the model's geometric topology, affecting the efficiency of batch punching.

Method used

By constructing an external geometry corresponding to each target hole, Boolean operations are performed on the model parameter set of the model to be punched and the geometric hole parameter set of the external geometry to obtain the first batch of punching results. The results are then batch-corrected based on the coordinates of multiple second vertices of the target holes to achieve parallel batch punching.

Benefits of technology

While ensuring the accuracy of the holes, the accumulation of drilling complexity is avoided, the efficiency of batch drilling of models is improved, and the calculation process is simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122023707A_ABST
    Figure CN122023707A_ABST
Patent Text Reader

Abstract

The invention discloses a model batch punching method and device, equipment and a medium, and the method comprises the steps: responding to a batch punching instruction of a to-be-punched model, and determining the center position coordinates and target hole parameters of each target hole in a plurality of target holes; based on the center position coordinates and the target hole parameters, constructing circumscribed geometries corresponding to the target holes, wherein the number of first vertexes of the circumscribed geometries is smaller than the number of second vertexes of the target holes; under the condition that intersection calculation results of all the circumscribed geometries are empty sets, performing first batch punching on the to-be-punched model based on a plurality of first vertex position coordinates of each circumscribed geometry, and performing batch correction on the first batch punching result according to a plurality of second vertex position coordinates of the target hole to obtain a second batch punching result, the problem of punching complexity accumulation can be avoided, and the efficiency of punching the models in batches is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, specifically relating to a method, apparatus, equipment, and medium for batch punching of models. Background Technology

[0002] With the rapid development of computer-aided design, building information modeling, and mechanical manufacturing, 3D modeling technology has become a core supporting means for product development and structural design. Model drilling has also gradually become a high-frequency and critical data processing step in the 3D modeling process, and batch drilling of models has become an urgent problem to be solved in the field of 3D modeling technology.

[0003] In existing technologies, batch hole punching of models mainly relies on serial Boolean operations. By receiving parameters such as the position, size, and geometry of all target holes, the program sequentially processes the data for each target hole in a cyclic punching manner to achieve serial punching. For example, to punch nine circular holes in a 3D model, the program will cycle through the data processing for the punching operation nine times, performing a complete Boolean subtraction operation each time. However, the cyclic punching method in existing technologies has a serial dependency, and each punching operation makes the geometric topology of the model more complex, leading to a continuous accumulation of computational load in subsequent punching operations. This results in the accumulation of complexity and low efficiency in batch punching of models. Summary of the Invention

[0004] This application provides a method, apparatus, device, and medium for batch punching of models, which solves the problems of accumulated complexity and low efficiency in batch punching of models in the prior art. By constructing an external geometry corresponding to each target hole, Boolean operations are performed on the model parameter set of the model to be punched and the geometric hole parameter set of the external geometry to obtain the first batch punching result. The first batch punching result is then batch corrected according to the coordinates of multiple second vertices of the target holes to obtain the second batch punching result. This achieves the goal of parallel batch punching of the model to be punched while ensuring the accuracy of the holes, avoiding the problem of accumulated punching complexity and improving the efficiency of batch punching of models.

[0005] In a first aspect, embodiments of this application provide a method for batch drilling holes in a model, the method comprising: In response to the batch drilling command of the model to be drilled, determine the center position coordinates and target hole parameters of each target hole among multiple target holes; Based on the center position coordinates and target hole parameters, construct the circumscribed geometry corresponding to each target hole. The number of first vertices of the circumscribed geometry is less than the number of second vertices of the target hole. When the intersection calculation results of all circumscribed geometries are empty, a model parameter set is constructed based on the model parameters of the model to be punched, and a geometric hole parameter set of all circumscribed geometries is constructed based on the coordinates of multiple first vertices of each circumscribed geometries. Boolean operations are performed on the model parameter set and the geometric hole parameter set to obtain the first batch of drilling results. The first batch of drilling results is then corrected based on the coordinates of the multiple second vertices of the target holes to obtain the second batch of drilling results.

[0006] Furthermore, before performing Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch of drilling results, the method also includes: Determine the total number of holes for multiple target holes, and determine the batch drilling rounds based on the preset number of parallel drilling threads and the total number of holes; Accordingly, Boolean operations are performed on the model parameter set and the geometric hole parameter set to obtain the first batch of drilling results, including: Parallel Boolean operations are performed on the model parameter set and the geometric hole parameter set according to the batch punching rounds to obtain the first batch punching results.

[0007] Furthermore, the number of parallel punching threads is preset to be equal to the number of processor cores, and the model parameter set corresponding to each batch punching round is the same.

[0008] Furthermore, the first batch of drilling results is batch-corrected based on the coordinates of multiple second vertices of the target hole, including: Determine the geometric parameters of each geometric hole in the first batch of drilling results; Based on the coordinates of the second vertices of the target hole and the geometric hole parameters, multiple geometric holes in the first batch of drilling results are batch corrected.

[0009] Furthermore, based on the coordinates of multiple second vertices of the target hole and the geometric hole parameters, multiple geometric holes in the first batch of drilling results are batch corrected, including: Based on the geometric hole parameters, the inner wall surface of the first hole in the inner wall of each geometric hole in the first batch of drilling results is deleted; Multiple second inner wall surfaces of each target hole are generated based on the coordinates of multiple second vertex positions. The multiple second inner wall surfaces are spliced ​​and smoothed to obtain the corresponding inner wall of the target hole. The inner wall of the target hole is replaced with the inner wall of the corresponding geometric hole in batches to obtain the batch correction results of multiple geometric holes in the first batch of drilling results.

[0010] Furthermore, after constructing the circumscribed geometry corresponding to each target hole based on the center position coordinates and target hole parameters, the method also includes: Determine multiple edge coordinate ranges for each circumscribed geometry, and based on these multiple edge coordinate ranges, determine the first dimension of the overlapping edge of any two circumscribed geometries, as well as the second and third dimensions of the edge of the geometry containing the overlapping edge; Calculate the first overlap ratio between the first dimension and the second dimension, and the second overlap ratio between the first dimension and the third dimension. If the first overlap ratio and / or the second overlap ratio are less than a preset overlap ratio threshold, determine that the intersection of the corresponding circumscribed geometry is an empty set.

[0011] Furthermore, the target hole parameters include the target hole diameter; Based on the center position coordinates and target hole parameters, construct the circumscribed geometry corresponding to each target hole, including: Based on the center position coordinates and the diameter of the target hole, determine the position coordinates of multiple first vertices of the circumscribed geometry corresponding to each target hole, and construct the circumscribed geometry corresponding to each target hole based on the multiple first vertices position coordinates.

[0012] Secondly, embodiments of this application provide a batch drilling device for models, the device comprising: The hole parameter determination module is used to determine the center position coordinates and target hole parameters of each target hole in response to the batch drilling command of the model to be drilled; The geometry construction module is used to construct the circumscribed geometry corresponding to each target hole based on the center position coordinates and target hole parameters. The number of the first vertices of the circumscribed geometry is less than the number of the second vertices of the target hole. The parameter set construction module is used to construct a model parameter set based on the model parameters of the model to be punched when the intersection calculation results of all external geometries are empty, and to construct a geometric hole parameter set of all external geometries based on the coordinates of multiple first vertices of each external geometries. The batch punching module is used to perform Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch punching results. Then, based on the coordinates of multiple second vertices of the target hole, the first batch punching results are batch corrected to obtain the second batch punching results.

[0013] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0014] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0015] Fifthly, embodiments of this application also provide a computer program product comprising a computer program stored in a computer-readable storage medium, wherein at least one processor of the device reads from the computer-readable storage medium and executes the computer program, causing the device to perform the method described in the first aspect.

[0016] In this embodiment, in response to a batch punching command for the model to be punched, the center position coordinates and target hole parameters of each target hole are determined. Based on the center position coordinates and target hole parameters, an outer geometry corresponding to each target hole is constructed, where the number of first vertices of the outer geometry is less than the number of second vertices of the target hole. When the intersection calculation results of all outer geometries are empty, a model parameter set is constructed based on the model parameters of the model to be punched, and a geometric hole parameter set for all outer geometries is constructed based on the position coordinates of multiple first vertices of each outer geometry. Boolean operations are performed on the model parameter set and the geometric hole parameter set to obtain the first batch punching result. The first batch punching result is then batch-corrected based on the position coordinates of multiple second vertices of the target holes to obtain the second batch punching result. The above-described batch punching method for models solves the problems of complexity accumulation and low efficiency in existing batch punching techniques. By constructing an external geometry corresponding to each target hole, Boolean operations are performed on the model parameter set of the model to be punched and the geometric hole parameter set of the external geometry to obtain the first batch punching result. The first batch punching result is then batch corrected based on the coordinates of multiple second vertices of the target holes to obtain the second batch punching result. This achieves the goal of parallel batch punching of the model to be punched while ensuring the accuracy of the holes, avoiding the problem of punching complexity accumulation and improving the efficiency of batch punching of models. Attached Figure Description

[0017] Figure 1 This is a flowchart of a batch drilling method for a model provided in an embodiment of this application; Figure 2 This is a schematic diagram of the external geometry of the target hole provided in the embodiments of this application; Figure 3 This is a schematic diagram of the intersection of circumscribed geometries provided in an embodiment of this application; Figure 4 This is a schematic diagram illustrating the effect of batch punching holes in the model provided in the embodiments of this application; Figure 5 This is a flowchart of batch correction of drilling results provided in an embodiment of this application; Figure 6 This is a structural diagram of a batch punching system for models provided in an embodiment of this application; Figure 7 This is a structural block diagram of the electronic device provided in the embodiments of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application are described in detail below with reference to the accompanying drawings. It is understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. Furthermore, it should be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0019] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0020] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0021] Firstly, this solution can be used in scenarios involving batch processing of models during 3D modeling, especially in scenarios involving batch drilling of holes in 3D models. By constructing circumscribed geometry corresponding to each target hole, Boolean operations are performed on the model parameter set of the model to be drilled and the geometric hole parameter set of the circumscribed geometry to obtain the first batch of drilling results. Then, the first batch of drilling results is batch corrected based on the coordinates of multiple second vertices of the target holes to obtain the second batch of drilling results. This achieves the goal of parallel batch drilling of the model to be drilled while ensuring the accuracy of the holes, avoiding the problem of accumulated drilling complexity and improving the efficiency of batch drilling of models.

[0022] Based on the above usage scenarios, it is understood that the execution subject of each step in this solution can be a computer device. The computer device refers to any electronic device with data computing, processing and storage capabilities, such as a PC (Personal Computer) or other terminal devices, or a server or other devices. This application embodiment does not limit this.

[0023] The following description, in conjunction with the accompanying drawings, details a method, apparatus, device, and medium for batch drilling of models provided in this application, through specific embodiments and application scenarios.

[0024] Figure 1 This is a flowchart of a batch drilling method for a model provided in an embodiment of this application. For example... Figure 1 As shown, the specific steps include the following: S101, in response to the batch drilling command of the model to be drilled, determines the center position coordinates and target hole parameters of each target hole among multiple target holes.

[0025] The model to be punched can be a 3D model data composed of vertices, edges, faces, and topological relationships used to perform the punching operation. Examples include 3D models of solids such as steel plates, chassis shells, mechanical parts, and walls. The batch punching command can be a command generated by the user or a higher-level program to trigger the batch punching operation. The batch punching command can include punching constraint information such as the number of holes to be punched, the rules for the hole placement, the hole size, the hole depth, and the hole arrangement. The target hole can be the hole that will ultimately be generated on the model to be punched. The center position coordinates can be the 3D coordinate data of the center point of the target hole in the coordinate system of the model to be punched. The coordinate system of the model to be punched can be a 3D coordinate system constructed with a vertex of the model to be punched as the origin. The target hole parameters can be a set of values ​​describing the shape and size of the target hole.

[0026] In one embodiment, upon receiving a batch punching instruction for the model to be punched, the batch punching instruction can be parsed to extract the center position coordinates of each target hole when punching the model, as well as the target hole parameters describing the shape and / or size of the target holes.

[0027] S102, construct the circumscribed geometry corresponding to each target hole based on the center position coordinates and target hole parameters. The number of first vertices of the circumscribed geometry is less than the number of second vertices of the target holes.

[0028] The circumscribed geometry can be a simple geometric shape that completely encloses the target hole. For example, a circular hole corresponds to a cuboid / cube bounding box. The first number of vertices can be the total number of vertices constituting the circumscribed geometry. The second number of vertices can be the total number of vertices constituting the precise geometry of the target hole.

[0029] In one embodiment, given the center position coordinates and target hole parameters of each target hole, an external geometry that can completely enclose the corresponding target hole can be calculated and constructed based on the hole size in the center position coordinates and target hole parameters, such that the number of first vertices contained in the external geometry is less than the number of second vertices corresponding to the precise geometry of the target hole.

[0030] In one embodiment, the target hole parameters include the target hole diameter; constructing the circumscribed geometry corresponding to each target hole based on the center position coordinates and the target hole parameters includes: determining the position coordinates of multiple first vertices of the circumscribed geometry corresponding to each target hole according to the center position coordinates and the target hole diameter, and constructing the circumscribed geometry corresponding to each target hole based on the multiple first vertices position coordinates.

[0031] The target hole diameter can be the maximum straight-line distance of the hole cross-section.

[0032] In one embodiment, two line segments passing through the center position coordinates and having a length equal to the target hole diameter can be generated based on the center position coordinates and the target hole diameter. The coordinates of multiple first vertices of the circumscribed geometry corresponding to each target hole are calculated based on the endpoint coordinates of each line segment. These multiple first vertices are then connected in a preset order to construct the circumscribed geometry corresponding to each target hole. The preset order is consistent with the shape of the circumscribed geometry.

[0033] This solution simplifies the construction steps of the circumscribed geometry and improves the construction efficiency of the circumscribed geometry by determining the coordinates of the first vertices of the circumscribed geometry corresponding to each target hole based on the coordinates of the center position and the diameter of the target hole, and constructing the circumscribed geometry corresponding to each target hole based on the coordinates of the first vertices.

[0034] Figure 2 This is a schematic diagram of the external geometry of the target hole provided in an embodiment of this application. For example... Figure 2 As shown in the diagram, the circle represents the shape of the target hole, the rectangle represents the shape of the circumscribed geometry of the target hole, the black dot at the center of the circle represents the center of the target hole, and the dashed line passing through the black dot represents the diameter of the target hole. The target hole is a circle defined by 36 vertices. This solution constructs the circumscribed geometry of the target hole to obtain a circumscribed rectangle defined by 4 vertices that can completely cover the circle. This reduces the subsequent Boolean operations from processing 36 points to processing 4 points, thereby reducing the computational complexity by an order of magnitude.

[0035] In one embodiment, after constructing the circumscribed geometry corresponding to each target hole based on the center position coordinates and target hole parameters, the method further includes: determining multiple edge coordinate ranges of each circumscribed geometry, and determining a first dimension of the overlapping edge of any two circumscribed geometries and a second and third dimension of the edge of the geometry containing the overlapping edge based on the multiple edge coordinate ranges; calculating a first overlap ratio between the first dimension and the second dimension, and a second overlap ratio between the first dimension and the third dimension; and determining that the intersection of the corresponding circumscribed geometries is an empty set if the first overlap ratio and / or the second overlap ratio is less than a preset overlap ratio threshold.

[0036] The edge coordinate range can be the maximum and minimum coordinate values ​​of the circumscribed geometry on the X, Y, and Z axes in 3D space, used to define the spatial boundary of the circumscribed geometry. A coincident edge can be the portion of two circumscribed geometries where their edges overlap or coincide in space. The first dimension can be the actual length of the coincident edge between the two circumscribed geometries. The second dimension can be the length of the complete edge of the first circumscribed geometry where the coincident edge is located. The third dimension can be the length of the complete edge of the second circumscribed geometry where the coincident edge is located. The first overlap ratio can describe the proportion of the coincident edge to the edge of the first geometry. The second overlap ratio can describe the proportion of the coincident edge to the edge of the second geometry. The preset overlap ratio threshold can be a pre-set maximum overlap ratio used to determine whether two geometries have a valid intersection.

[0037] In one embodiment, the edge coordinate range of each circumscribed geometry can be determined based on the vertex coordinates of each circumscribed geometry. The existence of overlapping edges and the first dimension of the overlapping edges between any two circumscribed geometries can be determined based on their edge coordinate ranges. A second dimension of the edge of one of the circumscribed geometries containing the overlapping edge and a third dimension of the edge of the other circumscribed geometry containing the overlapping edge can be determined based on the two circumscribed geometries containing the overlapping edge. The ratio of the first dimension to the second dimension is calculated to obtain a first overlap ratio, and the ratio of the first dimension to the third dimension is calculated to obtain a second overlap ratio. The first overlap ratio is compared with a preset overlap ratio threshold, and the second overlap ratio is also compared with the preset overlap ratio threshold. If the first overlap ratio and / or the second overlap ratio are less than the preset overlap ratio threshold, it indicates that although overlapping edges exist between the circumscribed geometries, the corresponding target holes do not intersect. In this case, the two circumscribed geometries are determined to have an invalid intersection, i.e., the intersection is an empty set.

[0038] Figure 3 This is a schematic diagram of the intersection of circumscribed geometries provided in an embodiment of this application. For example... Figure 3 As shown in the figure, there are three circular target holes coded A, B, and C, and their circumscribed rectangles. The coverage area corresponding to the circumscribed rectangles of holes A and B includes the first set of overlapping edges between the two circumscribed rectangles, as shown by the light gray straight line and light gray dashed line within this coverage area. The coverage area corresponding to the circumscribed rectangles of holes B and C includes the second set of overlapping edges between the two circumscribed rectangles, as shown by the dark gray straight line within this coverage area. As can be seen from the figure, when the size of the overlapping edge accounts for a large proportion of the corresponding size of the edge of its circumscribed geometry, the two target holes intersect. In this case, the intersection between the circumscribed bodies is valid; otherwise, it is invalid.

[0039] This scheme determines the size of the overlapping edge of any two circumscribed geometries based on the coordinate range of multiple edges of each circumscribed geometries, and calculates the overlap ratio between the size of the overlapping edge and the size of the edge of the geometries containing the overlapping edge. Based on the overlap ratio, it determines whether the intersection of the corresponding circumscribed geometries is an empty set. This can improve the accuracy of judging the intersection of target holes and avoid the problem of misjudgment of intersection caused by the circumscribed geometries increasing the coverage of the target holes, thereby improving the accuracy of batch drilling of the model.

[0040] S103, when the intersection calculation results of all circumscribed geometries are empty, construct a model parameter set based on the model parameters of the model to be punched, and construct a geometric hole parameter set of all circumscribed geometries based on the coordinates of multiple first vertices of each circumscribed geometries.

[0041] The model parameters can be data describing the geometric features and attributes of the 3D model to be punched. Examples include vertex coordinates, facet structure, boundary extent, and entity attributes. The model parameter set can be a complete dataset formed by standardizing and integrating all model parameters of the model to be punched. The geometric hole parameter set can be a dataset describing the geometric features of the target hole, formed by uniformly summarizing the coordinates of the first vertices of all circumscribed geometric bodies.

[0042] In one embodiment, if it is confirmed that there is no effective intersection between any two of the circumscribed geometries, the model parameters of the model to be punched can be integrated to construct a model parameter set, and the coordinates of the first vertex positions of all circumscribed geometries can be summarized and integrated to construct a geometric hole parameter set of all circumscribed geometries.

[0043] S104: Perform Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch of punching results. Then, perform batch correction on the first batch of punching results based on the coordinates of multiple second vertices of the target holes to obtain the second batch of punching results.

[0044] Boolean operations are used for geometric calculations in the 3D modeling process. In this scheme, Boolean operations primarily involve subtracting the circumscribed geometry from the model to be drilled, enabling batch drilling calculations. The first batch drilling result can be the initial drilled model obtained by performing batch drilling calculations on the model using circumscribed geometry with few vertices and a simple structure. The second batch drilling result can be the final drilled model, after high-precision vertex coordinate correction, ensuring that the hole shape, size, and inner wall fully conform to the target hole design requirements corresponding to the batch drilling command.

[0045] In one embodiment, geometric Boolean operations can be performed on the model parameter set and the geometric hole parameter set to perform batch drilling operations on the model to be drilled using the circumscribed geometry, resulting in a first batch of drilling results. Based on the coordinates of the second vertex of the target hole, the contours and inner walls of all simplified holes in the first batch of drilling results are precisely corrected in batches to obtain a second batch of drilling results.

[0046] In one embodiment, before performing Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch of punching results, the method further includes: determining the total number of holes in multiple target holes, and determining the batch punching rounds based on the preset number of parallel punching threads and the total number of holes; correspondingly, performing Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch of punching results includes: performing parallel Boolean operations on the model parameter set and the geometric hole parameter set according to the batch punching rounds to obtain the first batch of punching results.

[0047] The preset number of parallel punching threads can be pre-set, representing the maximum number of tasks that can simultaneously perform punching Boolean operations. In this scheme, the preset number of parallel punching threads is related to the number of processor cores and can be less than or equal to the number of processor cores, used to control the scale of parallel punching operations. The batch punching rounds can be calculated based on the total number of holes and the number of parallel threads, representing the number of batches required to punch all target holes.

[0048] In one embodiment, before performing Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch of punching results, the total number of all target holes can be counted, the ratio of the total number of all target holes to the preset number of parallel punching threads can be calculated, and the comparison value can be used to determine the batch punching rounds. When performing batch punching, the model parameter set and the geometric hole parameter set can be subjected to parallel Boolean operations in batches according to the above batch punching rounds to obtain the complete first batch punching results.

[0049] For example, using CAD software, if you need to create nine circular through holes, each 50mm in diameter, on a virtual steel plate model measuring 1000mm x 1000mm x 10mm, and the computer has an 8-core CPU, it can calculate the corresponding 2D bounding box (a 50mm x 50mm square) based on the center coordinates of each hole and its 50mm diameter. Then, combining this with the 10mm steel plate thickness, it can generate a 50mm x 50mm x 10mm cuboid as the circumscribed geometry of each hole. After calculating the number of holes, a total of nine cuboids were generated. The first batch of drilling operations consisted of these nine hole-making tasks (i.e., subtracting nine cuboids from the steel plate model using Boolean subtraction). These nine hole-making tasks were independent of each other because each cutting operation was defined based on the original state of the steel plate, and there was no data dependency that required them to be executed in sequence. These nine tasks were distributed to a thread pool with eight worker threads. The eight cores of the CPU immediately began working in parallel, with each core (through one thread) taking one task and executing it. In a very short time (close to the time required for a single simplified hole-making), the first eight tasks were completed. Immediately afterwards, an idle core processed the ninth task. Compared to the traditional method, the performance at this stage was improved by tens of times.

[0050] This scheme determines the batch punching rounds based on the preset number of parallel punching threads and the total number of holes in multiple target holes. It then performs parallel Boolean operations on the model parameter set and the geometric hole parameter set according to the batch punching rounds to obtain the first batch punching results. This achieves the purpose of batch punching the model to be punched, thus improving the efficiency of model punching.

[0051] In one embodiment, the number of parallel punching threads is preset to be equal to the number of processor cores, and the model parameter set corresponding to each batch punching round is the same.

[0052] The number of processor cores can be the total number of physical cores capable of independently processing computational tasks simultaneously. This solution can directly use the number of processor cores as the upper limit for parallel NAT threads.

[0053] In one embodiment, the number of processor cores can be used as the preset number of parallel punching threads, and the Boolean operations used for different rounds of batch punching operations correspond to the same set of model parameters. That is, the batch punching method in this scheme is performed in parallel on the model parameter set of the model to be punched in the initial state, and the model parameter set does not change with the increase of the number of punches or the number of punching rounds.

[0054] This solution maximizes the use of hardware computing power by setting the number of parallel punching threads to be equal to the number of processor cores and ensuring that the model parameter set corresponding to each batch punching round is the same. This ensures that all punching operations are based on the same original model to be punched, thereby improving the efficiency and stability of batch punching calculations on the model to be punched.

[0055] Figure 4 This is a schematic diagram illustrating the effect of batch drilling on the model provided in the embodiments of this application. For example... Figure 4 As shown in the figure, there is a rectangular model to be punched and multiple circular target holes obtained after batch punching on the model. The intersection of the multiple circular target holes is an empty set, meaning the holes do not interfere with each other. Although the multiple target holes are punched in batches in parallel, each batch of punching operations is defined to operate on the initial, unmodified model to be punched. In this way, the present invention breaks the data dependency relationship between the various punching operations in traditional methods, making each punching task logically and data-wise completely independent, thereby achieving the goal of distributing tasks to different processor cores for simultaneous execution.

[0056] The technical solution provided in this application, in response to a batch punching command for a model to be punched, determines the center position coordinates and target hole parameters of each target hole among multiple target holes; constructs an outer geometry corresponding to each target hole based on the center position coordinates and target hole parameters, wherein the number of first vertices of the outer geometry is less than the number of second vertices of the target holes; when the intersection calculation results of all outer geometry are empty sets, constructs a model parameter set based on the model parameters of the model to be punched, and constructs a geometric hole parameter set of all outer geometry based on the position coordinates of multiple first vertices of each outer geometry; performs Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch punching result, and performs batch correction on the first batch punching result according to the position coordinates of multiple second vertices of the target holes to obtain the second batch punching result. The above-described batch punching method for models solves the problems of complexity accumulation and low efficiency in existing batch punching techniques. By constructing an external geometry corresponding to each target hole, Boolean operations are performed on the model parameter set of the model to be punched and the geometric hole parameter set of the external geometry to obtain the first batch punching result. The first batch punching result is then batch corrected based on the coordinates of multiple second vertices of the target holes to obtain the second batch punching result. This achieves the goal of parallel batch punching of the model to be punched while ensuring the accuracy of the holes, avoiding the problem of punching complexity accumulation and improving the efficiency of batch punching of models.

[0057] Figure 5 This is a flowchart illustrating the batch correction of drilling results provided in an embodiment of this application. For example... Figure 5 As shown, the specific steps include the following: S501, determine the geometric parameters of each geometric hole in the first batch of drilling results.

[0058] In this context, a geometric hole can be a hole generated after drilling a model based on a circumscribed geometry, sharing the same shape and geometric features as the circumscribed geometry. Geometric hole parameters can be parameters describing the spatial location and geometric features of the hole. Examples include: the spatial coordinates of the hole's center point, the coordinates of its contour vertices, the topology of the facets, and its size range.

[0059] In one embodiment, the vertex coordinates of each geometric hole in the first batch of punching results can be read, and the geometric features of each geometric hole can be extracted and recorded. Based on the vertex coordinates and geometric features, the spatial position coordinates of the center point, the coordinates of the contour vertex, the topology of the facet, and the size range of each geometric hole can be calculated.

[0060] S502, perform batch correction on multiple geometric holes in the first batch of drilling results based on the coordinates of multiple second vertices of the target hole and the geometric hole parameters.

[0061] The second vertex position coordinates can be the coordinates of each vertex of the hole that constitutes the precise shape of the target hole in three-dimensional space. Batch correction can be performed simultaneously on all geometric holes in the first batch of drilling results according to the geometric characteristics of the target hole, including contour replacement, accuracy optimization, and inner wall reconstruction.

[0062] In one embodiment, the hole vertex deviation can be determined based on the coordinates of the second vertices of the target hole itself and the coordinates of the vertices of the geometric holes in the geometric hole parameters. The original coordinates of the vertices of the geometric holes can then be batch-corrected to the corresponding coordinates of the second vertices according to the hole vertex deviation.

[0063] In one embodiment, batch correction of multiple geometric holes in the first batch of drilling results is performed based on the coordinates of multiple second vertices of the target hole and the geometric hole parameters. This includes: deleting the first inner wall surface of each geometric hole in the first batch of drilling results based on the geometric hole parameters; generating multiple second inner wall surfaces of each target hole based on the coordinates of multiple second vertices; performing inner wall surface splicing and smoothing on the multiple second inner wall surfaces to obtain the corresponding inner wall of the target hole; and batch replacing the inner wall of the target hole with the corresponding inner wall of the geometric hole to obtain the batch correction result of multiple geometric holes in the first batch of drilling results.

[0064] The first inner wall surface can be the inner wall surface corresponding to the geometric features of the circumscribed geometry. The second inner wall surface can be the inner wall surface corresponding to the geometric features of the target hole. Inner wall surface splicing can be the operation of seamlessly connecting multiple dispersed and independent second inner wall surfaces according to spatial position and topological relationship to form a complete and continuous inner wall of the hole. Smoothing can be the operation of eliminating sharp corners, gaps, and abrupt changes on the spliced ​​inner wall surfaces to make the inner wall surface smooth and continuous.

[0065] In one embodiment, multiple first hole inner wall surfaces corresponding to each geometric hole can be determined based on the geometric hole parameters, and these multiple first hole inner wall surfaces can be deleted. Based on the coordinates of multiple second vertices, corresponding vertices on two faces of the model to be punched are connected, and the edges where the upper and lower faces intersect with the hole are taken as the upper and lower sides, and the lines connecting the corresponding vertices are taken as the left and right sides, generating multiple second inner wall surfaces for each target hole. These multiple second inner wall surfaces are then stitched together and smoothed to obtain the complete target hole inner wall corresponding to the target hole. The target hole inner walls are then batch-replaced to the corresponding geometric hole inner wall positions to obtain the batch correction results for multiple geometric holes in the first batch punching results.

[0066] For example, after all simplified bounding box holes are quickly generated, a preliminary hole outline has been formed on the model. At this point, the second stage begins, refining these preliminary holes. Based on the original, precise geometric definition (e.g., the 36 vertices of a circle), the right-angled edges generated by the bounding box cutting are corrected, chamfered, or replaced to make them the final smooth and precise holes required. This process can also be optimized in parallel based on task independence. For each square hole, the module reads its original design parameters (a circle with a diameter of 50mm) and reshapes the inner wall of the square hole, correcting it to a smooth cylindrical surface. This process may involve deleting old planes, creating new surfaces, and updating the model's topology. Since this step is only performed in a local area of ​​the hole and can be parallelized, the total time is relatively short.

[0067] This solution deletes the inner wall of each geometric hole in the first batch of drilling results based on the geometric hole parameters. It then generates the corresponding inner wall of each target hole based on the coordinates of multiple second vertices and performs batch replacement of the inner walls of the target holes with the corresponding inner walls of the geometric holes. This results in batch correction of multiple geometric holes in the first batch of drilling results, which improves the accuracy of geometric hole correction and ensures that the drilling results obtained from batch drilling meet the requirements of the target holes.

[0068] The technical solution provided in this application determines the geometric hole parameters of each geometric hole in the first batch of punching results, and performs batch correction on multiple geometric holes in the first batch of punching results based on the coordinates of multiple second vertices of the target hole and the geometric hole parameters. This achieves the purpose of accurately correcting the geometric features of the holes, ensuring the accuracy and efficiency of batch punching the model to be punched.

[0069] Figure 6 This is a structural block diagram of a batch drilling device for models provided in an embodiment of this application. Figure 6 As shown, it specifically includes: Hole parameter determination module 601 is used to determine the center position coordinates and target hole parameters of each target hole in response to the batch drilling command of the model to be drilled; The geometry construction module 602 is used to construct the circumscribed geometry corresponding to each target hole based on the center position coordinates and target hole parameters. The number of the first vertices of the circumscribed geometry is less than the number of the second vertices of the target hole. The parameter set construction module 603 is used to construct a model parameter set based on the model parameters of the model to be punched when the intersection calculation results of all external geometries are empty, and to construct a geometric hole parameter set of all external geometries based on the coordinates of multiple first vertices of each external geometries. The batch punching module 604 is used to perform Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch punching result, and to perform batch correction on the first batch punching result according to the coordinates of multiple second vertices of the target hole to obtain the second batch punching result.

[0070] Furthermore, the device also includes: The punching round determination module is used to determine the total number of holes for multiple target holes, and to determine the batch punching round based on the preset number of parallel punching threads and the total number of holes; Correspondingly, the batch punching module 604 is specifically used for: Parallel Boolean operations are performed on the model parameter set and the geometric hole parameter set according to the batch punching rounds to obtain the first batch punching results.

[0071] Furthermore, the number of parallel punching threads is preset to be equal to the number of processor cores, and the model parameter set corresponding to each batch punching round is the same.

[0072] Furthermore, the batch punching module 604 is specifically used for: Determine the geometric parameters of each geometric hole in the first batch of drilling results; Based on the coordinates of the second vertices of the target hole and the geometric hole parameters, multiple geometric holes in the first batch of drilling results are batch corrected.

[0073] Furthermore, the batch punching module 604 is specifically used for: Based on the geometric hole parameters, the inner wall surface of the first hole in the inner wall of each geometric hole in the first batch of drilling results is deleted; Multiple second inner wall surfaces of each target hole are generated based on the coordinates of multiple second vertex positions. The multiple second inner wall surfaces are spliced ​​and smoothed to obtain the corresponding inner wall of the target hole. The inner wall of the target hole is replaced with the inner wall of the corresponding geometric hole in batches to obtain the batch correction results of multiple geometric holes in the first batch of drilling results.

[0074] Furthermore, the geometry building module 602 is also used for: Determine multiple edge coordinate ranges for each circumscribed geometry, and based on these multiple edge coordinate ranges, determine the first dimension of the overlapping edge of any two circumscribed geometries, as well as the second and third dimensions of the edge of the geometry containing the overlapping edge; Calculate the first overlap ratio between the first dimension and the second dimension, and the second overlap ratio between the first dimension and the third dimension. If the first overlap ratio and / or the second overlap ratio are less than a preset overlap ratio threshold, determine that the intersection of the corresponding circumscribed geometry is an empty set.

[0075] Furthermore, the target hole parameters include the target hole diameter; Geometry building module 602 is specifically used for: Based on the center position coordinates and the diameter of the target hole, determine the position coordinates of multiple first vertices of the circumscribed geometry corresponding to each target hole, and construct the circumscribed geometry corresponding to each target hole based on the multiple first vertices position coordinates.

[0076] The technical solution provided in this application includes a hole parameter determination module, used to determine the center position coordinates and target hole parameters of each target hole in a batch drilling command for a model to be drilled; a geometry construction module, used to construct an external geometry corresponding to each target hole based on the center position coordinates and target hole parameters, wherein the number of first vertices of the external geometry is less than the number of second vertices of the target hole; a parameter set construction module, used to construct a model parameter set based on the model parameters of the model to be drilled when the intersection calculation results of all external geometries are empty, and to construct a geometric hole parameter set of all external geometries based on the position coordinates of multiple first vertices of each external geometry; and a batch drilling module, used to perform Boolean operations on the model parameter set and the geometric hole parameter set to obtain a first batch drilling result, and to perform batch correction on the first batch drilling result according to the position coordinates of multiple second vertices of the target hole to obtain a second batch drilling result. The aforementioned model batch punching device solves the problems of accumulated complexity and low efficiency in existing technologies. By constructing an external geometry corresponding to each target hole, Boolean operations are performed on the model parameter set of the model to be punched and the geometric hole parameter set of the external geometry to obtain the first batch punching result. The first batch punching result is then batch corrected based on the coordinates of multiple second vertices of the target holes to obtain the second batch punching result. This achieves the goal of parallel batch punching of the model to be punched while ensuring the accuracy of the holes, avoiding the problem of accumulated punching complexity and improving the efficiency of batch punching of models.

[0077] A batch punching device for models, as described in this application embodiment, can be configured in a device, or as a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network-attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.

[0078] The batch punching device for models in this application embodiment can be an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0079] The batch punching device for models provided in this application embodiment can realize the various processes implemented in the above method embodiments. To avoid repetition, it will not be described again here.

[0080] like Figure 7 As shown, this application embodiment also provides an electronic device 700, including a processor 701, a memory 702, and a program or instructions stored in the memory 702 and executable on the processor 701. When the program or instructions are executed by the processor 701, they implement the various processes of the above-described embodiment of a batch punching method for a model and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0081] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0082] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described batch punching method for a model and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0083] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0084] This application also provides a program product including program code. When the program product is run on a computer device, the program code causes the computer device to perform the steps of the methods described above according to various exemplary embodiments of this application. For example, the computer device can execute a batch punching method for a model as described in an embodiment of this application. The program product can be implemented using any combination of one or more readable media.

[0085] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0086] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0087] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

[0088] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.

Claims

1. A method for batch punching holes in a model, characterized in that, The method includes: In response to the batch drilling command of the model to be drilled, determine the center position coordinates and target hole parameters of each target hole in the multiple target holes; Based on the center position coordinates and the target hole parameters, an external geometry corresponding to each target hole is constructed, wherein the number of first vertices of the external geometry is less than the number of second vertices of the target hole; When the intersection calculation results of all the circumscribed geometries are empty, a model parameter set is constructed based on the model parameters of the model to be punched, and a geometric hole parameter set of all the circumscribed geometries is constructed based on the coordinates of multiple first vertices of each of the circumscribed geometries. Boolean operations are performed on the model parameter set and the geometric hole parameter set to obtain the first batch of drilling results. The first batch of drilling results are then batch-corrected based on the coordinates of the multiple second vertices of the target hole to obtain the second batch of drilling results.

2. The method for batch drilling of models according to claim 1, characterized in that, Before performing Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch of drilling results, the method further includes: Determine the total number of holes in the plurality of target holes, and determine the batch drilling rounds based on the preset number of parallel drilling threads and the total number of holes; Accordingly, the Boolean operation on the model parameter set and the geometric hole parameter set to obtain the first batch of drilling results includes: Parallel Boolean operations are performed on the model parameter set and the geometric hole parameter set according to the batch punching rounds to obtain the first batch punching results.

3. The method for batch drilling of models according to claim 2, characterized in that, The preset number of parallel punching threads is equal to the number of processor cores, and the model parameter set corresponding to each batch punching round is the same.

4. The method for batch drilling of models according to claim 1, characterized in that, The step of batch correcting the first batch of drilling results based on the coordinates of multiple second vertices of the target hole includes: Determine the geometric parameters of each geometric hole in the first batch of drilling results; Based on the coordinates of the multiple second vertices of the target hole and the geometric hole parameters, multiple geometric holes in the first batch of drilling results are batch corrected.

5. The method for batch drilling of models according to claim 4, characterized in that, The step of batch correcting multiple geometric holes in the first batch of drilling results based on the coordinates of multiple second vertices of the target hole and the geometric hole parameters includes: Based on the geometric hole parameters, the inner wall surface of the first hole in the inner wall of each geometric hole in the first batch of drilling results is deleted; Multiple second inner wall surfaces of each target hole are generated based on the coordinates of multiple second vertex positions. The multiple second inner wall surfaces are spliced ​​and smoothed to obtain the corresponding inner wall of the target hole. The inner wall of the target hole is replaced in batches with the inner wall of the corresponding geometric hole to obtain batch correction results for multiple geometric holes in the first batch of drilling results.

6. The method for batch drilling of models according to claim 1, characterized in that, After constructing the circumscribed geometry corresponding to each of the target holes based on the center position coordinates and the target hole parameters, the method further includes: Determine multiple edge coordinate ranges for each of the circumscribed geometries, and determine the first dimension of the overlapping edge of any two circumscribed geometries and the second and third dimensions of the edge of the geometries containing the overlapping edge based on the multiple edge coordinate ranges; Calculate the first overlap ratio between the first dimension and the second dimension, and the second overlap ratio between the first dimension and the third dimension. If the first overlap ratio and / or the second overlap ratio are less than a preset overlap ratio threshold, determine that the intersection of the corresponding circumscribed geometry is an empty set.

7. The method for batch drilling of models according to claim 1, characterized in that, The target hole parameters include the target hole diameter; The construction of the circumscribed geometry corresponding to each of the target holes based on the center position coordinates and the target hole parameters includes: Based on the center position coordinates and the diameter of the target hole, determine the position coordinates of multiple first vertices of the circumscribed geometry corresponding to each target hole, and construct the circumscribed geometry corresponding to each target hole based on the multiple first vertices position coordinates.

8. A batch drilling device for models, characterized in that, The device includes: The hole parameter determination module is used to determine the center position coordinates and target hole parameters of each target hole in response to the batch drilling command of the model to be drilled; A geometry construction module is used to construct an external geometry corresponding to each of the target holes based on the center position coordinates and the target hole parameters, wherein the number of first vertices of the external geometry is less than the number of second vertices of the target holes; The parameter set construction module is used to construct a model parameter set based on the model parameters of the model to be punched when the intersection calculation results of all the external geometries are empty, and to construct a geometric hole parameter set of all the external geometries based on the coordinates of multiple first vertices of each of the external geometries. The batch punching module is used to perform Boolean operations on the model parameter set and the geometric hole parameter set to obtain the first batch punching result, and to perform batch correction on the first batch punching result according to the coordinates of multiple second vertices of the target hole to obtain the second batch punching result.

9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of a batch punching method for a model as described in any one of claims 1-7.

10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of a batch punching method for a model as described in any one of claims 1-7.