Wall object splicing method and device, and electronic device
By determining the arc contour and intersection of curved wall objects, the problem of precise splicing of straight and curved walls in house design was solved, achieving efficient splicing of wall objects and improving design efficiency and aesthetics.
Patent Information
- Application Number
- CN202411746747.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2044-11-29
AI Technical Summary
In house design, existing technologies make it difficult to achieve precise splicing of walls of different thicknesses, especially the splicing of straight walls and curved walls, which leads to gaps or overlaps, affecting aesthetics and functionality. In addition, the splicing algorithm is complex and computationally inefficient.
By obtaining the arc wall objects associated with the start and end points of the target wall object, the arc contours on the side of the wall object are determined, and the splicing points are determined based on the intersection of these contours, thus achieving precise splicing of straight walls and arc walls.
It enables precise splicing of walls of different thicknesses, improves design efficiency, enhances the accuracy and usability of architectural models, and provides a smooth and natural visual effect, thus improving aesthetics.
Smart Images

Figure CN119691856B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of decoration design, and in particular to a wall object splicing method and device and electronic equipment. BACKGROUND
[0002] In a house design scenario, a building design software is used to design door objects, window objects, wall objects and the like. When a wall object is designed, wall splicing exists. Currently, when splicing walls of different thicknesses is processed, the following problems often exist:
[0003] 1. The splicing part is not smooth, and gaps or overlaps often exist between walls, resulting in an undesirable splicing effect and affecting aesthetics and functionality; 2. The splicing of walls of different thicknesses cannot be effectively processed; 3. It is difficult to achieve accurate splicing of straight walls and arc walls; and 4. The splicing algorithm is complex and has low computational efficiency.
[0004] Due to the above problems existing when walls are spliced, the house design efficiency is low, and design errors are likely to occur, thereby affecting the design effect. SUMMARY
[0005] In view of the above problems, the embodiments of the present application provide a wall object splicing method, device and electronic equipment that overcome the above problems or at least partially solve the above problems.
[0006] In a first aspect, the embodiments of the present application provide a wall object splicing method, comprising:
[0007] obtaining M first arc wall objects associated with a starting point of a target wall object and N second arc wall objects associated with an end point, the target wall object being a straight wall object, and M and N being integers greater than or equal to 1;
[0008] determining, among the M first arc wall objects, a first target arc profile and a second target arc profile that match the left and right wall edges on the starting point side of the target wall object, and determining, among the N second arc wall objects, a third target arc profile and a fourth target arc profile that match the left and right wall edges on the end point side of the target wall object;
[0009] determining a first set of splicing points associated with the starting point according to the intersection of the first target arc profile, the second target arc profile and the left wall edge and the right wall edge on the starting point side of the target wall object, and determining a second set of splicing points associated with the end point according to the intersection of the third target arc profile, the fourth target arc profile and the left wall edge and the right wall edge on the end point side of the target wall object;
[0010] determining a wall splicing shape corresponding to splicing of the target wall object and arc wall objects according to the first set of splicing points, the second set of splicing points, the starting point and the end point.
[0011] In a second aspect, an embodiment of the present application provides a wall object splicing device, comprising:
[0012] an acquisition module configured to acquire M first arc wall objects associated with a starting point of a target wall object and N second arc wall objects associated with an ending point, the target wall object being a straight wall object, and M and N being integers greater than or equal to 1;
[0013] a first determination module configured to determine, among the M first arc wall objects, a first target arc profile and a second target arc profile matched with left and right wall edges on a starting point side of the target wall object, and determine, among the N second arc wall objects, a third target arc profile and a fourth target arc profile matched with left and right wall edges on an ending point side of the target wall object;
[0014] a second determination module configured to determine, according to intersection conditions of the first target arc profile, the second target arc profile, and left and right wall edges on the starting point side of the target wall object, a first group of splicing points associated with the starting point, and determine, according to intersection conditions of the third target arc profile, the fourth target arc profile, and left and right wall edges on the ending point side of the target wall object, a second group of splicing points associated with the ending point;
[0015] a third determination module configured to determine, according to the first group of splicing points, the second group of splicing points, the starting point, and the ending point, a wall splicing shape corresponding to splicing of the target wall object and arc wall objects.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the steps of the wall object splicing method according to the first aspect are implemented.
[0017] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the wall object splicing method according to the first aspect are implemented.
[0018] The technical scheme of the embodiment of the application comprises the following steps: after obtaining M first arc wall objects associated with the start point of the target wall object and N second arc wall objects associated with the end point, determining a first target arc profile matching the left wall side of the start point side of the target wall object and a second target arc profile matching the right wall side of the start point side of the target wall object in the M first arc wall objects, determining a third target arc profile matching the left wall side of the end point side of the target wall object and a fourth target arc profile matching the right wall side of the end point side of the target wall object in the N second arc wall objects, determining a first group of splicing points according to the intersection of the first target arc profile and the second target arc profile with the left and right wall sides of the start point side of the target wall object, determining a second group of splicing points according to the intersection of the third target arc profile and the fourth target arc profile with the left and right wall sides of the end point side of the target wall object, and determining the wall splicing shape of the target wall object according to the two groups of splicing points, the start point and the end point. The complex multi-wall joint situation can be automatically processed, the accurate splicing of the straight wall and the arc wall with different thicknesses is realized, the splicing requirements of various wall thicknesses and angles in different complex situations can be met, the visual splicing effect is smooth and natural, the aesthetic effect is improved, the design efficiency is greatly improved, and the accuracy and usability of the building model are enhanced. BRIEF DESCRIPTION OF DRAWINGS
[0019] Figure 1 A schematic diagram of a wall object splicing method provided by the embodiment of the application is shown.
[0020] Figure 2 A schematic diagram of determining a first unit vector provided by the embodiment of the application is shown.
[0021] Figure 3 A schematic diagram of determining a target arc profile provided by the embodiment of the application is shown.
[0022] Figure 4 A schematic diagram of determining a splicing point based on an intersection point provided by the embodiment of the application is shown.
[0023] Figure 5A A schematic diagram of determining a splicing point provided by the embodiment of the application is shown. Figure 1
[0024] Figure 5B A schematic diagram of determining a splicing point provided by the embodiment of the application is shown. Figure 2
[0025] Figure 6 A schematic diagram of finding a suitable arc profile provided by the embodiment of the application is shown.
[0026] Figure 7 An implementation flowchart of a wall object splicing method provided by the embodiment of the application is shown.
[0027] Figure 8 Fig. 1 shows a schematic diagram of a wall object splicing device according to an embodiment of the present application;
[0028] Figure 9 Fig. 2 shows a schematic diagram of an electronic device structure according to an embodiment of the present application. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0030] It should be understood that the terms "one embodiment" or "an embodiment" mentioned throughout the specification mean that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. The plurality of embodiments in the present application can include two and more than two.
[0031] In various embodiments of the present application, it should be understood that the size of the serial number of the following processes does not mean the order of execution, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0032] The embodiments of the present application provide a wall object splicing method, as shown in Figure 1 The method comprises the following steps.
[0033] In step 101, M first arc wall objects associated with the starting point of a target wall object and N second arc wall objects associated with the ending point of the target wall object are obtained, the target wall object is a straight wall object, and M and N are both integers greater than or equal to 1.
[0034] The wall object splicing method provided by the embodiments of the present application is applied to the scene of splicing a straight wall object (target wall object) and an arc wall object. For the straight wall object, when splicing the wall object based on the starting point and the ending point of the target wall object, M first arc wall objects associated with the starting point of the target wall object and N second arc wall objects associated with the ending point of the target wall object are obtained, and the values of M and N are both integers greater than or equal to 1.
[0035] M first arc wall objects associated with the start point of the target wall object are adjacent wall objects determined based on the start point of the target wall object, the number of adjacent wall objects is one or more, and the adjacent wall objects are in the form of arc walls. N second arc wall objects associated with the end point of the target wall object are adjacent wall objects determined based on the end point of the target wall object, the number of adjacent wall objects is one or more, and the adjacent wall objects are in the form of arc walls. Wherein, for the case where there is no adjacent wall object, no splicing is needed at this time.
[0036] For a wall object (such as a straight wall object or an arc wall object), wall contour points can be determined based on its start point, end point and wall thickness information. The wall contour refers to the boundary of the wall, and the wall contour points determined based on the start point, end point and wall thickness information include four contour points on the wall boundary, and the start point and end point of the wall object are located on the wall center line. For example, the start point (start), end point (end) and wall thickness (thickness) information of the target wall object are obtained, and the wall contour points startTop, startBottom, endTop and endBottom are calculated based on the above information. Wherein, if the start point of the target wall object has no associated adjacent wall object, startTop and startBottom are added to the target array to participate in subsequent key point sorting, and if the end point of the target wall object has no associated adjacent wall object, endTop and endBottom are added to the target array to participate in subsequent key point sorting.
[0037] For an arc wall object, its corresponding arc wall data includes: start point, end point, center, radius, top center and wall thickness. The center is the center of the circle corresponding to the arc wall object, and the top center is the midpoint on the arc center line determined based on the start point and the end point.
[0038] Step 102, determining a first target arc contour and a second target arc contour that match the left and right wall edges on the start point side of the target wall object among the M first arc wall objects, and determining a third target arc contour and a fourth target arc contour that match the left and right wall edges on the end point side of the target wall object among the N second arc wall objects.
[0039] After obtaining M first arc wall objects associated with the start point of the target wall object and N second arc wall objects associated with the end point of the target wall object, left and right wall classification is performed on the M first arc wall objects, left and right walls are determined on the start point side of the target wall object, and then a first target arc contour matching the left wall edge on the start point side of the target wall object and a second target arc contour matching the right wall edge on the start point side of the target wall object are determined. Left and right wall classification is performed on the N second arc wall objects, left and right walls are determined on the end point side of the target wall object, and then a third target arc contour matching the left wall edge on the end point side of the target wall object and a fourth target arc contour matching the right wall edge on the end point side of the target wall object are determined.
[0040] It should be noted that on the start point side of the target wall object, left and right walls and left and right wall edges are distinguished according to a vector from the start point to the end point. Wall object on the left side of the vector (straight line indicated by the vector) is a left wall, wall object on the right side of the vector (straight line indicated by the vector) is a right wall, wall edge on the left side of the vector (straight line indicated by the vector) is a left wall edge, and wall edge on the right side of the vector (straight line indicated by the vector) is a right wall edge. Correspondingly, on the end point side of the target wall object, left and right walls and left and right wall edges are distinguished according to a vector from the end point to the start point. Wall object on the left side of the vector (straight line indicated by the vector) is a left wall, wall object on the right side of the vector (straight line indicated by the vector) is a right wall, wall edge on the left side of the vector (straight line indicated by the vector) is a left wall edge, and wall edge on the right side of the vector (straight line indicated by the vector) is a right wall edge. The vector from the start point to the end point and the vector from the end point to the start point correspond to opposite directions.
[0041] In the embodiments of the present application, the left wall edge and the right wall edge on the start point side of the target wall object are determined based on a vector from the start point to the end point, and the left wall edge and the right wall edge on the end point side of the target wall object are determined based on a vector from the end point to the start point.
[0042] After left and right wall classification is performed on the M first arc wall objects, the first target arc contour matching the left wall edge on the start point side of the target wall object is determined in the corresponding left wall on the start point side, and the second target arc contour matching the right wall edge on the start point side of the target wall object is determined in the corresponding right wall on the start point side. After left and right wall classification is performed on the N second arc wall objects, the third target arc contour matching the left wall edge on the end point side of the target wall object is determined in the corresponding left wall on the end point side, and the fourth target arc contour matching the right wall edge on the end point side of the target wall object is determined in the corresponding right wall on the end point side.
[0043] Step 103, determining a first set of splicing points associated with the starting point according to the intersection of the first target arc-shaped contour, the second target arc-shaped contour and the left wall edge and the right wall edge of the starting point side of the target wall object, and determining a second set of splicing points associated with the ending point according to the intersection of the third target arc-shaped contour, the fourth target arc-shaped contour and the left wall edge and the right wall edge of the ending point side of the target wall object.
[0044] After determining the first target arc-shaped contour and the second target arc-shaped contour on the starting point side, the first set of splicing points associated with the starting point is determined based on the intersection of the first target arc-shaped contour and the left wall edge of the starting point side of the target wall object, and the intersection of the second target arc-shaped contour and the right wall edge of the starting point side of the target wall object; after determining the third target arc-shaped contour and the fourth target arc-shaped contour on the ending point side, the second set of splicing points associated with the ending point is determined based on the intersection of the third target arc-shaped contour and the left wall edge of the ending point side of the target wall object, and the intersection of the fourth target arc-shaped contour and the right wall edge of the ending point side of the target wall object.
[0045] Wherein, the determination of the second set of splicing points associated with the ending point and the determination of the first set of splicing points associated with the starting point can be a parallel process, or one set of splicing points can be determined after the other set of splicing points is determined, which will not be described in detail here.
[0046] Step 104, determining the wall splicing shape corresponding to the splicing of the target wall object and the arc wall object according to the first set of splicing points, the second set of splicing points, the starting point and the ending point.
[0047] After obtaining the first set of splicing points associated with the starting point and the second set of splicing points associated with the ending point, the wall splicing shape corresponding to the target wall object when the target wall object is finally spliced with the first arc wall object and the second arc wall object is determined according to the first set of splicing points, the second set of splicing points, the starting point and the ending point of the target wall object, and then high-quality wall splicing can be performed based on the wall splicing shape.
[0048] In the above embodiments of the present application, after obtaining M first arc wall objects associated with the starting point of the target wall object and N second arc wall objects associated with the ending point, a first target arc profile matching the left wall edge on the starting point side of the target wall object is determined in the M first arc wall objects, a second target arc profile matching the right wall edge on the starting point side of the target wall object is determined in the M first arc wall objects, a third target arc profile matching the left wall edge on the ending point side of the target wall object is determined in the N second arc wall objects, and a fourth target arc profile matching the right wall edge on the ending point side of the target wall object is determined in the N second arc wall objects. The first set of splicing points is determined according to the intersection of the first target arc profile and the second target arc profile with the left and right wall edges on the starting point side of the target wall object, the second set of splicing points is determined according to the intersection of the third target arc profile and the fourth target arc profile with the left and right wall edges on the ending point side of the target wall object, and the wall splicing shape of the target wall object is determined according to the two sets of splicing points, the starting point and the ending point. The complex multi-wall joint situation can be automatically processed, the accurate splicing of straight walls and arc walls with different thicknesses is realized, the visual splicing effect is smooth and natural, the aesthetic effect is improved, the automation and accuracy of wall splicing are realized, and the design efficiency is greatly improved, and the accuracy and usability of the building model are enhanced.
[0049] As an optional embodiment of the present application, the first target arc profile is located in a first array, and the second target arc profile is located in a second array. On the starting point side of the target wall object, the first array stores the first arc wall object on the left side, and the second array stores the first arc wall object on the right side. The first array and the second array are divided based on a first unit vector corresponding to the first arc wall object. The first unit vector is a unit vector corresponding to a tangent vector with a smaller included angle between the first target vector and the two tangent vectors corresponding to the first arc wall object at the starting point. The first target vector is determined based on the starting point and the arc center point of the first arc wall object.
[0050] The third target arc profile is located in a third array, and the fourth target arc profile is located in a fourth array. On the ending point side of the target wall object, the third array stores the second arc wall object on the left side, and the fourth array stores the second arc wall object on the right side. The third array and the fourth array are divided based on a second unit vector corresponding to the second arc wall object. The second unit vector is a unit vector corresponding to a tangent vector with a smaller included angle between the second target vector and the two tangent vectors corresponding to the second arc wall object at the ending point. The second target vector is determined based on the ending point and the arc center point of the second arc wall object.
[0051] In this embodiment, the first array and the second array are associated with the start point of the target wall object, the first array stores the first arc wall object located on the left side of the start point of the target wall object (specifically, the left side of the straight line indicated by the vector from the start point to the end point), and the second array stores the first arc wall object located on the right side of the start point of the target wall object (specifically, the right side of the straight line indicated by the vector from the start point to the end point). Since the first array stores the adjacent wall object on the left side of the start point, the first array can be represented as leftWalls array 1; since the second array stores the adjacent wall object on the right side of the start point, the second array can be represented as rightWalls array 1. And since the first array stores the left adjacent wall, on the start point side, the first target arc profile matching the left wall side of the target wall object is located in the first array, and since the second array stores the right adjacent wall, on the start point side, the second target arc profile matching the right wall side of the target wall object is located in the second array.
[0052] For each of the M first arc wall objects, it corresponds to a first unit vector, the first unit vector is the unit vector corresponding to one of the two tangent vectors corresponding to the start point of the first arc wall object, specifically: the unit vector corresponding to the tangent vector with a smaller angle between the first target vector is the first unit vector. For each first arc wall object, it also corresponds to a first target vector, the first target vector corresponding to the first arc wall object is determined based on the start point and the arc center point of the first arc wall object, the arc center point is the midpoint on the arc center line determined based on the start point and the end point, also known as the top center. As an example, as shown in Figure 2 , the arc wall object in Figure 2 corresponds to two tangent vectors at the start point, which are vector a and vector b (for example, both vector a and vector b are unit vectors), the angle between vector a and the first target vector c is smaller than the angle between vector b and the first target vector c, therefore, vector a is the first unit vector.
[0053] Correspondingly, the third array and the fourth array are associated with the end point of the target wall object, the third array stores the second arc wall object located on the left side of the end point of the target wall object (specifically, the left side of the straight line indicated by the vector from the end point to the start point), and the fourth array stores the second arc wall object located on the right side of the end point of the target wall object (specifically, the right side of the straight line indicated by the vector from the end point to the start point). Since the third array stores the adjacent wall object on the left side of the end point, the third array can be represented as leftWalls array 2; since the fourth array stores the adjacent wall object on the right side of the end point, the fourth array can be represented as rightWalls array 2. And since the third array stores the left adjacent wall, on the end point side, the third target arc profile matching the left wall side of the target wall object is located in the third array, and since the fourth array stores the right adjacent wall, on the end point side, the fourth target arc profile matching the right wall side of the target wall object is located in the fourth array.
[0054] For each of the N second arc wall objects, there is a corresponding second unit vector. This second unit vector is the unit vector corresponding to one of the two tangent vectors at the endpoint of the second arc wall object. Specifically, the unit vector corresponding to the tangent vector with the smaller angle to the second target vector is the second unit vector. Each second arc wall object also corresponds to a second target vector, which is determined based on the endpoint and the center point of the arc of the second arc wall object.
[0055] The above content introduced the first and second arrays of the associated starting points, the third and fourth arrays of the associated ending points, and the unit vector and target vector corresponding to the arc wall object. The following section introduces how to classify walls based on unit vectors and determine the target arc contour in the arrays.
[0056] Among the M first arc wall objects, determining the first and second target arc contours that match the left and right wall edges on the starting side of the target wall object, and determining the third and fourth target arc contours that match the left and right wall edges on the ending side of the target wall object among the N second arc wall objects, includes:
[0057] Based on the first vector and the first unit vector corresponding to the first arc wall object, the M first arc wall objects are classified into left and right walls, and the first array and the second array are determined. In the first array, the first target arc contour matching the left wall edge of the starting side of the target wall object is determined, and in the second array, the second target arc contour matching the right wall edge of the starting side of the target wall object is determined.
[0058] Based on the second vector and the second unit vector corresponding to the second arc wall object, classify the N second arc wall objects into left and right walls, determine the third array and the fourth array, and determine the third target arc contour that matches the left wall edge of the target wall object's endpoint in the third array, and determine the fourth target arc contour that matches the right wall edge of the target wall object's endpoint in the fourth array.
[0059] The first vector is the vector pointing from the starting point to the ending point, and the second vector is the vector pointing from the ending point to the starting point.
[0060] For the M first arc wall objects on the start point side, based on the first vector (a vector of the target wall object with the start point pointing to the end point) and the first unit vector corresponding to each first arc wall object, the M first arc wall objects are classified into left and right walls, the left walls are stored in a first array, and the right walls are stored in a second array, so as to determine the first array of the first arc wall objects stored on the left side of the target wall object on the start point side and the second array of the first arc wall objects stored on the right side of the target wall object on the start point side. In the initial case, the first array and the second array are empty arrays. When the first unit vector corresponding to the first arc wall object is determined, the included angle between the two tangent vectors corresponding to the first arc wall object at the start point and the first target vector is calculated, and the unit vector corresponding to the tangent vector with the smaller included angle is determined as the first unit vector.
[0061] After the first array is determined, the first target arc profile matching the left wall edge of the target wall object on the start point side is determined in the first array; after the second array is determined, the second target arc profile matching the right wall edge of the target wall object on the start point side is determined in the second array.
[0062] For the N second arc wall objects on the end point side, based on the second vector (a vector of the target wall object with the end point pointing to the start point) and the second unit vector corresponding to each second arc wall object, the N second arc wall objects are classified into left and right walls, the left walls are stored in a third array, and the right walls are stored in a fourth array, so as to determine the third array of the second arc wall objects stored on the left side of the target wall object on the end point side and the fourth array of the second arc wall objects stored on the right side of the target wall object on the end point side. In the initial case, the third array and the fourth array are empty arrays. When the second unit vector corresponding to the second arc wall object is determined, the included angle between the two tangent vectors corresponding to the second arc wall object at the end point and the second target vector is calculated, and the unit vector corresponding to the tangent vector with the smaller included angle is determined as the second unit vector.
[0063] After the third array is determined, the third target arc profile matching the left wall edge of the target wall object on the end point side is determined in the third array; after the fourth array is determined, the fourth target arc profile matching the right wall edge of the target wall object on the end point side is determined in the fourth array.
[0064] In the above embodiment, the arc wall objects are classified into left and right walls according to the unit vector and the vector determined based on the start point and the end point, and after the first array and the second array associated with the start point and the third array and the fourth array associated with the end point are determined through wall classification, the corresponding target arc profile is screened in each array, and then the profile line matching the left and right wall edges of the target wall object is determined on the start point side and the end point side.
[0065] For the M first arc wall objects on the start point side, based on the first vector and the first unit vector corresponding to the first arc wall object, the M first arc wall objects are classified into left and right wall bodies, the first array and the second array are determined, and when the first target arc profile matching the left wall side of the target wall object on the start point side is determined in the first array and the second target arc profile matching the right wall side of the target wall object on the start point side is determined in the second array, comprising:
[0066] For each first arc wall object, according to the cross product operation result of the first vector and the first unit vector corresponding to the first arc wall object, the positional relationship between the first arc wall object and the target wall object is identified, and left and right wall classification is performed to determine the first array and the second array;
[0067] In each first arc wall object of the first array, the first arc profile adjacent to the left wall side of the target wall object on the start point side is determined, and based on the included angle information between the first unit vector corresponding to the first arc profile and the first vector, the first target arc profile closest to the left wall side of the target wall object on the start point side is determined.
[0068] In each first arc wall object of the second array, the first arc profile adjacent to the right wall side of the target wall object on the start point side is determined, and based on the included angle information between the first unit vector corresponding to the first arc profile and the first vector, the second target arc profile closest to the right wall side of the target wall object on the start point side is determined.
[0069] On the start point side, for each of the M first arc wall objects, according to the vector cross product operation of the first vector and the first unit vector corresponding to the first arc wall object, based on the operation result, the positional relationship between the first unit vector corresponding to the first arc wall object and the target wall object is identified to determine whether the first arc wall object is on the left side or the right side of the target wall object.
[0070] Wherein, when the result of the cross product operation is less than 0, it indicates that the first unit vector is in the clockwise direction (within 180 degrees) of the first vector, i.e. the first arc wall object corresponding to the first unit vector is on the right side of the target wall object, and when the result of the cross product operation is greater than 0, it indicates that the first unit vector is in the counterclockwise direction (within 180 degrees) of the first vector, i.e. the first arc wall object corresponding to the first unit vector is on the left side of the target wall object, and further realizing left and right wall classification based on the cross product operation result.
[0071] After dividing the M first arc wall objects on the starting side into left and right walls, in each of the first arc wall objects in the first array, the first arc contour adjacent to the left wall edge of the target wall object on the starting side is determined to obtain at least one first arc contour. Then, based on the dot product operation, the first target arc contour closest to the left wall edge of the target wall object on the starting side is determined from among the at least one first arc contour. Specifically, when determining the first target arc contour, based on the angle information between the first unit vector and the first vector corresponding to each of the at least one first arc contour, the first unit vector with the smallest angle with the first vector is determined. The first arc contour corresponding to the determined first unit vector is then identified as the first target arc contour, thus determining the first target arc contour closest to the left wall edge of the target wall object on the starting side. The angle information between the first unit vector and the first vector is determined based on the vector angle formula related to the vector dot product operation.
[0072] Accordingly, in each of the first arc wall objects in the second array, a first arc contour adjacent to the right wall edge of the starting point side of the target wall object is determined to obtain at least one first arc contour, and then a second target arc contour closest to the right wall edge of the starting point side of the target wall object is determined in at least one first arc contour based on the dot product operation.
[0073] For example, such as Figure 3 As shown, the starting side of the target wall object has a first arc wall object a and a first arc wall object b. Among the two arc wall objects, two first arc contours (the contours indicated by the arrows in the figure) adjacent to the wall edge A (left wall edge) of the target wall object are determined. Angle calculation is performed based on the dot product operation between the first unit vectors corresponding to the two first arc contours (i.e., the first unit vectors corresponding to the two arc walls) and the first vector (the vector from the starting point to the ending point). The first arc contour (the outer contour corresponding to the first arc wall object b) corresponding to the first unit vector with the smallest angle is determined as the target arc contour.
[0074] For N second-arc wall objects on the endpoint side, based on the second vector and the second unit vector corresponding to the second-arc wall objects, the N second-arc wall objects are classified into left and right walls to determine the third and fourth arrays. When determining the third target arc contour matching the left wall edge of the endpoint side of the target wall object in the third array, and the fourth target arc contour matching the right wall edge of the endpoint side of the target wall object in the fourth array, the process includes:
[0075] For each second arc wall object, based on the cross product of the second vector and the second unit vector corresponding to the second arc wall object, the positional relationship between the second arc wall object and the target wall object is identified, the left and right walls are classified, and the third and fourth arrays are determined.
[0076] In each of the second arc wall objects in the third array, a second arc profile adjacent to the left wall side of the end side of the target wall object is determined, and based on the included angle information between the second unit vector corresponding to the second arc profile and the second vector, a third target arc profile closest to the left wall side of the end side of the target wall object is determined.
[0077] In each of the second arc wall objects in the fourth array, a second arc profile adjacent to the right wall side of the end side of the target wall object is determined, and based on the included angle information between the second unit vector corresponding to the second arc profile and the second vector, a fourth target arc profile closest to the right wall side of the end side of the target wall object is determined.
[0078] At the end side, for each of the N second arc wall objects, a vector cross product operation is performed on the second vector and the second unit vector corresponding to the second arc wall object, and based on the operation result, the positional relationship between the second arc wall object corresponding to the second unit vector and the target wall object is identified to determine whether the second arc wall object is on the left side or the right side of the target wall object.
[0079] Wherein, when the cross product operation result is less than 0, it indicates that the second unit vector is in the clockwise direction (within 180 degrees) of the second vector, i.e., the second arc wall object corresponding to the second unit vector is on the right side of the target wall object, and when the cross product operation result is greater than 0, it indicates that the second unit vector is in the counterclockwise direction (within 180 degrees) of the second vector, i.e., the second arc wall object corresponding to the second unit vector is on the left side of the target wall object, thereby realizing left and right wall classification based on the cross product operation result.
[0080] After the left and right wall division of the N second arc wall objects at the end side, in each of the second arc wall objects in the third array, a second arc profile adjacent to the left wall side of the end side of the target wall object is determined to obtain at least one second arc profile, and then based on the dot product operation, a third target arc profile closest to the left wall side of the end side of the target wall object is determined in the at least one second arc profile. Correspondingly, in each of the second arc wall objects in the fourth array, a second arc profile adjacent to the right wall side of the end side of the target wall object is determined to obtain at least one second arc profile, and then based on the dot product operation, a fourth target arc profile closest to the right wall side of the end side of the target wall object is determined in the at least one second arc profile.
[0081] In the above embodiment, the left and right wall classification is performed based on the vector cross product operation, and after the left and right wall classification is determined, the arc profiles adjacent to the left wall side or the right wall side of the target wall object are screened in the array, and the final target arc profile is determined based on the vector dot product operation to determine the target arc profile adapted to the left and right wall sides of the target wall object.
[0082] After the target arc profiles are determined in the array, it is necessary to determine the splicing points based on the target arc profiles. In an optional embodiment of the present application, the first set of splicing points associated with the starting point is determined according to the intersection of the first target arc profile, the second target arc profile and the left wall side and the right wall side of the starting point side of the target wall object, the second set of splicing points associated with the ending point is determined according to the intersection of the third target arc profile, the fourth target arc profile and the left wall side and the right wall side of the ending point side of the target wall object, including:
[0083] The first set of splicing points associated with the starting point is determined based on the intersection of the first circle where the first target arc profile is located and the straight line where the left wall side of the starting point side of the target wall object is located, and the intersection of the second circle where the second target arc profile is located and the straight line where the right wall side of the starting point side of the target wall object is located.
[0084] The second set of splicing points associated with the ending point is determined based on the intersection of the third circle where the third target arc profile is located and the straight line where the left wall side of the ending point side of the target wall object is located, and the intersection of the fourth circle where the fourth target arc profile is located and the straight line where the right wall side of the ending point side of the target wall object is located.
[0085] After the first target arc profile and the second target arc profile of the starting point side and the third target arc profile and the fourth target arc profile of the ending point side are determined, the first circle is determined based on the first target arc profile and the second circle is determined based on the second target arc profile on the starting point side, and the first set of splicing points associated with the starting point is determined according to the intersection of the first circle and the straight line where the left wall side of the target wall object is located, and the intersection of the second circle and the straight line where the right wall side of the target wall object is located. On the ending point side, the third circle is determined based on the third target arc profile and the fourth circle is determined based on the fourth target arc profile, and the second set of splicing points associated with the ending point is determined according to the intersection of the third circle and the straight line where the left wall side of the target wall object is located, and the intersection of the fourth circle and the straight line where the right wall side of the target wall object is located. It should be noted that the first vector pointing from the starting point to the ending point and the second vector pointing from the ending point to the starting point indicate opposite directions, and the first vector and the second vector are used to distinguish the left wall and the right wall, so the straight line where the left wall on the starting point side is located is the straight line where the right wall on the ending point side is located.
[0086] Wherein, when the first set of splicing points is determined according to the intersection of the first circle and the straight line where the left wall side of the starting point side of the target wall object is located, and the intersection of the second circle and the straight line where the right wall side of the starting point side of the target wall object is located, it includes:
[0087] The first intersection point of the first circle and the associated straight line and the second intersection point of the second circle and the associated straight line are identified.
[0088] determine the corresponding splicing point of the left wall side of the target wall object start point side according to the number of first intersection points, and determine the corresponding splicing point of the right wall side of the target wall object start point side according to the number of second intersection points;
[0089] determine the first group of splicing points according to the corresponding splicing point of the left wall side of the target wall object start point side and the corresponding splicing point of the right wall side of the target wall object start point side.
[0090] The first circle and the straight line where the left wall side of the target wall object start point side is located can correspond to 0 first intersection points, 1 first intersection point or 2 first intersection points. Based on the number of first intersection points, the corresponding strategy is adopted to determine the splicing point corresponding to the left wall side of the target wall object start point side. The second circle and the straight line where the right wall side of the target wall object start point side is located can correspond to 0 second intersection points, 1 second intersection point or 2 second intersection points. Based on the number of second intersection points, the corresponding strategy is adopted to determine the splicing point corresponding to the right wall side of the target wall object start point side. After determining the splicing point corresponding to the left wall side of the target wall object start point side and the splicing point corresponding to the right wall side of the target wall object start point side, the first group of splicing points can be determined.
[0091] Wherein, for the first intersection point, if the number of first intersection points is 0, the corresponding contour point of the left wall side of the target wall object start point side is determined as the splicing point; if the number of first intersection points is 1, the first intersection point is determined as the splicing point; if the number of first intersection points is 2, the first intersection point closest to the start point is determined as the splicing point, or, in response to the distance between the two first intersection points and the start point being equal, the included angle between the two intersection point vectors corresponding to the two first intersection points and the first unit vector corresponding to the first target arc contour is calculated, the first intersection point corresponding to the intersection point vector with smaller included angle is determined as the splicing point, and the intersection point vector is determined based on the start point and the first intersection point.
[0092] If the first circle and the straight line where the left wall side of the target wall object is located have no intersection point, the contour point corresponding to the left wall side of the target wall object is determined as the splicing point. If the first circle and the straight line where the left wall side of the target wall object is located have only one intersection point (first intersection point), the intersection point is determined as the splicing point. If the first circle and the straight line where the left wall side of the target wall object is located have two intersection points (first intersection points), the intersection point closest to the start point is determined among the two intersection points, and the intersection point is determined as the splicing point; if the distances between the two intersection points and the start point are the same, the corresponding intersection point vectors (determined based on the start point and the first intersection point) are determined for the two intersection points, the included angle between the intersection point vectors and the first unit vector corresponding to the first target arc contour is calculated, and the first intersection point corresponding to the intersection point vector with smaller included angle is determined as the splicing point.
[0093] The process of determining the splicing point when the distances between the two intersection points and the start point are the same will be introduced below. As shown in FIG. 6, the first circle and the straight line where the left wall side of the target wall object is located have two intersection points (first intersection points), and the distances between the two intersection points and the start point are the same. Figure 4As shown in the figure, on the starting point side, the first circle where the first target arc-shaped contour matching the left wall edge of the target wall object is located and the straight line where the left wall edge of the target wall object is located have two intersection points (intersection point a and intersection point b), the distance between the two intersection points and the starting point is equal, then the intersection point vector 1 is determined based on the starting point and the intersection point a, the intersection point vector 2 is determined based on the starting point and the intersection point b, since the angle between the intersection point vector 1 and the first unit vector is small, the intersection point a is determined as the splicing point.
[0094] For the second target arc-shaped contour matching the right wall edge of the starting point side of the target wall object, the second circle where the second target arc-shaped contour is located and the straight line where the right wall edge of the target wall object is located have one of the following intersection conditions: no second intersection point, one second intersection point, two second intersection points, for the processing conditions of different numbers of second intersection points, refer to the processing process of the first intersection point.
[0095] As an example, as shown in the figure, Figure 5A On the starting point side, the second circle where the second target arc-shaped contour matching the right wall edge of the target wall object is located and the straight line where the right wall edge of the target wall object is located have no intersection point, then the contour point (point c) corresponding to the right wall edge of the target wall object is directly determined as the splicing point.
[0096] As an example, as shown in the figure, Figure 5B On the starting point side, the second circle where the second target arc-shaped contour matching the right wall edge of the target wall object is located and the straight line where the right wall edge of the target wall object is located have one intersection point, then the intersection point (point d) is determined as the splicing point.
[0097] Correspondingly, on the ending point side, based on the intersection condition of the third circle where the third target arc-shaped contour is located and the straight line where the left wall edge of the ending point side of the target wall object is located, the intersection condition of the fourth circle where the fourth target arc-shaped contour is located and the straight line where the right wall edge of the ending point side of the target wall object is located, the third intersection point of the third circle and the associated straight line is identified, the fourth intersection point of the fourth circle and the associated straight line is identified when determining the second group of splicing points.
[0098] According to the number of third intersection points, the splicing point corresponding to the left wall edge of the ending point side of the target wall object is determined, according to the number of fourth intersection points, the splicing point corresponding to the right wall edge of the ending point side of the target wall object is determined.
[0099] According to the splicing point corresponding to the left wall edge of the ending point side of the target wall object, the splicing point corresponding to the right wall edge of the ending point side of the target wall object, the second group of splicing points is determined.
[0100] The third circle and the straight line where the left wall edge of the end side of the target wall object is located can correspond to 0 third intersection point, 1 third intersection point or 2 third intersection points, and the corresponding splicing point of the left wall edge of the end side of the target wall object is determined based on the number of third intersection points; the fourth circle and the straight line where the right wall edge of the end side of the target wall object is located can correspond to 0 fourth intersection point, 1 fourth intersection point or 2 fourth intersection points, and the corresponding splicing point of the right wall edge of the end side of the target wall object is determined based on the number of fourth intersection points. After determining the corresponding splicing point of the left wall edge of the end side of the target wall object and the corresponding splicing point of the right wall edge of the target wall object, the second group of splicing points can be determined. The specific implementation process is similar to that of determining the first group of splicing points, which will not be repeated here.
[0101] In the above embodiment, based on the intersection of the circle where the target arc-shaped contour is located and the straight line where the corresponding wall edge is located, a suitable strategy is adopted to screen intersection points to determine splicing points, so as to determine the optimal splicing point through multiple screening and optimization, thereby ensuring the rationality and smoothness of the splicing point and further ensuring the splicing effect.
[0102] The process of determining the wall splicing shape based on the splicing point will be introduced below. When determining the corresponding wall splicing shape of the target wall object and the arc wall object when splicing, based on the first group of splicing points, the second group of splicing points, the starting point and the end point, including:
[0103] The first group of splicing points, the second group of splicing points, the starting point and the end point are stored as key points in a target array; the target center point is determined based on the midpoint of the starting point and the end point; a key point in the target array is selected as a reference point, and the reference vector is determined based on the target center point and the reference point; the key point vector is determined based on the target center point and the key points in the target array; the key points in the target array are sorted in order from small to large according to the included angle between the reference vector and the key point vector, and the corresponding wall splicing shape of the target wall object is determined;
[0104] Wherein, if the cross product of the reference vector and the key point vector is positive, the included angle between the reference vector and the key point vector is 360 minus the included angle determined based on the vector included angle formula, and if the cross product of the reference vector and the key point vector is negative, the included angle between the reference vector and the key point vector is the included angle determined based on the vector included angle formula.
[0105] After determining the target array including the first group of splicing points, the second group of splicing points, the starting point and the end point, the target center point is determined based on the midpoint of the starting point and the end point, such as point C, then a key point in the target array is selected as a reference point P, and then the key points in the target array are traversed one by one, the traversed key point is recorded as point S, and the included angle between CP vector and CS vector is calculated.
[0106] When the included angle between the CP vector and the CS vector is calculated, the positional relationship between the CP vector and the CS vector also needs to be considered. If the CS vector is in the clockwise direction of the CP vector (only the clockwise direction within 180 degrees is considered), the included angle between the CP vector and the CS vector is a first included angle determined based on a vector included angle formula, and the vector included angle formula is cos θ = (a · b) / (|a| · |b|). If the CS vector is in the counterclockwise direction of the CP vector (only the counterclockwise direction within 180 degrees is considered), the included angle between the CP vector and the CS vector is a second included angle, and the second included angle is 360 degrees minus the first included angle determined based on the vector included angle formula.
[0107] In this embodiment, the coordinate system corresponding to the embodiment is a normal coordinate system (the right side of the X axis is the positive half axis, and the upper side of the Y axis is the positive half axis). If the cross product of the reference vector and the key point vector is negative, it indicates that the key point vector is in the clockwise direction of the reference vector (the clockwise direction within 180 degrees). If the cross product of the reference vector and the key point vector is positive, it indicates that the key point vector is in the counterclockwise direction of the reference vector (the counterclockwise direction within 180 degrees). Therefore, if the cross product of the reference vector and the key point vector is negative, the included angle between the two is a first included angle determined based on a vector included angle formula. If the cross product of the reference vector and the key point vector is positive, the included angle between the two is 360 degrees minus the first included angle determined based on the vector included angle formula.
[0108] After the included angle between the CP vector and the CS vector is calculated, the key points in the target array are sorted based on the order of the included angles from small to large. After sorting, the key points are connected according to the sorting order, and the wall splicing shape corresponding to the target wall object is determined. It should be noted that the reference point P is also traversed as a key point in the target array. When the reference point P is traversed, the CP vector and the CS vector coincide, and the included angle between the two vectors is 0.
[0109] It should be noted that the key point sorting in the embodiments of the present application is performed in a normal coordinate system. Similarly, after the wall splicing shape is determined, it is drawn in the normal coordinate system.
[0110] In the above embodiment, after the first group of splicing points on the starting point side of the target wall object and the second group of splicing points on the terminal point side are determined, the splicing points, the starting point and the terminal point corresponding to the starting point side and the terminal point side are added to the target array to determine the key points corresponding to the target array. Then, the key points are sorted, and the key points are connected based on the sorting. The wall splicing shape corresponding to the target wall object is determined. The best splicing points are selected to process the splicing requirements of various wall thicknesses and angles, and high-quality wall splicing is achieved in various complex situations.
[0111] In another optional embodiment of this application, it is necessary to consider the case where the first or second array on the starting side is empty, and the third or fourth array on the ending side is empty. On the starting side of the target wall object, if the first array is empty, it indicates that there is no left-side adjacent wall object on the starting side. In this case, the first arc wall object with the largest angle to the target wall object can be selected from at least one right-side adjacent wall object and added to the first array. Similarly, if the second array is empty, it indicates that there is no right-side adjacent wall object on the starting side. In this case, the first arc wall object with the largest angle to the target wall object can be selected from at least one left-side adjacent wall object and added to the second array.
[0112] It's important to note that when the first array is empty, if there is only one right-side neighboring object, that object also serves as the left-side neighboring object. Similarly, when the second array is empty, if there is only one left-side neighboring object, that object also serves as the right-side neighboring object. The situations for the third and fourth arrays on the endpoint side are similar to those for the first and second arrays, and will not be elaborated upon further.
[0113] For example, such as Figure 6 As shown, the target wall object in the form of a straight wall has only one adjacent wall on the starting side, and this adjacent wall is an arc wall object, which is in both the first and second arrays. First, it is treated as an arc wall object in the second array. The second array is traversed, and suitable arc contours are placed into `rightContour`. `rightContour` can be seen as a set of contours to be joined with the right side of the target wall object. When searching for a suitable arc contour, it is determined whether `topCenter` is to the left or right of the line (start, p). Here, `topCenter` is the midpoint of the arc centerline corresponding to the arc wall object, and the line determined by the starting point and point P is parallel to the unit vector. Figure 6 In the scenario shown, topCenter is to the right of the straight line determined by the starting point and point P. The left contour of the curved wall object is its outer contour, and the left contour of the curved wall object is placed in rightContour. Regarding the positional relationship between the straight line determined by the starting point and point P and topCenter, if topCenter is to the right of the straight line, moving it to the right will result in the inner contour, and moving it to the left will result in the outer contour. Therefore, the suitable contour found is the left contour of the curved wall object.
[0114] Then the arc wall object is processed as an arc wall object in the first array, the first array is traversed, and appropriate arc contours are put into leftContour, which can be regarded as a contour set ready to be spliced with the left wall edge of the target wall object. In finding appropriate arc contours, it is judged whether topCenter is on the left side or the right side of the straight line (start, p). In the case shown in FIG. 8, topCenter is on the right side of the straight line determined based on the start point and point P, the right contour of the arc wall object is the inner contour of the arc wall object, and the right contour of the arc wall object is put into leftContour. Figure 6
[0115] For the special case that the array is empty, a maximum angle neighbor wall supplement processing mechanism is introduced, which improves the robustness of the algorithm and can ensure accurate and reasonable splicing of the wall object.
[0116] The implementation scheme for determining the wall splicing shape of the target wall object will be introduced below through a specific implementation process, as shown in FIG. 9, which includes the following steps: Figure 7
[0117] Step 701: Identify the number of wall objects corresponding to the start point side of the target wall object in straight wall form. If the number is equal to 1, execute step 702, and if the number is greater than 1, execute step 703.
[0118] Step 702: Add the wall contour point to the target array, which stores the start point and end point of the target wall object, and then execute step 709.
[0119] Step 703: Classify the arc wall objects associated with the target wall object start point side into left and right walls, and store the arc wall objects on the left side of the target wall object in leftWalls and the arc wall objects on the right side of the target wall object in rightWalls.
[0120] It should be noted that if leftWalls or rightWalls is empty, the neighbor wall with the largest angle is selected as a supplement.
[0121] Step 704: Determine leftcontour storing arc contours based on the arc wall objects in leftWalls and rightcontour storing arc contours based on the arc wall objects in rightWalls.
[0122] Step 705: Select target arc contours for splicing with the left wall edge of the target wall object in leftcontour and target arc contours for splicing with the right wall edge of the target wall object in rightcontour.
[0123] Step 706, determining the splicing point associated with the starting point based on the intersection of the circle where the target arc-shaped contour is located and the straight line where the wall edge of the target wall object is located.
[0124] Step 707, adding the splicing point to a target array, and the target array stores the starting point and the ending point of the target wall object.
[0125] Step 708, repeating the same process on the ending point side of the target wall object.
[0126] Step 709, sorting the key points in the target array to determine the wall splicing shape corresponding to the target wall object.
[0127] In the above implementation process, the algorithm applied has high adaptability, can automatically process complex straight wall and arc wall joint conditions, meet the splicing requirements of various wall thicknesses and angles, realize the splicing of different thickness walls, achieve the seamless splicing effect in vision, and can greatly improve the design efficiency.
[0128] The above is the introduction of the wall object splicing method provided by the embodiments of the present application. In the above scheme, the spatial relationship of the adjacent walls is accurately judged by using unit vector and angle calculation; the comparison method based on the contour is used to avoid the errors that may be caused by simple wall line comparison; the special case processing mechanism is introduced to improve the robustness of the algorithm; the rationality and smoothness of the splicing points are ensured through multiple screening and optimization; and the correctness and integrity of the wall shape are ensured by sorting the key points in a clockwise direction.
[0129] Further, while realizing the seamless connection of straight walls and arc walls, an efficient and accurate wall processing scheme is provided, the building design and construction efficiency is improved, and the accuracy and usability of the building model are enhanced.
[0130] The embodiments of the present application also provide a wall object splicing device, as shown in the accompanying drawings. Figure 8 The device comprises:
[0131] The acquisition module 801 is configured to acquire M first arc wall objects associated with the starting point of a target wall object and N second arc wall objects associated with the ending point of the target wall object, the target wall object is a straight wall object, and M and N are both integers greater than or equal to 1.
[0132] The first determination module 802 is configured to determine a first target arc-shaped contour and a second target arc-shaped contour that match the left and right wall edges on the starting point side of the target wall object from the M first arc wall objects, and determine a third target arc-shaped contour and a fourth target arc-shaped contour that match the left and right wall edges on the ending point side of the target wall object from the N second arc wall objects.
[0133] The second determining module 803 is configured to determine a first set of splicing points associated with the starting point according to intersection of the first target arc-shaped contour, the second target arc-shaped contour and left and right wall edges on the starting point side of the target wall object, and determine a second set of splicing points associated with the ending point according to intersection of the third target arc-shaped contour, the fourth target arc-shaped contour and left and right wall edges on the ending point side of the target wall object.
[0134] The third determining module 804 is configured to determine a wall splicing shape corresponding to splicing of the target wall object and an arc wall object according to the first set of splicing points, the second set of splicing points, the starting point and the ending point.
[0135] Optionally, the first target arc-shaped contour is located in a first array, and the second target arc-shaped contour is located in a second array. On the starting point side of the target wall object, the first array stores a first arc wall object on the left side, and the second array stores a first arc wall object on the right side. The first array and the second array are divided based on a first unit vector corresponding to the first arc wall object. The first unit vector is a unit vector corresponding to a tangent vector with a smaller included angle between the first target vector and two tangent vectors corresponding to the first arc wall object at the starting point. The first target vector is determined based on the starting point and an arc center point of the first arc wall object.
[0136] The third target arc-shaped contour is located in a third array, and the fourth target arc-shaped contour is located in a fourth array. On the ending point side of the target wall object, the third array stores a second arc wall object on the left side, and the fourth array stores a second arc wall object on the right side. The third array and the fourth array are divided based on a second unit vector corresponding to the second arc wall object. The second unit vector is a unit vector corresponding to a tangent vector with a smaller included angle between the second target vector and two tangent vectors corresponding to the second arc wall object at the ending point. The second target vector is determined based on the ending point and an arc center point of the second arc wall object.
[0137] Optionally, the first determining module includes:
[0138] The first processing submodule is configured to perform left and right wall classification on the M first arc wall objects based on a first vector and a first unit vector corresponding to the first arc wall object, determine a first array and a second array, and determine a first target arc-shaped contour matching a left wall edge on the starting point side of the target wall object in the first array and a second target arc-shaped contour matching a right wall edge on the starting point side of the target wall object in the second array.
[0139] the second processing submodule is configured to perform left and right wall classification on the N second arc wall objects based on the second vector and a second unit vector corresponding to the second arc wall object, determine a third array and a fourth array, and determine a third target arc-shaped contour matching a left wall side of a terminal side of the target wall object in the third array and a fourth target arc-shaped contour matching a right wall side of the terminal side of the target wall object in the fourth array;
[0140] The first vector is a vector from the starting point to the terminal point, and the second vector is a vector from the terminal point to the starting point.
[0141] Optionally, the first processing submodule comprises:
[0142] The first identification and classification unit is configured to, for each first arc wall object, identify a position relationship between the first arc wall object and the target wall object and perform left and right wall classification based on a cross multiplication result of the first vector and a first unit vector corresponding to the first arc wall object, to determine the first array and the second array.
[0143] The first determination unit is configured to, among the first arc wall objects in the first array, determine a first arc-shaped contour adjacent to a left wall side of a starting side of the target wall object, and determine a first target arc-shaped contour closest to the left wall side of the starting side of the target wall object based on included angle information between the first unit vector corresponding to the first arc-shaped contour and the first vector.
[0144] The second determination unit is configured to, among the first arc wall objects in the second array, determine a first arc-shaped contour adjacent to a right wall side of the starting side of the target wall object, and determine a second target arc-shaped contour closest to the right wall side of the starting side of the target wall object based on included angle information between the first unit vector corresponding to the first arc-shaped contour and the first vector.
[0145] Optionally, the second processing submodule comprises:
[0146] The second identification and classification unit is configured to, for each second arc wall object, identify a position relationship between the second arc wall object and the target wall object and perform left and right wall classification based on a cross multiplication result of the second vector and a second unit vector corresponding to the second arc wall object, to determine the third array and the fourth array.
[0147] The third determination unit is configured to, among the second arc wall objects in the third array, determine a second arc-shaped contour adjacent to a left wall side of a terminal side of the target wall object, and determine a third target arc-shaped contour closest to the left wall side of the terminal side of the target wall object based on included angle information between the second unit vector corresponding to the second arc-shaped contour and the second vector.
[0148] a fourth determining unit, configured to determine, in each second arc wall object in the fourth array, a second arc profile adjacent to a right wall edge on a terminal side of the target wall object, and determine a fourth target arc profile closest to the right wall edge on the terminal side of the target wall object based on included angle information between a second unit vector corresponding to the second arc profile and the second vector.
[0149] Optionally, the second determining module comprises:
[0150] a first determining sub-module, configured to determine a first set of splicing points associated with the starting point based on intersection of a first circle in which the first target arc profile is located and a straight line in which a left wall edge on the starting side of the target wall object is located, and intersection of a second circle in which the second target arc profile is located and a straight line in which a right wall edge on the starting side of the target wall object is located.
[0151] a second determining sub-module, configured to determine a second set of splicing points associated with the terminal point based on intersection of a third circle in which the third target arc profile is located and a straight line in which a left wall edge on the terminal side of the target wall object is located, and intersection of a fourth circle in which the fourth target arc profile is located and a straight line in which a right wall edge on the terminal side of the target wall object is located.
[0152] Optionally, the first determining sub-module comprises:
[0153] a recognizing unit, configured to recognize a first intersection point of the first circle and an associated straight line, and a second intersection point of the second circle and an associated straight line.
[0154] a first processing unit, configured to determine a splicing point corresponding to the left wall edge on the starting side of the target wall object according to a number of the first intersection points, and determine a splicing point corresponding to the right wall edge on the starting side of the target wall object according to a number of the second intersection points.
[0155] a second processing unit, configured to determine the first set of splicing points according to the splicing point corresponding to the left wall edge on the starting side of the target wall object and the splicing point corresponding to the right wall edge on the starting side of the target wall object.
[0156] Optionally, the first processing unit is further configured to:
[0157] if the number of the first intersection points is 0, determine a profile point corresponding to the left wall edge on the starting side of the target wall object as the splicing point;
[0158] if the number of the first intersection points is 1, determine the first intersection point as the splicing point.
[0159] If the number of the first intersection points is 2, the first intersection point closest to the start point is determined as the splicing point, or, in response to the distances between the two first intersection points and the start point being equal, the included angle between the two intersection point vectors corresponding to the two first intersection points and the first unit vector corresponding to the first target arc-shaped contour is calculated, and the first intersection point corresponding to the intersection point vector with the smaller included angle is determined as the splicing point;
[0160] The intersection point vector is determined based on the start point and the first intersection point.
[0161] Optionally, the third determining module comprises:
[0162] The storage sub-module is configured to store the first group of splicing points, the second group of splicing points, the start point and the end point as key points in a target array.
[0163] The third determining sub-module is configured to determine a target center point based on the midpoint of the start point and the end point.
[0164] The selection determining sub-module is configured to select a key point in the target array as a reference point, and determine a reference vector based on the target center point and the reference point.
[0165] The fourth determining sub-module is configured to determine a key point vector based on the target center point and the key point in the target array.
[0166] The sorting determining sub-module is configured to sort the key points in the target array in ascending order of the included angle between the reference vector and the key point vector, and determine a wall splicing shape corresponding to the target wall object.
[0167] If the cross product of the reference vector and the key point vector is positive, the included angle between the reference vector and the key point vector is 360 minus the included angle determined based on the vector included angle formula, and if the cross product of the reference vector and the key point vector is negative, the included angle between the reference vector and the key point vector is the included angle determined based on the vector included angle formula.
[0168] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the related parts refer to the part of the method embodiment.
[0169] The embodiment of the application further provides an electronic device, which comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program is executed by the processor to implement each process of the wall object splicing method embodiment and achieve the same technical effects. To avoid repetition, details are not described here.
[0170] For example,Figure 9 A schematic diagram of the physical structure of an electronic device is shown. (For example...) Figure 9 As shown, the electronic device may include a processor 910, a communication interface 920, a memory 930, and a communication bus 940. The processor 910, communication interface 920, and memory 930 communicate with each other via the communication bus 940. The processor 910 can call logical instructions from the memory 930. The processor 910 is used to execute various processes of the wall object splicing method according to the embodiments of this application, which will not be described in detail here.
[0171] Furthermore, the logical instructions in the aforementioned memory 930 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0172] This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described wall object splicing method embodiments and achieves the same technical effects. To avoid repetition, it will not be described again here. The computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0173] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0174] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal (which can be a mobile phone, computer, server, air conditioner, or network device) execute the method described in each embodiment of the present application.
[0175] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative, not restrictive. Those skilled in the art can make many forms without departing from the purpose of the present application and the scope protected by the claims under the guidance of the present application, which all belong to the protection of the present application.
[0176] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the embodiments of the present application can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solutions. Those skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0177] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-mentioned system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0178] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method of wall object splicing, characterized by, The method comprises: obtaining M first arc wall objects associated with a starting point of a target wall object and N second arc wall objects associated with an ending point, the target wall object being a straight wall object, and M and N are both integers greater than or equal to 1; determining, among the M first arc wall objects, a first target arc profile and a second target arc profile matching the left and right wall edges on the starting point side of the target wall object, and determining, among the N second arc wall objects, a third target arc profile and a fourth target arc profile matching the left and right wall edges on the ending point side of the target wall object, the first target arc profile and the second target arc profile being the arc profiles closest to the left wall edge and the right wall edge on the starting point side of the target wall object respectively, and the third target arc profile and the fourth target arc profile being the arc profiles closest to the left wall edge and the right wall edge on the ending point side of the target wall object respectively; determining a first set of splicing points associated with the starting point according to the intersection of the first target arc profile, the second target arc profile, the left wall edge and the right wall edge on the starting point side of the target wall object, and determining a second set of splicing points associated with the ending point according to the intersection of the third target arc profile, the fourth target arc profile, the left wall edge and the right wall edge on the ending point side of the target wall object; determining a wall splicing shape corresponding to the splicing of the target wall object and the arc wall object according to the first set of splicing points, the second set of splicing points, the starting point and the ending point.
2. The method of claim 1, wherein, In the method, the first target arc profile is located in a first array, and the second target arc profile is located in a second array, the first array stores the first arc wall objects on the left side on the starting point side of the target wall object, and the second array stores the first arc wall objects on the right side, the first array and the second array are divided based on a first unit vector corresponding to the first arc wall object, the first unit vector is a unit vector corresponding to a tangent vector with a smaller included angle between a first target vector and the tangent vector of the two tangent vectors corresponding to the first arc wall object at the starting point, and the first target vector is determined based on the starting point and an arc center point of the first arc wall object; the third target arc profile is located in a third array, and the fourth target arc profile is located in a fourth array, the third array stores the second arc wall objects on the left side on the ending point side of the target wall object, and the fourth array stores the second arc wall objects on the right side, the third array and the fourth array are divided based on a second unit vector corresponding to the second arc wall object, the second unit vector is a unit vector corresponding to a tangent vector with a smaller included angle between a second target vector and the tangent vector of the two tangent vectors corresponding to the second arc wall object at the ending point, and the second target vector is determined based on the ending point and an arc center point of the second arc wall object.
3. The method of claim 2, wherein, The determining, in the M first arc wall objects, a first target arc-shaped contour and a second target arc-shaped contour matched with left and right wall edges of a start point side of the target wall object, and determining, in the N second arc wall objects, a third target arc-shaped contour and a fourth target arc-shaped contour matched with left and right wall edges of an end point side of the target wall object, comprises: Based on a first vector and a first unit vector corresponding to the first arc wall object, left and right wall bodies of the M first arc wall objects are classified, the first array and the second array are determined, and in the first array, a first target arc-shaped contour matched with a left wall edge of a start point side of the target wall object is determined, and in the second array, a second target arc-shaped contour matched with a right wall edge of the start point side of the target wall object is determined; Based on a second vector and a second unit vector corresponding to the second arc wall object, left and right wall bodies of the N second arc wall objects are classified, the third array and the fourth array are determined, and in the third array, a third target arc-shaped contour matched with a left wall edge of an end point side of the target wall object is determined, and in the fourth array, a fourth target arc-shaped contour matched with a right wall edge of the end point side of the target wall object is determined; Wherein, the first vector is a vector from the start point to the end point, and the second vector is a vector from the end point to the start point.
4. The method of claim 3, wherein, The first array and the second array are determined by classifying left and right wall bodies of the M first arc wall objects based on a first vector and a first unit vector corresponding to the first arc wall object, and in the first array, a first target arc-shaped contour matched with a left wall edge of a start point side of the target wall object is determined, and in the second array, a second target arc-shaped contour matched with a right wall edge of the start point side of the target wall object is determined, comprising: For each first arc wall object, the positional relationship between the first arc wall object and the target wall object is identified, and left and right wall classification is performed according to the cross multiplication operation result of the first vector and the first unit vector corresponding to the first arc wall object, so as to determine the first array and the second array; In each first arc wall object of the first array, a first arc-shaped contour adjacent to a left wall edge of a start point side of the target wall object is determined, and the first target arc-shaped contour is determined based on the included angle information between the first unit vector corresponding to the first arc-shaped contour and the first vector; In each first arc wall object of the second array, a first arc-shaped contour adjacent to a right wall edge of a start point side of the target wall object is determined, and the second target arc-shaped contour is determined based on the included angle information between the first unit vector corresponding to the first arc-shaped contour and the first vector.
5. The method of claim 3, wherein, The third array and the fourth array are determined by classifying left and right wall bodies of the N second arc wall objects based on a second vector and a second unit vector corresponding to the second arc wall object, and in the third array, a third target arc-shaped contour matched with a left wall edge of an end point side of the target wall object is determined, and in the fourth array, a fourth target arc-shaped contour matched with a right wall edge of the end point side of the target wall object is determined, comprising: For each second arc wall object, a position relationship between the second arc wall object and the target wall object is identified, left and right wall classification is performed, the third array and the fourth array are determined according to a cross multiplication operation result of the second vector and a second unit vector corresponding to the second arc wall object; In each second arc wall object of the third array, a second arc contour adjacent to a left wall edge of the target wall object end side is determined, and the third target arc contour is determined based on angle information between a second unit vector corresponding to the second arc contour and the second vector; In each second arc wall object of the fourth array, a second arc contour adjacent to a right wall edge of the target wall object end side is determined, and the fourth target arc contour is determined based on angle information between a second unit vector corresponding to the second arc contour and the second vector.
6. The method of claim 2, wherein, The first group of splicing points associated with the start point is determined according to intersection conditions of the first target arc contour, the second target arc contour and left and right wall edges of the start point side of the target wall object, and the second group of splicing points associated with the end point is determined according to intersection conditions of the third target arc contour, the fourth target arc contour and left and right wall edges of the end point side of the target wall object, including: The first group of splicing points associated with the start point is determined based on intersection conditions of a first circle in which the first target arc contour is located and a straight line in which the left wall edge of the start point side of the target wall object is located, and intersection conditions of a second circle in which the second target arc contour is located and a straight line in which the right wall edge of the start point side of the target wall object is located. The second group of splicing points associated with the end point is determined based on intersection conditions of a third circle in which the third target arc contour is located and a straight line in which the left wall edge of the end point side of the target wall object is located, and intersection conditions of a fourth circle in which the fourth target arc contour is located and a straight line in which the right wall edge of the end point side of the target wall object is located.
7. The method of claim 6, wherein, The first group of splicing points associated with the start point is determined based on intersection conditions of a first circle in which the first target arc contour is located and a straight line in which the left wall edge of the start point side of the target wall object is located, and intersection conditions of a second circle in which the second target arc contour is located and a straight line in which the right wall edge of the start point side of the target wall object is located, including: First intersection points of the first circle and the associated straight line and second intersection points of the second circle and the associated straight line are identified; A splicing point corresponding to the left wall edge of the start point side of the target wall object is determined according to a number of the first intersection points, and a splicing point corresponding to the right wall edge of the start point side of the target wall object is determined according to a number of the second intersection points; The first group of splicing points is determined according to the splicing point corresponding to the left wall edge of the start point side of the target wall object and the splicing point corresponding to the right wall edge of the start point side of the target wall object.
8. The method of claim 7, wherein, The splicing point corresponding to the left wall edge of the start point side of the target wall object is determined according to the number of the first intersection points, including: If the number of the first intersection points is 0, a contour point corresponding to the left wall edge of the start point side of the target wall object is determined as a splicing point; If the number of the first intersection points is 1, the first intersection point is determined as a splicing point; If the number of the first intersection points is 2, the first intersection point closest to the start point is determined as the splicing point, or, in response to the distances between the two first intersection points and the start point being equal, the included angle between the two intersection point vectors corresponding to the two first intersection points and the first unit vector corresponding to the first target arc-shaped contour is calculated, and the first intersection point corresponding to the intersection point vector with the smaller included angle is determined as the splicing point; The intersection point vector is determined based on the start point and the first intersection point.
9. The method according to any one of claims 1 to 8, characterized in that, The wall splicing shape corresponding to the target wall object is determined according to the first group of splicing points, the second group of splicing points, the start point and the end point, including: The first group of splicing points, the second group of splicing points, the start point and the end point are stored as key points in a target array; A target center point is determined based on the midpoint of the start point and the end point; A key point in the target array is selected as a reference point, and a reference vector is determined according to the target center point and the reference point; A key point vector is determined according to the target center point and the key point in the target array; The key points in the target array are sorted in the order of the included angle between the reference vector and the key point vector from small to large, and the wall splicing shape corresponding to the target wall object is determined; If the cross product of the reference vector and the key point vector is positive, the included angle between the reference vector and the key point vector is 360 minus the included angle determined based on the vector included angle formula, and if the cross product of the reference vector and the key point vector is negative, the included angle between the reference vector and the key point vector is the included angle determined based on the vector included angle formula.
10. A wall object splicing device, characterized by including: The acquisition module is configured to acquire M first arc wall objects associated with a start point of a target wall object and N second arc wall objects associated with an end point, the target wall object being a straight wall object, and M and N being integers greater than or equal to 1; The first determination module is configured to determine, in the M first arc wall objects, a first target arc-shaped contour and a second target arc-shaped contour matching left and right wall edges on the start point side of the target wall object, and determine, in the N second arc wall objects, a third target arc-shaped contour and a fourth target arc-shaped contour matching left and right wall edges on the end point side of the target wall object, the first target arc-shaped contour and the second target arc-shaped contour being arc-shaped contours closest to the left wall edge and the right wall edge on the start point side of the target wall object, and the third target arc-shaped contour and the fourth target arc-shaped contour being arc-shaped contours closest to the left wall edge and the right wall edge on the end point side of the target wall object; The second determination module is configured to determine a first group of splicing points associated with the start point according to the intersection of the first target arc-shaped contour, the second target arc-shaped contour and the left wall edge and the right wall edge on the start point side of the target wall object, and determine a second group of splicing points associated with the end point according to the intersection of the third target arc-shaped contour, the fourth target arc-shaped contour and the left wall edge and the right wall edge on the end point side of the target wall object. A third determining module is configured to determine a wall body splicing shape corresponding to splicing of the target wall body object and an arc wall object according to the first set of splicing points, the second set of splicing points, the start point and the end point.
11. An electronic device, comprising: A computer program product comprising a processor, a memory, and a computer program stored on the memory and loadable on the processor, the computer program being executable by the processor to implement the steps of the wall body splicing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Building wall drawing method
CN113656871A