Search

CN-122023707-A - Model batch punching method, device, equipment and medium

CN122023707ACN 122023707 ACN122023707 ACN 122023707ACN-122023707-A

Abstract

The application discloses a model batch punching method, device, equipment and medium, which comprise the steps of responding to a batch punching instruction of a model to be punched, determining a central position coordinate and a target hole parameter of each target hole in a plurality of target holes, constructing external geometric bodies corresponding to each target hole based on the central position coordinate and the target hole parameter, wherein the number of first vertexes of the external geometric bodies is smaller than that of second vertexes of the target holes, carrying out first batch punching on the model to be punched based on the first vertex position coordinates of each external geometric body under the condition that intersection calculation results of all external geometric bodies are empty, and carrying out batch correction on the first batch punching results according to the second vertex position coordinates of the target holes to obtain second batch punching results, so that the problem of punching complexity accumulation can be avoided, and the efficiency of batch punching of the model is improved.

Inventors

  • LIU PENG
  • LIU ERNING
  • LI ZHEN
  • ZHANG LITONG
  • HUANG WENQIANG
  • DENG QIHENG

Assignees

  • 深圳鹏锐信息技术股份有限公司

Dates

Publication Date
20260512
Application Date
20260410

Claims (10)

  1. 1. A method for batch punching of models, the method comprising: responding to a batch punching instruction of a model to be punched, and determining the central position coordinates and target hole parameters of each target hole in a plurality of target holes; constructing an external geometric body corresponding to each target hole based on the central position coordinates and the target hole parameters, wherein the number of first vertexes of the external geometric body is smaller than that of second vertexes of the target holes; Under the condition that intersection calculation results of all the external geometric bodies are empty sets, a model parameter set is built based on model parameters of the model to be punched, and geometric body hole parameter sets of all the external geometric bodies are built based on a plurality of first vertex position coordinates of each external geometric body; And performing Boolean operation on the model parameter set and the geometric body hole parameter set to obtain a first batch of punching results, and performing batch correction on the first batch of punching results according to the position coordinates of the plurality of second vertexes of the target holes to obtain second batch of punching results.
  2. 2. The model batch punch method of claim 1, wherein prior to performing a boolean operation on the model parameter set and the geometry hole parameter set to obtain a first batch punch result, the method further comprises: Determining the total number of holes of the plurality of target holes, and determining batch punching rounds according to the preset parallel punching thread number and the total number of holes; correspondingly, the performing boolean operation on the model parameter set and the geometric body hole parameter set to obtain a first batch of punching results includes: and performing parallel Boolean operation on the model parameter set and the geometrical body hole parameter set according to a batch punching round to obtain a first batch punching result.
  3. 3. The model batch puncturing method of claim 2, wherein the number of the preset parallel puncturing threads is equal to the number of processor cores, and the model parameter set corresponding to each batch puncturing round is the same.
  4. 4. The method for batch punching models according to claim 1, wherein the batch correction of the first batch punching result according to the plurality of second vertex position coordinates of the target hole comprises: determining geometrical body hole parameters of each geometrical body hole in the first batch of punching results; And carrying out batch correction on the plurality of geometric holes in the first batch punching result according to the plurality of second vertex position coordinates of the target hole and the geometric hole parameters.
  5. 5. The method of batch perforation of a model of claim 4, wherein batch correction of the plurality of geometric holes in the first batch perforation result based on the plurality of second vertex position coordinates of the target hole and the geometric hole parameter comprises: Deleting the first hole inner wall surface of the inner wall of each geometrical hole in the first batch of punching results based on the geometrical hole parameters; generating a plurality of second inner wall surfaces of each target hole according to the plurality of second vertex position coordinates, and performing inner wall surface splicing and smoothing on the plurality of second inner wall surfaces to obtain corresponding target hole inner walls; and replacing the inner wall of the target hole and the inner wall of the corresponding geometrical hole in batches to obtain a batch correction result of the plurality of geometrical holes in the first batch punching result.
  6. 6. The model batch punch method of claim 1, wherein after constructing the circumscribing geometry corresponding to each of the target holes based on the center position coordinates and the target hole parameters, the method further comprises: determining a plurality of edge coordinate ranges of each external geometric body, and determining a first size of a coincident edge of any two external geometric bodies, a second size and a third size of a geometric body edge where the coincident edge is located according to the plurality of edge coordinate ranges; Calculating a first coincidence proportion of the first dimension and the second dimension and a second coincidence proportion of the first dimension and the third dimension, and determining that the intersection of the corresponding external geometric bodies is an empty set under the condition that the first coincidence proportion and/or the second coincidence proportion is smaller than a preset coincidence proportion threshold value.
  7. 7. The model batch punch method of claim 1 wherein the target hole parameters include a target hole diameter; The constructing an external geometric body corresponding to each target hole based on the central position coordinates and the target hole parameters comprises the following steps: And determining a plurality of first vertex position coordinates of the external geometric body corresponding to each target hole according to the central position coordinates and the target hole diameter, and constructing the external geometric body corresponding to each target hole based on the plurality of first vertex position coordinates.
  8. 8. A batch perforating device for models, the device comprising: The hole parameter determining module is used for determining the center position coordinates and the target hole parameters of each target hole in the plurality of target holes in response to a batch punching instruction of the to-be-punched model; the geometric body construction module is used for constructing an external geometric body corresponding to each target hole based on the central position coordinates and the target hole parameters, and the number of first vertexes of the external geometric body is smaller than that of second vertexes of the target holes; The parameter set construction module is used for constructing a model parameter set based on the model parameters of the model to be punched under the condition that intersection calculation results of all the external geometric bodies are empty sets, and constructing geometric body hole parameter sets of all the external geometric bodies based on a plurality of first vertex position coordinates of each external geometric body; And the batch punching module is used for carrying out Boolean operation on the model parameter set and the geometric body hole parameter set to obtain a first batch punching result, and carrying out batch correction on the first batch punching result according to the position coordinates of the plurality of second vertexes of the target hole to obtain a second batch punching result.
  9. 9. An electronic device comprising a processor, a memory and a program or instruction stored on the memory and executable on the processor, the program or instruction when executed by the processor implementing the steps of a model batch punch method according to any one of claims 1 to 7.
  10. 10. A readable storage medium, wherein a program or instructions is stored on the readable storage medium, which when executed by a processor, implements the steps of a model batch puncturing method as claimed in any of claims 1-7.

Description

Model batch punching method, device, equipment and medium Technical Field The application belongs to the technical field of data processing, and particularly relates to a model batch punching method, device, equipment and medium. Background With the rapid development of the fields of computer aided design, building information model, mechanical manufacturing and the like, the three-dimensional modeling technology has become a core supporting means for product research and development and structural design. Model punching is also gradually a high-frequency and key data processing in the three-dimensional modeling process, and batch punching of models is a problem to be solved in the technical field of three-dimensional modeling. In the prior art, a model batch punching mode mainly depends on serial boolean operation, and independent data processing is sequentially completed on each target hole data according to a circular punching mode by receiving the position, the size, the geometric shape and other parameters of all target holes, so that serial punching operation is realized. For example, to make 9 round holes in a three-dimensional model, the program loops through the data processing of 9 hole making operations, and the Boolean subtraction operation is performed completely every time. However, the cyclic punching mode in the prior art has a serial dependency relationship, and each punching operation can make the geometric topology structure of the model more complex, so that the calculation amount of the subsequent punching operation is continuously increased, and the problems of complex accumulation of batch punching of the model and low batch punching efficiency are caused. Disclosure of Invention The embodiment of the application provides a model batch punching method, device, equipment and medium, which solve the problems of model batch punching complexity accumulation and lower batch punching efficiency in the prior art, and solve the problem of parallel batch punching of a model to be punched on the premise of ensuring the accuracy of holes by constructing an external geometric body corresponding to each target hole, performing Boolean operation on a model parameter set of the model to be punched and a geometric body hole parameter set of the external geometric body to obtain a first batch punching result, and performing batch correction on the first batch punching result according to a plurality of second vertex position coordinates of the target holes to obtain a second batch punching result. In a first aspect, an embodiment of the present application provides a method for punching a model in batches, where the method includes: responding to a batch punching instruction of a model to be punched, and determining the central position coordinates and target hole parameters of each target hole in a plurality of target holes; Constructing an external geometric body corresponding to each target hole based on the central position coordinates and the target hole parameters, wherein the number of first vertexes of the external geometric body is smaller than that of second vertexes of the target holes; Under the condition that intersection calculation results of all external geometric bodies are empty sets, a model parameter set is built based on model parameters of a model to be punched, and geometric body hole parameter sets of all the external geometric bodies are built based on a plurality of first vertex position coordinates of each external geometric body; and performing Boolean operation on the model parameter set and the geometric body hole parameter set to obtain a first batch of punching results, and performing batch correction on the first batch of punching results according to the position coordinates of the plurality of second vertexes of the target holes to obtain second batch of punching results. Further, before performing boolean operations on the model parameter set and the geometry hole parameter set to obtain a first batch of punching results, the method further includes: determining the total number of holes of a plurality of target holes, and determining batch punching rounds according to the preset parallel punching thread number and the total number of holes; Correspondingly, performing Boolean operation on the model parameter set and the geometric body hole parameter set to obtain a first batch of punching results, wherein the method comprises the following steps of: and performing parallel Boolean operation on the model parameter set and the geometric body hole parameter set according to the batch punching round to obtain a first batch punching result. Further, the number of the preset parallel punching threads is equal to the number of processor cores, and model parameter sets corresponding to each batch of punching rounds are the same. Further, performing batch correction on the first batch of punching results according to the second vertex position coordinates of the target hole