Embedded parts anti-collision arrangement method, device, equipment and storage medium

Through the method of approximate convex decomposition and axial enclosure box representation, collision detection is carried out in combination with the BVH tree spatial index structure, the problems of low detection efficiency and poor accuracy of embedded parts and steel bar components in the prior art are solved, and efficient and accurate collision detection and avoidance adjustment are achieved.

CN119358114BActive Publication Date: 2025-04-18SHENZHEN DALEZHUANG CONSTR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411937885.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-18
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

In the prior art, the collision detection efficiency between embedded parts and steel bar components is low, and the missed or missed detection rate is high, especially in complex geometric relationships and detailed areas, it is difficult to accurately identify collision problems.

Method used

By obtaining the geometric data of the steel bar components and embedded parts in the CAD drawing, performing approximate convex decomposition and axial bounding box representation, constructing a vector list and BVH tree spatial index structure, performing collision detection, and making avoidance adjustments based on the detection results.

Benefits of technology

The collision detection efficiency between embedded parts and steel bar components is improved, the missed detection and error detection rates are reduced, the collision problems in complex areas can be accurately identified, and the reasonable arrangement and construction quality of embedded parts and steel bar components are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358114B_ABST
    Figure CN119358114B_ABST
Patent Text Reader

Abstract

The present invention provides a method, device, equipment and storage medium for anti-collision layout of embedded parts. The method includes: obtaining structural data of steel bar components and geometric data of embedded parts in CAD drawings, performing approximate convex decomposition on the steel bar components, and generating a first approximate model of the steel bar components; generating an axial bounding box according to the geometric data of the embedded parts, obtaining a second approximate model of the embedded parts, and extracting the edge vectors and surface normal vectors of the two to construct a vector list. A BVH tree spatial index structure of the axial bounding box is constructed according to the first approximate model, and collision detection is performed in combination with the vector list and the second approximate model to obtain a collision detection result. According to the detection result, the steel bar components are adjusted to avoid collisions to achieve anti-collision layout of embedded parts. The present invention optimizes the collision detection process through precise model approximation and spatial decomposition, thereby quickly locating potential problems, and providing solutions to ensure the reasonable layout of embedded parts and steel bar components and the overall construction quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of building assembly, and in particular to a method, device, equipment and storage medium for arranging anti-collision embedded parts. Background Art

[0002] With the rapid development of prefabricated building technology, the layout accuracy of embedded parts and steel bars has become a key factor affecting structural safety and construction efficiency. During the design and construction of prefabricated projects, the spatial relationship between embedded parts and steel bars is complex, and collision problems often occur due to improper design or layout conflicts. Collision problems not only affect the construction progress, but may also cause structural hazards and increase construction costs. In severe cases, rework and correction may be required, which will bring great time and economic pressure to the project.

[0003] Traditional collision detection methods usually rely on manual review or simple 3D modeling analysis tools, which are inefficient and susceptible to human subjective factors. When faced with large-scale prefabricated building projects, manual review is difficult to fully cover all possible collision risks, and the ability to analyze the geometric relationships of complex steel components is limited. In addition, traditional detection technologies mostly use full model detection methods, which are insufficient in identifying the precise collision relationships of geometric models, especially in close contact or detail areas between steel bars and embedded parts, which are prone to missed detection or false detection. Summary of the invention

[0004] The main purpose of the present invention is to solve the technical problems of low collision detection efficiency, high missed detection or false detection rate, and difficulty in accurately identifying collision problems in complex geometric relationships and detailed areas during the arrangement of existing embedded parts and steel bar components;

[0005] A first aspect of the present invention provides a method for arranging an embedded component to prevent collision, the method comprising:

[0006] Acquire structural data of the steel bar component and embedded part geometric data of the embedded parts in the CAD drawing, and perform approximate convex decomposition on the steel bar component according to the structural data to obtain a first approximate model of the steel bar component;

[0007] Performing an axial bounding box representation on the embedded part according to the embedded part geometric data to obtain a second approximate model of the embedded part, and extracting edge vectors and surface normal vectors of the first approximate model and the second approximate model;

[0008] constructing vector lists of the first approximate model and the second approximate model according to the edge vectors and the face normal vectors, and calculating an axial bounding box of the first approximate model;

[0009] A BVH tree spatial index structure corresponding to the axial bounding box of the first approximate model is constructed using a quadtree structure, and collision detection is performed on the steel bar component and the embedded part according to the vector list, the second approximate model and the BVH tree spatial index structure to obtain a collision detection result;

[0010] The steel bar component is adjusted to avoid collision according to the collision detection result to achieve anti-collision arrangement of the embedded parts.

[0011] Optionally, in a first implementation of the first aspect of the present invention, the acquiring structural data of the steel bar component and embedded part geometric data of the embedded parts in the CAD drawing, and performing approximate convex decomposition on the steel bar component according to the structural data to obtain a first approximate model of the steel bar component includes:

[0012] Acquire structural data of a steel bar component in a CAD drawing, and identify a straight segment portion and a bent segment portion in the steel bar component according to the structural data;

[0013] Performing polygonal approximation calculation and correction calculation according to the cross-sectional radius and the circumference division angle in the structural data of the straight line segment portion to obtain corrected approximate data of the straight line segment portion;

[0014] Performing polygon decomposition calculation and correction calculation according to the inner ring radius, outer ring radius and circumference segmentation angle in the structural data of the bending section to obtain the corrected decomposition data of the bending section;

[0015] The steel bar component is three-dimensionally modeled according to the corrected approximate data of the straight segment part and the corrected decomposed data of the bent segment part to obtain a first approximate model of the steel bar component.

[0016] Optionally, in a second implementation manner of the first aspect of the present invention, constructing a vector list of the first approximate model and the second approximate model according to the edge vector and the face normal vector, and calculating an axial bounding box of the first approximate model includes:

[0017] According to a preset retention number, the edge vector and the surface normal vector are retained with multiple decimal places to obtain an edge vector character string and a surface normal vector character string;

[0018] Calculating hash values ​​of the edge vector character string and the surface normal vector character string respectively, and performing deduplication processing on the edge vector character string and the surface normal vector character string according to the hash values;

[0019] Generate a first edge vector list of the first approximate model and a second edge vector list of the second approximate model according to the edge vector character string after deduplication processing, and generate a first surface normal vector list of the first approximate model and a second surface normal vector list of the second approximate model according to the surface normal vector character string after deduplication processing;

[0020] A cross product operation is performed on the edge vectors in the first edge vector list and the second edge vector list to obtain a cross product vector list, and an axial bounding box of the first approximate model is constructed according to the geometric data and position information of the first approximate model.

[0021] Optionally, in a third implementation of the first aspect of the present invention, the BVH tree spatial index structure corresponding to the axial bounding box of the first approximate model constructed by using a quadtree structure includes:

[0022] Constructing a BVH tree root node according to the center point coordinates and boundary size data of the axial bounding box of the first approximate model, and dividing the BVH tree root node into four equal parts on the XY plane of the spatial coordinate system to obtain four child nodes;

[0023] Recursively dividing the axial bounding box of the first approximate model into multiple layers according to the spatial range of each child node until a preset number of division layers is reached to obtain a quadtree structure;

[0024] Performing a depth-first traversal on the quadtree structure, and storing the geometric data and position information of the first approximate model in the leaf nodes of the quadtree structure, to obtain a quadtree structure with model information;

[0025] The bounding box data of each parent node is calculated from bottom to top for the quadtree structure with model information to obtain the BVH tree spatial index structure.

[0026] Optionally, in a fourth implementation of the first aspect of the present invention, performing collision detection on the steel bar component and the embedded part according to the vector list, the second approximate model and the BVH tree spatial index structure to obtain a collision detection result includes:

[0027] Perform AABB bounding box intersection judgment according to the second approximate model and the BVH tree root node of the BVH tree spatial index structure to obtain a preliminary collision judgment result;

[0028] Recursively traverse the leaf nodes of the BVH tree spatial index structure according to the preliminary collision judgment result, and mark the first approximate model under each leaf node to obtain a set of models to be detected;

[0029] The projection interval calculation is performed on the set of models to be detected according to the vector list to obtain a projection overlap result, and a collision detection result is generated according to the projection overlap result.

[0030] Optionally, in a fifth implementation of the first aspect of the present invention, performing projection interval calculation on the set of models to be detected according to the vector list to obtain a projection overlap result, and generating a collision detection result according to the projection overlap result includes:

[0031] Performing projection interval calculation on model vertices in the set of models to be detected according to the surface normal vectors in the first surface normal vector list and the second surface normal vector list to obtain a first projection overlap result;

[0032] Performing projection interval calculation on the model vertices in the set of models to be detected according to the cross product vector list to obtain a second projection overlap result;

[0033] The collision detection result is obtained by performing a comprehensive analysis based on the first projection overlap result and the second projection overlap result.

[0034] Optionally, in a sixth implementation of the first aspect of the present invention, performing a comprehensive analysis based on the first projection overlap result and the second projection overlap result to obtain the collision detection result includes:

[0035] Calculate the length of the overlapping interval according to all projection intervals in the first projection overlapping result and the second projection overlapping result to obtain first overlapping amount data and second overlapping amount data;

[0036] Performing a non-zero judgment on the first overlap amount data and the second overlap amount data to obtain an overlap amount judgment result, and judging whether the steel bar component and the embedded part collide with each other according to the overlap amount judgment result;

[0037] If yes, then analyzing the relative positions of the first approximate model and the second approximate model in the set of models to be detected according to the overlap judgment result to obtain collision area information;

[0038] The steel bar components and embedded parts that collide are marked according to the collision area information to obtain the collision detection result.

[0039] A second aspect of the present invention provides an embedded component anti-collision arrangement device, the embedded component anti-collision arrangement device comprising:

[0040] An approximate convex decomposition module is used to obtain structural data of the steel bar component and embedded part geometric data of the embedded parts in the CAD drawing, and perform approximate convex decomposition on the steel bar component according to the structural data to obtain a first approximate model of the steel bar component;

[0041] A vector extraction module, used for performing an axial bounding box representation on the embedded part according to the embedded part geometric data, obtaining a second approximate model of the embedded part, and extracting edge vectors and surface normal vectors of the first approximate model and the second approximate model;

[0042] A list construction module, used to construct a vector list of the first approximate model and the second approximate model according to the edge vector and the face normal vector, and calculate an axial bounding box of the first approximate model;

[0043] a collision detection module, configured to construct a BVH tree space index structure corresponding to the axial bounding box of the first approximate model by using a quadtree structure, and to perform collision detection on the steel bar component and the embedded part according to the vector list, the second approximate model and the BVH tree space index structure to obtain a collision detection result;

[0044] The avoidance adjustment module is used to perform avoidance adjustment on the steel bar component according to the collision detection result to achieve anti-collision arrangement of the embedded parts.

[0045] The third aspect of the present invention provides an embedded part anti-collision arrangement device, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected through lines; the at least one processor calls the instructions in the memory to enable the embedded part anti-collision arrangement device to perform the steps of the above-mentioned embedded part anti-collision arrangement method.

[0046] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of the above-mentioned method for anti-collision arrangement of embedded parts.

[0047] The above-mentioned method, device, equipment and storage medium for anti-collision arrangement of embedded parts obtain the structural data of the steel bar component and the geometric data of the embedded parts in the CAD drawing, perform approximate convex decomposition on the steel bar component, and generate a first approximate model of the steel bar component; generate an axial bounding box according to the embedded part geometric data to obtain a second approximate model of the embedded part, and extract the edge vectors and surface normal vectors of the two to construct a vector list. The BVH tree spatial index structure of the axial bounding box is constructed according to the first approximate model, and collision detection is performed in combination with the vector list and the second approximate model to obtain a collision detection result. According to the detection result, the steel bar component is adjusted to avoid and realize the anti-collision arrangement of the embedded parts. The present invention optimizes the collision detection process through precise model approximation and spatial decomposition, thereby quickly locating potential problems and providing solutions to ensure the reasonable arrangement of embedded parts and steel bar components and the overall construction quality.

[0048] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a schematic diagram of a first embodiment of the method for arranging anti-collision embedded parts in an embodiment of the present invention;

[0051] Figure 2 A schematic diagram of an embodiment of an embedded part anti-collision arrangement device in an embodiment of the present invention;

[0052] Figure 3 A schematic diagram of an embodiment of an embedded part anti-collision arrangement device in an embodiment of the present invention;

[0053] Figure 4 Schematic diagram of approximate error calculation of a cylindrical model of a steel bar component in an embodiment of the present invention;

[0054] Figure 5 Schematic diagram of an approximate model of a cylindrical model of a steel bar component in an embodiment of the present invention;

[0055] Figure 6 It is a schematic diagram of the approximate contour calculation of the circular ring model of the steel bar component in an embodiment of the present invention;

[0056] Figure 7 Schematic diagram of an approximate model of a circular ring model of a steel bar component in an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.

[0059] To facilitate understanding of this embodiment, a method for arranging anti-collision embedded parts disclosed in an embodiment of the present invention is first described in detail. Figure 1 As shown, the method comprises the following steps:

[0060] 101. Obtain structural data of the steel bar component and embedded part geometric data of the embedded parts in the CAD drawing, and perform approximate convex decomposition on the steel bar component according to the structural data to obtain a first approximate model of the steel bar component;

[0061] In one embodiment of the present invention, the step of acquiring structural data of a steel bar component and embedded parts geometric data of embedded parts in a CAD drawing, and performing approximate convex decomposition on the steel bar component according to the structural data to obtain a first approximate model of the steel bar component comprises: acquiring structural data of the steel bar component in a CAD drawing, and identifying a straight line segment and a bent segment in the steel bar component according to the structural data; performing polygonal approximation calculation and correction calculation according to a cross-sectional radius and a circular segmentation angle in the structural data of the straight line segment to obtain corrected approximate data of the straight line segment; performing polygonal decomposition calculation and correction calculation according to an inner ring radius, an outer ring radius and a circular segmentation angle in the structural data of the bent segment to obtain corrected decomposed data of the bent segment; and performing three-dimensional modeling of the steel bar component according to the corrected approximate data of the straight line segment and the corrected decomposed data of the bent segment to obtain a first approximate model of the steel bar component.

[0062] Specifically, when obtaining the structural data of the steel bar components in the CAD drawings, it is necessary to parse and process the data in the CAD drawings to extract the key structural information of the steel bar components. For the straight segment steel bar, it is necessary to obtain its basic parameters such as the starting point coordinates, the end point coordinates, and the cross-sectional radius; for the bent segment steel bar, it is necessary to obtain its bending point coordinates, inner and outer diameter dimensions, bending angle and other parameters. When identifying the straight segment and the bent segment of the steel bar component, the geometric characteristics of the steel bar are analyzed to distinguish: when the two end points of the steel bar are connected by a straight line, the segment is a straight segment; when the steel bar turns and has curvature, the segment is a bent segment. Taking the composite plate steel bar in actual engineering as an example, a complete steel bar may contain multiple straight segments and bent segments. For example, a U-shaped steel bar is composed of two vertical straight segments and a horizontal straight segment connected by two 90-degree bent segments. These different parts need to be identified separately to prepare for subsequent approximate processing.

[0063] Specifically, cylinders or rings are used to approximate the shapes of the straight and bent segments of the steel bars. For the straight segment, it is approximated as a cylindrical model, and an error calculation formula is introduced to approximate the arc of the original cylindrical cross section, and 2π is guaranteed to be an integer multiple of the approximate arc. Next, an approximate convex decomposition is performed to calculate the change in the radius of the cylindrical cross section, and a regular polygon is obtained as an approximate model, as shown in the following example: Figure 4 and Figure 5 As shown, the error calculation formula is as follows:

[0064] △r=r / cos(θ / 2)-r;

[0065] This formula describes the change in the radius of a cylinder when the cylinder is cut along the central axis into a part of arc θ and approximated as a regular polygon surrounding it. Specifically, △r represents the change in the radius of the cylinder, r represents the initial inner diameter of the cylinder radius, and θ represents the angle of cutting along the length of the ring. The formula mainly consists of three parts:

[0066] a).r / cos(θ / 2) represents the part of the cylinder that is cut into an arc along the arc length direction and approximated by a regular polygon surrounding it. The maximum distance from the approximate regular polygon of this part of the arc to the center of the circle is r / cos(θ / 2);

[0067] b). The opening angle θ compresses the maximum distance from the approximate regular polygon of the arc to the center of the circle to r, which is the radius of the original cylinder;

[0068] c). Therefore, the △r obtained after subtracting r represents the change in the radius of the cylinder after cutting it to approximate a regular polygon, which is also the error value of using polygonal approximation to represent the arc. Then use the following formula to ensure that it is a regular polygon:

[0069] θnew=2π / ceil(2π / θ);

[0070] The function of this formula is to approximate the given circular arc θ to the nearest multiple of 2π. Specifically, θnew represents the circular arc after approximation, the ceil(x) function represents the upward rounding function, that is, taking the smallest integer n that satisfies n≥x, and 2π represents the arc of a circle. The formula is mainly composed of the following steps:

[0071] a). First, divide the radian of one circle 2π by the original radian θ to get a multiple N=2π / θ, which indicates how many θ need to be wound around the ring for one circle;

[0072] b). Then round N upwards, that is, take the smallest integer m that satisfies m≥N, so that the sum of m-1 theta and 2π equals a multiple of 2π close to the original radian;

[0073] c). Use 2π / m as the approximate circular arc θnew, so that ceil(2π / θnew)=m. In this way, any arc segment on the circular ring can be approximated as a combination of multiple approximate arcs θnew, and is close to the original arc, which is convenient for calculation and processing.

[0074] Specifically, for the bending section, it is approximated as a circular ring model, and its approximation process is relatively more complicated because it is necessary to consider two parameters, the inner ring radius r and the outer ring radius R. The polygon decomposition calculation uses two error calculation formulas, where Formula 1 is: △r=r(1-cos(θ / 2)); Formula 2 is: △R=R / cos(θ / 2)-R. Among them, Formula 1 is used to solve the change in the inner diameter of the inner ring of the circular ring on the inner diameter surface of the circular ring when the ring is cut into a part of the arc θ along the center axis and approximated as a regular polygon. Specifically, △r represents the change in the inner ring during the circular ring approximation process, r represents the initial value of the inner ring of the circular ring, and θ represents the angle of cutting along the length of the circular ring. The formula is mainly composed of the following steps:

[0075] a).cos(θ / 2) means cutting a part of arc length θ along the arc length direction of the ring. The angle corresponding to half the chord length of this part of the arc is θ / 2, so its compression ratio is cos(θ / 2).

[0076] b). Subtract the approximated inner diameter of the above ring from the initial inner diameter r to obtain the change in the inner diameter of the inner ring of the ring after cutting, which is △r.

[0077] Formula 2 solves the change in the outer diameter of the ring when an arc segment with an arc length of θ is intercepted along the central axis and approximated as a regular polygon surrounding it. Specifically, △R represents the change in the outer diameter of the ring, R represents the initial outer diameter of the ring, and θ represents the angle of cutting along the length direction of the ring. The formula is mainly composed of the following steps:

[0078] a). R / cos (θ / 2) represents the outer diameter value obtained by cutting the ring into a part of arc length θ along the arc length direction. It is the radius of the ring obtained by enlarging the outer diameter of the ring.

[0079] b). Subtract the initial outer diameter R from the enlarged radius to get the change in the outer diameter of the ring after intercepting the arc segment, that is, △R.

[0080] According to the error values ​​of the above two formulas, the following θ1 and θ2 are calculated, and then the following formula 3 is used to correct θ to ensure that it is a regular polygon. The above formula solves the problem of dividing the ring with equal distances in order to obtain as many equal sub-intervals as possible. Formula 3 is:

[0081] θ=2π / ceil (2π / min (θ1, θ2))

[0082] Specifically, θ represents the angle size of each subinterval, θ1 and θ2 are two angles used to control the equidistant division, and 2π represents the angle range of the entire circle. Formula 3 is mainly composed of the following steps:

[0083] a). First, take the minimum value of θ1 and θ2, that is, min(θ1, θ2).

[0084] b). Round 2π / min(θ1,θ2) upwards and use the result as the subinterval number, i.e., ceil(2π / min(θ1,θ2).

[0085] c). Divide the angle range of the entire circle 2π by the number of sub-intervals to obtain the angle size θ of each sub-interval.

[0086] d). If the number of subintervals is not divisible, the angle of the last subinterval will be slightly larger.

[0087] The polygon formed by points A, B, C, and D is calculated and it is ensured that ABCD is a convex polygon. Figure 6 and Figure 7 shown.

[0088] Specifically, finally, when three-dimensional modeling is performed based on the approximate data obtained previously, the regular polygon cross-section of the straight segment needs to be stretched along the axis of the steel bar to form a prism; for the bent segment, the decomposed convex polygons need to be stretched along the axis of the ring to form several prisms. In this process, the key is to ensure the geometric continuity between the straight segment and the bent segment so that they can transition smoothly. In the specific implementation of three-dimensional modeling, the spatial positioning line of the steel bar is used as a reference, and the approximate models of each part are arranged according to the spatial position and direction of the original steel bar, and the correct connection between adjacent parts is ensured. For example, a steel bar with a 90-degree bend, its complete approximate model consists of a polygonal prism of the straight segment and a series of transitional convex polyhedrons of the bent segment. These parts are strictly combined according to the spatial position relationship to form the final first approximate model of the steel bar component.

[0089] 102. Perform an axial bounding box representation on the embedded part according to the embedded part geometric data to obtain a second approximate model of the embedded part, and extract edge vectors and surface normal vectors of the first approximate model and the second approximate model;

[0090] In one embodiment of the present invention, when performing the axial bounding box representation of the embedded parts, it is first necessary to process the geometric data of the embedded parts. Since the embedded parts include components such as wire boxes and various pipe fittings interfaces, and their geometric shapes are relatively regular, they are directly represented by axial bounding boxes. The specific processing process is to analyze the maximum and minimum coordinate values ​​of the embedded parts in three-dimensional space, that is, to find the coordinates of the outermost boundary points of the embedded parts in the directions of the three coordinate axes of x, y, and z, and then to construct a cuboid surrounded by six rectangular faces with these boundary coordinates, so that each face is parallel to the coordinate plane, which constitutes the axial bounding box representation of the embedded parts, that is, the second approximate model. Next, it is necessary to extract feature vectors from the first approximate model (the approximate model of the steel bar component) and the second approximate model. For the first approximate model, it is necessary to extract the direction vectors of all its edges and the normal vectors of the faces. Since the first approximate model is composed of polygonal prisms and convex polyhedrons, there are multiple edge vectors and face normal vectors; for the second approximate model, since it is a regular axial bounding box, its edge vectors are the directions of the twelve edges parallel to the coordinate axis, and the face normal vectors are the normal vectors of the six faces parallel to the coordinate axis. In the actual extraction process, for each edge, take its two endpoints to construct the direction vector; for each face, the normal vector is calculated by the cross product of the two non-collinear edge vectors on the face. Taking a pre-embedded junction box as an example, assuming that its size is 10cm long, 8cm wide, and 6cm high, then its axial bounding box is a cuboid parallel to the coordinate axis, with twelve edge vectors (parallel to the x-axis, y-axis, and z-axis, respectively) and six face normal vectors (perpendicular to the xy plane, yz plane, and xz plane, respectively). These eigenvectors will be used as a basis for subsequent collision detection to determine whether the embedded parts interfere with the steel members. It should be noted that although the axial bounding box representation of the embedded parts is a simplified processing, the bounding box completely contains the actual geometry of the embedded parts, so the reliability of collision detection can be guaranteed.

[0091] 103. Construct a vector list of a first approximate model and a second approximate model according to the edge vector and the surface normal vector, and calculate an axial bounding box of the first approximate model;

[0092] In one embodiment of the present invention, constructing a vector list of the first approximate model and the second approximate model based on the edge vectors and the face normal vectors, and calculating the axial bounding box of the first approximate model includes: retaining multiple decimal places of the edge vectors and the face normal vectors according to a preset retention number to obtain an edge vector string and a face normal vector string; calculating hash values ​​of the edge vector string and the face normal vector string respectively, and deduplicating the edge vector string and the face normal vector string according to the hash values; generating a first edge vector list of the first approximate model and a second edge vector list of the second approximate model according to the deduplicated edge vector string, and generating a first face normal vector list of the first approximate model and a second face normal vector list of the second approximate model according to the deduplicated face normal vector string; performing pairwise cross multiplication operations on the edge vectors in the first edge vector list and the second edge vector list to obtain a cross product vector list, and constructing the axial bounding box of the first approximate model according to the geometric data and position information of the first approximate model.

[0093] Specifically, when performing multi-decimal retention processing, the three coordinate components of each vector need to be processed separately. Due to the calculation error of the positioning of the model in space, different vectors may have slightly different coordinate values ​​even if they are collinear or parallel in theory. Therefore, performing three-decimal retention processing on the coordinate components can identify approximately equal vectors as the same vector within a certain error range. The specific operation is to convert the three coordinate components x, y, and z of each vector into strings respectively, and retain three decimal places. For values ​​without decimal places, 0 is added, for example, the coordinate value 1 is converted to "1.000". At the same time, for some special cases, such as values ​​close to 1, they need to be uniformly converted to the form of "1.000". The string form obtained after such processing is convenient for subsequent comparison and deduplication of vectors. For example, the vector (1.0001, 0.9999, 0) and the vector (1.000, 1.000, 0.000) will be considered to be the same vector after retaining three decimal places.

[0094] Specifically, when calculating hash values ​​and performing deduplication processing, the strings of the three coordinate components x, y, and z of each vector need to be processed separately. First, the hash value of each coordinate component string is calculated, and then the three hash values ​​are combined into a final hash value through an XOR operation. This processing method ensures that collinear or parallel vectors within a certain error range have the same hash value, which facilitates deduplication processing. For example, for two vectors with similar directions, even if their coordinate values ​​are slightly different, after retaining three decimal places and calculating hash values, if their difference is within the allowable error range, they will get the same hash value. In actual engineering, this processing method is particularly effective for processing a large number of nearly parallel or collinear steel bar edge vectors and surface normal vectors, and can greatly reduce the number of vectors that need to be detected for collision.

[0095] Specifically, when generating a vector list based on the vector string after deduplication, it is necessary to process the edge vectors and the face normal vectors separately. For the first approximate model (reinforced component) and the second approximate model (embedded part), it is necessary to generate their edge vector lists and face normal vector lists separately. The edge vectors of the first approximate model come from all the edges of the polygonal prism and the convex polyhedron, and the face normal vectors come from the normal vectors of all the faces; the edge vectors and face normal vectors of the second approximate model come from the twelve edges and six faces of the axial bounding box. When generating these lists, since deduplication has been performed, there will be no repeated vectors in the same model. Specifically, the vector list of the first approximate model will contain multiple vectors in different directions, while the vector list of the second approximate model mainly contains vectors parallel to or perpendicular to the coordinate axis. For example, for an axial bounding box of a cubic embedded part, its second edge vector list contains vectors in three directions (parallel to the x-axis, y-axis, and z-axis, respectively), and its second face normal vector list contains six normal vectors (perpendicular to three pairs of parallel faces, respectively).

[0096] Specifically, the process of performing pairwise cross multiplication operations on the edge vector list and constructing an axial bounding box is a key step for further processing. First, the vectors in the first edge vector list and the second edge vector list are cross-multiplied to obtain all possible cross-product vectors, which constitute the cross-product vector list. These cross-product vectors will be used as potential separation axes in subsequent collision detection. Then, according to the geometric data (including vertex coordinates, edge lengths, etc.) and position information of the first approximate model, its maximum and minimum ranges are determined in three-dimensional space to construct an axial bounding box that completely surrounds the model. The six faces of the axial bounding box are parallel to the coordinate plane, and its range is determined by the maximum and minimum coordinate values ​​of the model in the three coordinate axis directions. For example, for a steel bar with a 90-degree bend, its axial bounding box needs to completely contain the polygonal prism of the straight segment and the convex polyhedron of the bend segment to ensure that no possible collision is missed in subsequent collision detection.

[0097] 104. A BVH tree space index structure corresponding to the axial bounding box of the first approximate model is constructed using a quadtree structure, and collision detection is performed on the steel bar component and the embedded part according to the vector list, the second approximate model and the BVH tree space index structure to obtain a collision detection result;

[0098] In one embodiment of the present invention, the use of a quadtree structure to construct a BVH tree spatial index structure corresponding to the axial bounding box of the first approximate model includes: constructing a BVH tree root node according to the center point coordinates and boundary size data of the axial bounding box of the first approximate model, and quartering the BVH tree root node on the XY plane of the spatial coordinate system to obtain four child nodes; recursively dividing the axial bounding box of the first approximate model into multiple layers according to the spatial range of each child node until a preset number of division layers is reached to obtain a quadtree structure; performing a depth-first traversal on the quadtree structure, and storing the geometric data and position information of the first approximate model in the leaf nodes of the quadtree structure to obtain a quadtree structure with model information; and calculating the bounding box data of each parent node from the bottom up for the quadtree structure with model information to obtain the BVH tree spatial index structure.

[0099] Specifically, when constructing the root node of the BVH tree, the axial bounding box information of the first approximate model is needed to extract the center point coordinates and boundary size data from the bounding box. Since the number of models in the z-coordinate direction is usually in the single digit, it is a reasonable choice to divide the space on the xy plane. The specific operation is to first determine the projection range of the bounding box on the xy plane, calculate the center point coordinates of the projection rectangle, and then divide the xy plane into four quadrants based on the center point. These four quadrants correspond to four child nodes: topLeft (second quadrant), bottomLeft (third quadrant), topRight (first quadrant) and bottomRight (fourth quadrant). In actual engineering applications, for example, when processing a 1000mm×1000mm composite board, if the center of its bounding box is located at (500,500), the spatial ranges corresponding to the four child nodes are: topLeft(0-500,500-1000), bottomLeft(0-500,0-500), topRight(500-1000,500-1000) and bottomRight(500-1000,0-500).

[0100] Specifically, the process of multi-layer recursive division of each child node is the core step of BVH tree construction. Starting from the four child nodes of the first layer, the spatial range covered by each child node is checked. If the number of steel components contained in the range exceeds the set threshold and does not reach the maximum number of layers (10 layers), the node is divided into four equal parts to generate four new child nodes. This process will continue to recursively until the preset number of division layers is reached or the number of components in a node is small enough. The recursive division process needs to record the spatial range information and the component information contained in each node to ensure that the components can be correctly allocated to the corresponding spatial area. For example, when processing the reinforcement of the composite plate, the first layer of division may allocate the reinforcement to four 250mm×250mm areas, and the second layer of division will further subdivide these areas into smaller areas of 125mm×125mm, and subdivide them layer by layer until the termination condition is met.

[0101] Specifically, when performing a depth-first traversal of the quadtree structure, it is necessary to start from the root node, give priority to accessing the first child node of each node, until reaching the leaf node, and then backtrack to access other child nodes. During the traversal process, for each leaf node, it is necessary to store the geometric data and position information of the first approximate model (rebar component) within the spatial range of the node. The geometric data includes feature information such as the vertex coordinates, edge vectors, and face normal vectors of the component, and the position information includes the specific position and direction of the component in space. This information is crucial for subsequent collision detection. Taking a 12mm diameter steel bar in a composite plate as an example, if the steel bar is located within the spatial range of a leaf node, it is necessary to store the approximate polygonal prism model data of the steel bar in the leaf node, including the vertex coordinates of its cross section, the axis direction vector, and other information.

[0102] Specifically, finally, starting from the bottom leaf node, the bounding box of the node is calculated according to the model data stored in each leaf node, and then the bounding box data of all child nodes under the same parent node are merged layer by layer to generate the bounding box of the parent node. This merging process needs to ensure that the bounding box of the parent node can completely contain the bounding boxes of all its child nodes. During the specific calculation, it is necessary to calculate the maximum and minimum values ​​of the bounding boxes of all child nodes in the three directions of x, y, and z respectively, so as to obtain a larger bounding box. For example, for a parent node containing four child nodes, if the bounding boxes of the four child nodes are located in four different quadrants, then the bounding box of the parent node needs to cover the entire range of these four quadrants. This bottom-up calculation method ensures that the bounding box of each node in the BVH tree is optimal, which can fully contain the geometric range of all its child nodes without excessively expanding the spatial range.

[0103] Furthermore, the collision detection is performed on the steel bar component and the embedded part according to the vector list, the second approximate model and the BVH tree spatial index structure to obtain the collision detection result, including: performing AABB bounding box intersection judgment according to the second approximate model and the BVH tree root node of the BVH tree spatial index structure to obtain a preliminary collision judgment result; recursively traversing the leaf nodes of the BVH tree spatial index structure according to the preliminary collision judgment result, and marking the first approximate model under each leaf node to obtain a set of models to be detected; performing projection interval calculation on the set of models to be detected according to the vector list to obtain a projection overlap result, and generating a collision detection result according to the projection overlap result.

[0104] Specifically, when making an AABB bounding box intersection judgment, it is necessary to compare whether the axial bounding box of the second approximate model (embedded part) overlaps with the axial bounding box of the root node of the BVH tree. This judgment process is the first level of screening for the entire collision detection, and its purpose is to quickly exclude situations where it is obvious that a collision will not occur. The specific operation is to first obtain the minimum and maximum values ​​of the axial bounding box of the embedded part in the three coordinate axis directions, and at the same time obtain the minimum and maximum values ​​of the bounding box of the root node of the BVH tree in the three coordinate axis directions, and then determine whether there is an overlapping interval between the two bounding boxes in any coordinate axis direction. If there is any coordinate axis direction where the projection intervals of the two bounding boxes do not overlap, it is directly determined that there is no collision and false is returned; if there is an overlap in the projection intervals in the three coordinate axis directions, further detection is required. This kind of rapid detection of AABB bounding boxes can effectively filter out a large number of situations that do not require detailed collision detection in actual engineering. For example, when the embedded part is completely outside the steel bar distribution area, the bounding box detection can directly draw the conclusion that no collision will occur.

[0105] Specifically, when the preliminary collision judgment result shows that there is overlap, the BVH tree needs to be recursively traversed. This traversal process adopts a depth-first approach, starting from the root node and checking each child node in turn. For non-leaf nodes, it is necessary to continue to recursively check its four child nodes (topLeft, bottomLeft, topRight, bottomRight), and each child node must be judged to intersect with the bounding box of the embedded part. If the bounding box of a child node does not intersect with the bounding box of the embedded part, the detection of the child node and all its subtrees is skipped; if they intersect, continue to recurse downward. When traversing to a leaf node, if the bounding box of the leaf node intersects with the bounding box of the embedded part, all first approximate models (rebar components) stored under the leaf node are marked as models to be detected. This recursive traversal process is screened layer by layer, and finally a set of models that need to be accurately collided are obtained. These models are all located in the spatial area that intersects with the bounding box of the embedded part.

[0106] Specifically, after obtaining the set of models to be detected, it is necessary to perform detailed collision detection on each model in the set and the embedded parts. This detection process adopts the separating axis theorem. First, the edge vector and face normal vector of the model to be detected are extracted, and then the projection interval of the model vertex is calculated according to each vector direction in the vector list. For each projection direction, the projection intervals of the model to be detected and the embedded parts in this direction are calculated respectively, and it is determined whether these intervals overlap. If it is found that the projection intervals do not overlap in any direction, it means that there is no collision between the model and the embedded parts. At this time, the detection of the model is immediately terminated and the next model in the set is detected; only when the projection intervals in all directions overlap, can it be determined that the model has collided with the embedded parts. This precise detection based on the separating axis theorem ensures the accuracy of collision judgment, and at the same time improves the detection efficiency through the "fast failure" principle.

[0107] Furthermore, the projection interval calculation is performed on the set of models to be detected according to the vector list to obtain a projection overlap result, and the collision detection result is generated according to the projection overlap result, including: performing a projection interval calculation on the model vertices in the set of models to be detected according to the face normal vectors in the first face normal vector list and the second face normal vector list to obtain a first projection overlap result; performing a projection interval calculation on the model vertices in the set of models to be detected according to the cross product vector list to obtain a second projection overlap result; and performing a comprehensive analysis based on the first projection overlap result and the second projection overlap result to obtain the collision detection result.

[0108] Specifically, when using the surface normal vectors in the first surface normal vector list and the second surface normal vector list to calculate the projection interval, it is first necessary to organize the model vertices in the set of models to be detected into a specific data structure. For each model, all its vertex coordinates are constructed into a 3×n matrix form, where n is the number of vertices, and the three rows of the matrix correspond to the x, y, and z coordinate values, respectively. Specifically, for the first approximate model (reinforced component), the matrix MA=[a11 a12 ... a1n][a21 a22 ... a2n][a31 a32 ... a3n] is constructed, and for the second approximate model (embedded part), the matrix MB=[b11b12 ... b1n][b21 b22 ... b2n][b31 b32 ... b3n] is constructed. Then, for each surface normal vector L=[x,y,z], matrix operations are performed with MA and MB respectively to obtain the projection value sequence in that direction. For each projection value sequence, the minimum value (min(LMA)=tmin, min(LMB)=umin) and the maximum value (max(LMA)=tmax, max(LMB)=umax) are calculated to obtain the projection intervals [tmin,tmax] and [umin,umax] in this direction. The set of these projection intervals constitutes the first projection overlap result.

[0109] Specifically, the process of calculating the projection interval of the cross-product vector list is similar to that of the face normal vector, but the projection direction comes from the cross-product vector list. For the constructed matrices MA and MB, they are operated with each vector in the cross-product vector list respectively. Each cross-product vector is also expressed in the form of L=[x,y,z], and a projection value sequence is obtained by multiplying it with MA and MB. For each projection value sequence, it is also necessary to calculate the minimum value (tmin and umin) and the maximum value (tmax and umax) to obtain the projection interval [tmin, tmax] and [umin, umax] in the direction of the cross-product vector. This process needs to be executed for each vector in the cross-product vector list, and finally the projection interval information in all cross-product vector directions is obtained to form the second projection overlap result. In actual engineering, these cross-product vectors provide additional detection directions, making collision detection more comprehensive.

[0110] Specifically, when comprehensively analyzing the overlap result of the first projection and the overlap result of the second projection, the overlap amount is calculated for each interval pair in the projection direction. The calculation formula of the overlap amount is: Loverlap = L1 + L2 - (max(tmax,umax) - min(tmin,umin)), where L1=tmax-tmin represents the length of the first projection interval, and L2=umax-umin represents the length of the second projection interval. If the overlap amount Loverlap is greater than zero, it means that the projections of the two models overlap in this direction, and if it is less than or equal to zero, it means that there is no overlap in this direction. According to the separating axis theorem, if there is any direction that makes Loverlap less than or equal to zero, it can be directly determined that there is no collision between the two models, and the result of no collision is immediately returned; only when Loverlap in all directions is greater than zero, can it be determined that the two models collide. This analysis method follows the principle of "fast failure". Once a non-overlap situation is found, a conclusion is drawn immediately without checking other directions, so that in practical applications, situations where no collision will occur can be quickly identified.

[0111] Furthermore, the collision detection result is obtained by performing a comprehensive analysis based on the first projection overlap result and the second projection overlap result, including: calculating the overlapping interval length based on all projection intervals in the first projection overlap result and the second projection overlap result to obtain first overlapping amount data and second overlapping amount data; performing a non-zero judgment on the first overlapping amount data and the second overlapping amount data to obtain an overlapping amount judgment result, and judging whether the steel member and the embedded part collide with each other based on the overlapping amount judgment result; if so, analyzing the relative positions of the first approximate model and the second approximate model in the set of models to be detected based on the overlapping amount judgment result to obtain collision area information; marking the steel member and the embedded part that collide with each other based on the collision area information to obtain the collision detection result.

[0112] Specifically, when calculating the length of the overlapping interval according to the first projection overlap result and the second projection overlap result, it is necessary to process the interval data in each projection direction separately. For the projection intervals [tmin, tmax] and [umin, umax] from the direction of the surface normal vector in the first overlap result, first calculate the lengths of the respective intervals L1=tmax-tmin and L2=umax-umin, then calculate the overall span of the two intervals max(tmax, umax)-min(tmin, umin), and finally calculate the overlap amount by the formula Loverlap=L1+L2-(max(tmax, umax)-min(tmin, umin)). This calculation process needs to be performed once for all projection directions in the first projection overlap result to obtain the first overlap amount data. The same calculation process should also be applied to the projection interval from the cross product vector direction in the second projection overlap result to obtain the second overlap amount data. In this way, the overlap amount values ​​in all detection directions are obtained, which directly reflect the degree of projection overlap of the two models in each direction.

[0113] Specifically, when the first overlap data and the second overlap data are judged to be non-zero, it is necessary to check whether the overlap in all directions is greater than zero. According to the separating axis theorem, as long as there is a direction where the overlap is less than or equal to zero, it means that the projections of the two models in this direction are separated, so it can be directly determined that there is no collision between the two models. The specific operation is to first check the overlap in the direction of each face normal vector in the first overlap data. Once it is found that the overlap in a certain direction is less than or equal to zero, it is immediately determined that there is no collision; if the overlap in all directions in the first overlap data is greater than zero, then continue to check the overlap in the direction of the cross product vector in the second overlap data. Only when the overlap in all directions is strictly greater than zero can it be determined that the two models have collided. This judgment method follows the "fast failure" principle. Once it is found that the collision condition is not met, the result is returned immediately, avoiding unnecessary calculations.

[0114] Specifically, when a collision is determined, the relative positions of the first approximate model and the second approximate model need to be analyzed based on the overlap judgment results. This analysis process first needs to determine in which directions the overlap is smaller, and these directions are often the main directions of the collision. By comparing the overlap in different directions and combining the geometric characteristics of the model, the specific location and range of the collision can be determined. For example, for a vertical steel bar and a horizontal embedded part, if the overlap in the vertical direction is significantly smaller than that in the horizontal direction, it means that the collision mainly occurs at the intersection of the steel bar and the embedded part. This spatial position analysis can accurately locate the collision area and provide a basis for subsequent collision processing.

[0115] Specifically, finally, the steel bar components and embedded parts that collided are marked based on the collision area information. The marking process needs to record the specific location of the collision, the severity of the collision (determined by the size of the overlap), and the relevant spatial location information. These marking information will be used to guide subsequent avoidance adjustments, determine which steel bars need to be adjusted, and how to adjust them to most effectively avoid collisions. The marking results need to contain enough information so that the subsequent avoidance processing can accurately identify and handle each collision. At the same time, these marking information also provides designers with intuitive collision detection results, which facilitates solution optimization and adjustment. Through this detailed marking method, the integrity of the collision detection results is guaranteed, and the necessary data support is provided for the subsequent automatic avoidance processing.

[0116] 105. Make avoidance adjustments to the steel components based on the collision detection results to achieve anti-collision layout of embedded parts.

[0117] In one embodiment of the present invention, for the avoidance adjustment of the steel bar component, it is necessary to process it according to the situation mentioned in the material, after obtaining the collision detection result, combined with the position characteristics of the steel bar. Since the position of the embedded part is fixed, the steel bar needs to be avoided by bending, cutting, etc. The specific avoidance process first needs to analyze the collision area information in the collision detection result, which includes the specific position of the collision point, the main direction of the collision, and the size of the overlap. According to this information, the avoidance scheme of the steel bar is determined: when the steel bar collides with the embedded part, first determine whether the position is suitable for bending the steel bar. If it is suitable for bending, calculate the position and angle of the bending so that the steel bar bypasses the embedded part; if the position is not suitable for bending, consider cutting the steel bar and rearranging the steel bar on both sides of the embedded part to ensure that the structural strength meets the requirements. This avoidance adjustment process will generate a new steel bar arrangement scheme, which needs to ensure that the adjusted steel bar still meets the original structural function requirements. At the same time, the adjusted steel bar component must be re-approximated convex decomposition, generate a new first approximate model, and reconstruct the BVH tree spatial index structure to facilitate subsequent collision detection verification.

[0118] In this embodiment, by obtaining the structural data of the steel bar component and the geometric data of the embedded parts in the CAD drawing, the steel bar component is approximated by convex decomposition to generate the first approximate model of the steel bar component; an axial bounding box is generated according to the geometric data of the embedded parts to obtain the second approximate model of the embedded parts, and the edge vectors and surface normal vectors of the two are extracted to construct a vector list. The BVH tree spatial index structure of the axial bounding box is constructed according to the first approximate model, and collision detection is performed in combination with the vector list and the second approximate model to obtain the collision detection result. According to the detection result, the steel bar component is adjusted to avoid and realize the anti-collision arrangement of the embedded parts. The present invention optimizes the collision detection process through precise model approximation and spatial decomposition, thereby quickly locating potential problems and providing solutions to ensure the reasonable arrangement of embedded parts and steel bar components and the overall construction quality.

[0119] The above describes the anti-collision arrangement method of the embedded parts in the embodiment of the present invention. The following describes the anti-collision arrangement device of the embedded parts in the embodiment of the present invention. Figure 2 In one embodiment of the present invention, an anti-collision arrangement device for embedded parts includes:

[0120] An approximate convex decomposition module 201 is used to obtain structural data of a steel bar component and embedded part geometric data of embedded parts in a CAD drawing, and perform an approximate convex decomposition on the steel bar component according to the structural data to obtain a first approximate model of the steel bar component;

[0121] A vector extraction module 202 is used to represent the embedded part by an axial bounding box according to the embedded part geometric data, obtain a second approximate model of the embedded part, and extract edge vectors and surface normal vectors of the first approximate model and the second approximate model;

[0122] A list construction module 203, configured to construct a vector list of the first approximate model and the second approximate model according to the edge vector and the face normal vector, and calculate an axial bounding box of the first approximate model;

[0123] A collision detection module 204 is used to construct a BVH tree space index structure corresponding to the axial bounding box of the first approximate model using a quadtree structure, and perform collision detection on the steel bar component and the embedded part according to the vector list, the second approximate model and the BVH tree space index structure to obtain a collision detection result;

[0124] The avoidance adjustment module 205 is used to perform avoidance adjustment on the steel bar component according to the collision detection result to achieve the anti-collision arrangement of the embedded parts.

[0125] In an embodiment of the present invention, the embedded parts anti-collision arrangement device runs the above-mentioned embedded parts anti-collision arrangement method, and the embedded parts anti-collision arrangement device obtains the structural data of the steel bar component and the geometric data of the embedded parts in the CAD drawing, performs approximate convex decomposition on the steel bar component, and generates a first approximate model of the steel bar component; generates an axial bounding box according to the embedded parts geometric data, obtains the second approximate model of the embedded parts, and extracts the edge vectors and surface normal vectors of the two to construct a vector list. The BVH tree spatial index structure of the axial bounding box is constructed according to the first approximate model, and collision detection is performed in combination with the vector list and the second approximate model to obtain a collision detection result. According to the detection result, the steel bar component is adjusted to avoid and realize the anti-collision arrangement of the embedded parts. The present invention optimizes the collision detection process through precise model approximation and spatial decomposition, thereby quickly locating potential problems, and provides solutions to ensure the reasonable arrangement of embedded parts and steel bar components and the overall construction quality.

[0126] above Figure 2 The embedded parts anti-collision arrangement device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The embedded parts anti-collision arrangement device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0127] Figure 3 It is a structural schematic diagram of an embedded part anti-collision arrangement device provided by an embodiment of the present invention. The embedded part anti-collision arrangement device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage device terminals) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the embedded part anti-collision arrangement device 300. Furthermore, the processor 310 can be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the embedded part anti-collision arrangement device 300 to implement the steps of the above-mentioned embedded part anti-collision arrangement method.

[0128] The embedded component anti-collision arrangement device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It can be understood by those skilled in the art that Figure 3 The structure of the embedded part anti-collision arrangement device shown does not constitute a limitation on the embedded part anti-collision arrangement device provided by the present invention, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0129] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the embedded parts anti-collision arrangement method.

[0130] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.

[0131] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0132] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for arranging embedded parts to prevent collision, characterized in that: The embedded parts anti-collision arrangement method comprises: Acquire structural data of the steel bar component and embedded part geometric data of the embedded parts in the CAD drawing, and perform approximate convex decomposition on the steel bar component according to the structural data to obtain a first approximate model of the steel bar component; Performing an axial bounding box representation on the embedded part according to the embedded part geometric data to obtain a second approximate model of the embedded part, and extracting edge vectors and surface normal vectors of the first approximate model and the second approximate model; Constructing a vector list of the first approximate model and the second approximate model according to the edge vectors and the face normal vectors, and calculating an axial bounding box of the first approximate model; constructing a vector list of the first approximate model and the second approximate model according to the edge vectors and the face normal vectors, and calculating an axial bounding box of the first approximate model includes: retaining multiple decimal places of the edge vectors and the face normal vectors according to a preset retention number to obtain an edge vector string and a face normal vector string; calculating hash values ​​of the edge vector string and the face normal vector string respectively, and performing deduplication processing on the edge vector string and the face normal vector string according to the hash values; generating a first edge vector list of the first approximate model and a second edge vector list of the second approximate model according to the deduplication processed edge vector string, and generating a first face normal vector list of the first approximate model and a second face normal vector list of the second approximate model according to the deduplication processed face normal vector string; performing a pairwise cross multiplication operation on the edge vectors in the first edge vector list and the second edge vector list to obtain a cross product vector list, and constructing an axial bounding box of the first approximate model according to the geometric data and position information of the first approximate model; A BVH tree spatial index structure corresponding to the axial bounding box of the first approximate model is constructed using a quadtree structure, and collision detection is performed on the steel bar component and the embedded part according to the vector list, the second approximate model and the BVH tree spatial index structure to obtain a collision detection result; The steel bar component is adjusted to avoid collision according to the collision detection result to achieve anti-collision arrangement of the embedded parts.

2. The method for arranging anti-collision embedded parts according to claim 1, characterized in that: The step of acquiring structural data of the steel bar component and embedded part geometric data of the embedded parts in the CAD drawing, and performing approximate convex decomposition on the steel bar component according to the structural data to obtain a first approximate model of the steel bar component comprises: Acquire structural data of a steel bar component in a CAD drawing, and identify a straight segment portion and a bent segment portion in the steel bar component according to the structural data; Performing polygonal approximation calculation and correction calculation according to the cross-sectional radius and the circumference division angle in the structural data of the straight line segment portion to obtain corrected approximate data of the straight line segment portion; Performing polygon decomposition calculation and correction calculation according to the inner ring radius, outer ring radius and circumference segmentation angle in the structural data of the bending section to obtain the corrected decomposition data of the bending section; The steel bar component is three-dimensionally modeled according to the corrected approximate data of the straight segment part and the corrected decomposed data of the bent segment part to obtain a first approximate model of the steel bar component.

3. The method for arranging the embedded parts for anti-collision according to claim 1, characterized in that: The BVH tree spatial index structure corresponding to the axial bounding box of the first approximate model constructed by using the quadtree structure includes: Constructing a BVH tree root node according to the center point coordinates and boundary size data of the axial bounding box of the first approximate model, and dividing the BVH tree root node into four equal parts on the XY plane of the spatial coordinate system to obtain four child nodes; Recursively dividing the axial bounding box of the first approximate model into multiple layers according to the spatial range of each child node until a preset number of division layers is reached to obtain a quadtree structure; Performing a depth-first traversal on the quadtree structure, and storing the geometric data and position information of the first approximate model in the leaf nodes of the quadtree structure, to obtain a quadtree structure with model information; The bounding box data of each parent node is calculated from bottom to top for the quadtree structure with model information to obtain the BVH tree spatial index structure.

4. The method for arranging the embedded parts for anti-collision according to claim 1, characterized in that: The performing collision detection on the steel bar component and the embedded part according to the vector list, the second approximate model and the BVH tree spatial index structure to obtain the collision detection result comprises: Perform AABB bounding box intersection judgment according to the second approximate model and the BVH tree root node of the BVH tree spatial index structure to obtain a preliminary collision judgment result; Recursively traverse the leaf nodes of the BVH tree spatial index structure according to the preliminary collision judgment result, and mark the first approximate model under each leaf node to obtain a set of models to be detected; The projection interval calculation is performed on the set of models to be detected according to the vector list to obtain a projection overlap result, and a collision detection result is generated according to the projection overlap result.

5. The method for arranging the embedded parts for anti-collision according to claim 4, characterized in that: The step of performing projection interval calculation on the set of models to be detected according to the vector list to obtain a projection overlap result, and generating a collision detection result according to the projection overlap result includes: Performing projection interval calculation on model vertices in the set of models to be detected according to the surface normal vectors in the first surface normal vector list and the second surface normal vector list to obtain a first projection overlap result; Performing projection interval calculation on the model vertices in the set of models to be detected according to the cross product vector list to obtain a second projection overlap result; The collision detection result is obtained by performing a comprehensive analysis based on the first projection overlap result and the second projection overlap result.

6. The method for arranging the embedded parts for anti-collision according to claim 5, characterized in that: The collision detection result obtained by performing a comprehensive analysis based on the first projection overlap result and the second projection overlap result includes: Calculate the length of the overlapping interval according to all projection intervals in the first projection overlapping result and the second projection overlapping result to obtain first overlapping amount data and second overlapping amount data; Performing a non-zero judgment on the first overlap amount data and the second overlap amount data to obtain an overlap amount judgment result, and judging whether the steel bar component and the embedded part collide with each other according to the overlap amount judgment result; If yes, then analyzing the relative positions of the first approximate model and the second approximate model in the set of models to be detected according to the overlap judgment result to obtain collision area information; The steel bar components and embedded parts that collide are marked according to the collision area information to obtain the collision detection result.

7. An embedded part anti-collision arrangement device, characterized in that: The embedded part anti-collision arrangement device comprises: An approximate convex decomposition module is used to obtain structural data of the steel bar component and embedded part geometric data of the embedded parts in the CAD drawing, and perform approximate convex decomposition on the steel bar component according to the structural data to obtain a first approximate model of the steel bar component; A vector extraction module, used for performing an axial bounding box representation on the embedded part according to the embedded part geometric data, obtaining a second approximate model of the embedded part, and extracting edge vectors and surface normal vectors of the first approximate model and the second approximate model; A list construction module, used to construct a vector list of the first approximate model and the second approximate model according to the edge vectors and the face normal vectors, and calculate the axial bounding box of the first approximate model; the constructing the vector list of the first approximate model and the second approximate model according to the edge vectors and the face normal vectors, and calculating the axial bounding box of the first approximate model includes: retaining multiple decimal places of the edge vectors and the face normal vectors according to a preset retention number to obtain an edge vector string and a face normal vector string; calculating hash values ​​of the edge vector string and the face normal vector string respectively, and performing deduplication processing on the edge vector string and the face normal vector string according to the hash values; generating a first edge vector list of the first approximate model and a second edge vector list of the second approximate model according to the deduplication processed edge vector string, and generating a first face normal vector list of the first approximate model and a second face normal vector list of the second approximate model according to the deduplication processed face normal vector string; performing a pairwise cross multiplication operation on the edge vectors in the first edge vector list and the second edge vector list to obtain a cross product vector list, and constructing the axial bounding box of the first approximate model according to the geometric data and position information of the first approximate model; a collision detection module, configured to construct a BVH tree space index structure corresponding to the axial bounding box of the first approximate model by using a quadtree structure, and to perform collision detection on the steel bar component and the embedded part according to the vector list, the second approximate model and the BVH tree space index structure to obtain a collision detection result; The avoidance adjustment module is used to perform avoidance adjustment on the steel bar component according to the collision detection result to achieve anti-collision arrangement of the embedded parts.

8. An embedded part anti-collision arrangement device, characterized in that: The embedded parts anti-collision arrangement device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the embedded part anti-collision arrangement device to perform the steps of the embedded part anti-collision arrangement method as described in any one of claims 1-6.

9. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the steps of the method for anti-collision arrangement of embedded parts as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • BIM (Building Information Modeling) parameterization-based intelligent modeling method for fabricated superimposed shear wall

    CN114580053A

  • Method and system for detecting collision of double drill arms of anchor drilling machine

    CN116006227A