Rapid attachment method, apparatus and device, and storage medium

By acquiring and projecting the ordered boundaries of the target shell to determine the coverage relationship, constructing the resulting attachment and merging it, it solves the problem of low efficiency in close fitting of components in architectural design software, realizes automatic attachment, and improves design efficiency.

CN118568809APending Publication Date: 2024-08-30GLODON CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310214395.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In architectural design software, designers need to manually edit the components of the building model to achieve tight fit, resulting in low design efficiency. There is a lack of automatic attachment or linking methods to improve the efficiency of 3D model design.

Method used

By obtaining the positional relationship between the target attachment and the target shell, projecting the ordered boundary of the target shell to determine the coverage relationship, and constructing the result attachment based on the coverage relationship, the automatic merger of the target attachment and the target shell is realized, and the attachment and the target are automatically realized Attachment of shell.

Benefits of technology

It improves the accuracy of automatic attachment results, reduces the need for manual editing by designers, and improves the efficiency of 3D model design.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568809A
    Figure CN118568809A
Patent Text Reader

Abstract

The invention relates to a quick attachment method and device, equipment and a storage medium, and particularly relates to the technical field of computer vision. The method comprises the following steps: acquiring a target attachment and a target shell; when the position relationship between the target attachment body and the target shell meets the attachment condition, projecting the ordered boundary of the target shell on the attachment surface of the target attachment body according to the attachment direction to obtain a projection polygon; according to the relationship between the projection polygon and the attachment surface, determining the coverage relationship between the target attachment body and the target shell; constructing a result attachment according to a coverage relation between the target attachment and the target shell and a coverage part of the target attachment by the target shell; and combining the result attachment with the target attachment to obtain an attachment result. According to the scheme, a designer does not need to manually adjust and edit redundant parts, and the accuracy of an automatic attachment result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional models, and in particular to a rapid attachment method, device, equipment and storage medium. Background Art

[0002] In architectural design software, in order to design a complete building model, designers are often required to manually draw all the components of the building model on the computer, such as walls, beams, columns, roofs and other basic elements that constitute the building.

[0003] In order to improve the design efficiency of designers and enhance the friendliness of design software, architectural design software should allow designers to input only partial models of component models such as walls, beams, columns, etc., and allow the models to automatically extend in a specified direction or automatically stretch according to certain rules to generate new component objects that fit closely with the target component model, without the need for designers to manually edit and generate target components that fit closely or are connected to the target structure, thereby improving the work efficiency of using the architectural design software for three-dimensional model design.

[0004] Therefore, there is an urgent need for a method that can automatically attach or link to a target component model according to certain rules and specified directions. Summary of the invention

[0005] The present application provides a rapid attachment method, device, computer equipment and storage medium, which improve the accuracy of automatic attachment results. The technical solution is as follows.

[0006] In one aspect, a rapid attachment method is provided, the method comprising:

[0007] Get the target attachment body and target shell;

[0008] When the positional relationship between the target attachment body and the target shell satisfies the attachment condition, projecting the ordered boundary of the target shell onto the attachment surface of the target attachment body according to the attachment direction to obtain a projection polygon;

[0009] Determining a covering relationship between the target attachment body and the target shell according to a relationship between the projection polygon and the attachment surface;

[0010] Constructing a result attachment body according to the covering relationship between the target attachment body and the target shell, and the covering part of the target shell on the target attachment body;

[0011] The result attachment body is combined with the target attachment body to obtain an attachment result.

[0012] In another aspect, a quick attachment device is provided, the device comprising:

[0013] A data acquisition module, used for acquiring a target attachment body and a target shell;

[0014] A projection module, configured to project the ordered boundary of the target shell onto the attachment surface of the target attachment body according to the attachment direction to obtain a projection polygon when the positional relationship between the target attachment body and the target shell satisfies the attachment condition;

[0015] A covering relationship determination module, used to determine the covering relationship between the target attachment body and the target shell according to the relationship between the projection polygon and the attachment surface;

[0016] An attachment body construction module, used for constructing a result attachment body according to the covering relationship between the target attachment body and the target shell, and the covering part of the target shell on the target attachment body;

[0017] A merging module is used to merge the result attachment body with the target attachment body to obtain an attachment result.

[0018] In a possible implementation manner, the covering relationship includes one of: the target surface completely covers the attachment surface, the attachment surface completely covers the target surface, and the target surface partially covers the attachment surface;

[0019] The coverage relationship determination module is further used to:

[0020] Projecting the target attachment body according to the attachment direction to obtain an attachment surface polygon;

[0021] When the projection polygon includes an attachment surface polygon, the coverage relationship is that the target surface fully covers the attachment surface;

[0022] When the attachment surface polygon includes the projection polygon, the covering relationship is that the attachment surface covers the target surface;

[0023] When the projection polygon intersects with the attachment surface polygon, the covering relationship is that the target surface partially covers the attachment surface.

[0024] In a possible implementation, the attachment body construction module is further used to, when the covering relationship is that the target surface completely covers the attachment surface, extend the target attachment body to the auxiliary plane to obtain a first attachment body;

[0025] The first attachment body is cut through the target shell to construct the resulting attachment body.

[0026] In a possible implementation, the attachment body construction module is further configured to generate a stretched body of the projected polygon on the attachment surface as a result attachment body when the covering relationship is that the attachment surface covers the target surface.

[0027] In a possible implementation, the attachment body construction module is further used to determine a covering polygon between the target shell and the target attachment body when the covering relationship is that the target surface partially covers the attachment surface;

[0028] Projecting the covering polygon according to the attachment direction to obtain a second attachment body;

[0029] The second attachment body is cut through the target shell to construct the resulting attachment body.

[0030] In a possible implementation manner, the device further includes:

[0031] A product calculation module, used to calculate the product of the normal of the attachment surface and the attachment direction;

[0032] The attachment condition determination module is used to determine that the positional relationship between the target attachment body and the target shell meets the attachment condition when the multiplication result is greater than the attachment threshold.

[0033] In a possible implementation, the attachment condition determination module is further configured to:

[0034] When the product result is greater than the attachment threshold, obtaining a bounding box of the target shell according to the boundary coordinates of the target shell;

[0035] When the bounding box does not intersect the target attachment body, it is determined that the positional relationship between the target attachment body and the target shell satisfies the attachment result.

[0036] On the other hand, a computer device is provided. The computer device includes a processor and a memory. The memory stores at least one instruction. The at least one instruction is loaded and executed by the processor to implement the above-mentioned fast attachment method.

[0037] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned fast attachment method.

[0038] In another aspect, a computer program product or a computer program is provided, wherein the computer program product or the computer program comprises computer instructions, wherein the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned fast attachment method.

[0039] The technical solution provided by this application may have the following beneficial effects:

[0040] In the present application, the computer device first determines the target attachment body and the target shell to which the attachment body needs to be attached, and determines whether the attachment conditions are met. If so, the ordered boundary of the target shell is projected on the target attachment surface according to the attachment direction, and a projection polygon is obtained to indicate the covering relationship between the attachment body and the target shell. The computer device then constructs a new result attachment body according to the covering relationship as the newly added part of the attachment body attached to the target shell. Finally, the computer device merges the result attachment body with the target attachment body to obtain the attachment result. The above scheme automatically realizes the automatic attachment of the attachment body and the target shell, and takes into account the covering relationship between the attachment body and the target shell. The designer does not need to manually adjust and edit the redundant parts, thereby improving the accuracy of the automatic attachment result. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0042] Figure 1 The diagram is a schematic diagram showing the structure of a computer system according to an exemplary embodiment.

[0043] Figure 2 The figure is a flow chart showing a fast attachment method according to an exemplary embodiment.

[0044] Figure 3 The figure is a flow chart showing a fast attachment method according to an exemplary embodiment.

[0045] Figure 4 A schematic diagram of a target attachment body and a target shell involved in an embodiment of the present application is shown.

[0046] Figure 5 A schematic diagram of the initial state of an attachment body and a target shell involved in an embodiment of the present application is shown.

[0047] Figure 6 A schematic diagram of an ordered boundary search of a target shell involved in an embodiment of the present application is shown.

[0048] Figure 7 A schematic diagram of a coverage relationship involved in an embodiment of the present application is shown.

[0049] Figure 8 A schematic diagram of a result attachment body in which a target surface fully covers an attachment surface according to an embodiment of the present application is shown.

[0050] Fig. 9A schematic diagram of attachment stretching judgment involved in an embodiment of the present application is shown.

[0051] Fig.10 A schematic diagram of a resultant attachment body in which an attachment surface fully covers a target surface according to an embodiment of the present application is shown.

[0052] Fig.11 A schematic diagram of a result attachment body in which a target surface partially covers an attachment surface according to an embodiment of the present application is shown.

[0053] Fig.12 A schematic diagram of line-surface merging involved in an embodiment of the present application is shown.

[0054] Fig.13 is a structural block diagram of a quick attachment device according to an exemplary embodiment Fig.14 A structural block diagram of a computer device shown in an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0055] The technical solution of the present application will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0056] It should be understood that the "indication" mentioned in the embodiments of the present application can be a direct indication, an indirect indication, or an indication of an association relationship. For example, A indicates B, which can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association relationship between A and B.

[0057] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between two items, or an association relationship between the two items, or a relationship between indication and being indicated, configuration and being configured, and the like.

[0058] In an embodiment of the present application, "predefinition" can be achieved by pre-saving corresponding codes, tables or other methods that can be used to indicate relevant information in a device (for example, including a terminal device and a network device). The present application does not limit its specific implementation method.

[0059] Figure 1 1 is a schematic diagram showing the structure of a computer system according to an exemplary embodiment. The system includes a terminal device 110. The terminal device 110 may include a data processing device and a data storage module.

[0060] Optionally, the terminal device 110 also includes a command input component, such as a mouse, a keyboard, a touch screen, etc. ( Figure 1 (not shown), after receiving the specified instruction input by the user, the instruction input component can input the corresponding data on the terminal device. For example, when the terminal device is installed with 3D model generation software, the user can input the corresponding instruction to the terminal device through the instruction input component to control the 3D model generation software to build the corresponding 3D model.

[0061] Optionally, the terminal device may also receive a 3D model file sent by other devices, and open the 3D model file through the 3D model generation software, so that the 3D model therein may be browsed and edited through the 3D model generation software.

[0062] Among them, the above-mentioned other devices can be other terminals or servers corresponding to the three-dimensional model generation software. At this time, the terminal device 110 can download the three-dimensional model file as a template from the server corresponding to the three-dimensional model generation software, and the user can design the three-dimensional model based on the template file downloaded to the terminal device 110.

[0063] Optionally, in the three-dimensional model generation software involved in the present application, the user can perform various operations on one of the three-dimensional models, such as zooming in, zooming out, translating, etc.; when the user zooms in or translates the three-dimensional model around other three-dimensional models, the three-dimensional model generation software can automatically identify whether the two models need to be attached. If they can be attached, the two models will be spliced ​​into a new three-dimensional model by attachment to achieve fast operation of the three-dimensional model.

[0064] Optionally, the above-mentioned server can be a server cluster or a distributed system composed of multiple physical servers, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms and other technical computing services.

[0065] Optionally, the system may further include a management device, which is used to manage the system (such as managing the connection status between each module and the server, etc.), and the management device is connected to the server via a communication network. Optionally, the communication network is a wired network or a wireless network.

[0066] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any other network, including but not limited to any combination of local area network, metropolitan area network, wide area network, mobile, limited or wireless network, private network or virtual private network. In some embodiments, the technology and / or format including hypertext markup language, extensible markup language, etc. are used to represent the data exchanged through the network. In addition, conventional encryption technologies such as secure socket layer, transport layer security, virtual private network, Internet protocol security, etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above-mentioned data communication technology.

[0067] Figure 2 is a flowchart of a fast attachment method according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 The terminal device 110 shown in FIG. Figure 2 As shown, the rapid attachment method may include the following steps:

[0068] Step 201, obtaining a target attachment body and a target shell.

[0069] Optionally, in an embodiment of the present application, the target attachment body is a three-dimensional model object in a three-dimensional model file opened by a computer device; the target attachment surface can be a surface of other three-dimensional model objects in the three-dimensional model file (such as a wall), or a three-dimensional model composed of several surfaces (such as a roof).

[0070] There are various attachment surfaces on the target attachment body. When the target attachment body needs to be attached to the target shell, the attachment surface can be attached to the target shell.

[0071] Optionally, the attachment surface can also be a reference surface of the three-dimensional model object. For example, when the three-dimensional model object is a sphere, there is no plane on the sphere, so the various cross-sections of the sphere can be used as reference surfaces; for example, when the three-dimensional model object is an irregular object, the computer device can obtain the circumscribed cuboid of the irregular object and use the various faces of the circumscribed cuboid as the reference surfaces of the three-dimensional model object.

[0072] Step 202: When the positional relationship between the target attachment body and the target shell satisfies the attachment condition, the ordered boundary of the target shell is projected onto the attachment surface of the target attachment body according to the attachment direction to obtain a projection polygon.

[0073] Optionally, in an embodiment of the present application, when a movement operation of the target attachment body toward the target shell is received, it is necessary to determine whether the target attachment body and the target shell can be attached. If the attachment conditions are met, the ordered boundary of the target attachment body can be projected onto the target shell according to the attachment direction to obtain a projection polygon.

[0074] Optionally, the attachment direction is the moving direction of the target attachment body toward the target shell.

[0075] Step 203: Determine the covering relationship between the target attachment body and the target attachment surface according to the relationship between the projection polygon and the attachment surface.

[0076] Since the projection polygon is obtained by projecting the target shell onto the attachment surface, the projection polygon can, to a certain extent, characterize the area relationship between the target attachment body and the target shell when it extends to the target shell. The larger the projection polygon, the larger the area covered by the target shell.

[0077] If the projection polygon completely contains the attachment surface, it can indicate that the target attachment body can be completely covered by the target shell when it is attached to the target shell; when the projection polygon is contained in the attachment surface, it indicates that the target attachment body is larger than the target shell, and the target shell can only cover a part of the target attachment body; if the projection polygon partially intersects with the attachment surface, it means that a part of the target shell covers a part of the target attachment body, and the other part is outside the target attachment body.

[0078] Step 204: construct a result attachment body according to the covering relationship between the target attachment body and the target shell, and the covering portion of the target shell on the target attachment body.

[0079] When the covering relationship between the target attachment body and the target shell is determined, the covering part of the target shell on the target attachment body can be extended in the attachment direction until it intersects with the target shell, thereby generating a new result attachment body.

[0080] Step 205: merge the result attachment body with the target attachment body to obtain an attachment result.

[0081] After the result attachment body is obtained, the computer device merges the result attachment body with the target attachment body, for example, merges the colinear part with the coplanar part, so that the result attachment body and the target attachment body are merged into a complete attachment body as the attachment result.

[0082] In summary, in the present application, the computer device first determines the target attachment body and the target shell to which the attachment body needs to be attached, and determines whether the attachment conditions are met. If so, the ordered boundary of the target shell is projected on the target attachment surface according to the attachment direction, and a projection polygon is obtained to indicate the covering relationship between the attachment body and the target shell. The computer device then constructs a new result attachment body according to the covering relationship as the newly added part of the attachment body attached to the target shell. Finally, the computer device merges the result attachment body with the target attachment body to obtain the attachment result. The above scheme automatically realizes the automatic attachment of the attachment body and the target shell, and takes into account the covering relationship between the attachment body and the target shell. The designer does not need to manually adjust and edit the redundant parts, thereby improving the accuracy of the automatic attachment result.

[0083] Figure 3 is a flowchart of a fast attachment method according to an exemplary embodiment. The method is executed by a computer device, which may be Figure 1 The terminal device 110 shown in FIG. Figure 3 As shown, the rapid attachment method may include the following steps:

[0084] Step 301, obtaining a target attachment body and a target shell.

[0085] After the computer acquires the target attachment body and the target shell, an attachment surface on the target attachment body may also be determined so that the target attachment body can subsequently be attached to the target shell through the attachment surface.

[0086] Optionally, the attachment surface may be a side surface on the target attachment body that is closest to the target shell; or the attachment surface may be a side surface among the side surfaces of a circumscribed cuboid of the target attachment body that is closest to the target shell.

[0087] Please refer to Figure 4 , which shows a schematic diagram of a target attachment body and a target shell involved in an embodiment of the present application. Figure 4 As shown, the computer device can display the target attachment body 401 and the target shell 402 in the three-dimensional model generation software, and the user can control the target attachment body 401 to move toward the target shell 402. At this time, the moving direction is the attachment direction of the target attachment body and the target shell.

[0088] Step 302, calculating the product of the normal of the attachment surface and the attachment direction.

[0089] After determining the target attachment surface and the attachment direction between the target attachment body and the target shell, the computer device can determine whether it is necessary to perform an attachment operation on the attachment surface of the attachment body and the target shell. For example, when the attachment direction is determined according to the moving direction of the target attachment body by the user, the computer device can determine whether the product of the attachment direction and the normal of the attachment surface is greater than an attachment threshold. For example, the attachment threshold can be 0.1. If the product result is less than or equal to 0.1, it means that the normal of the attachment surface direction is close to perpendicular to the attachment direction, and attachment is impossible under this attachment direction, and it is directly determined as an attachment failure.

[0090] Step 303: When the multiplication result is greater than the attachment threshold, it is determined that the positional relationship between the target attachment body and the target shell satisfies the attachment condition.

[0091] When the product result is greater than 0.1, it can be roughly considered that attachment is possible in this attachment direction, so the computer device continues to perform the next step of calculation.

[0092] Optionally, when the product result is greater than an attachment threshold, obtaining a bounding box of the target shell according to the boundary coordinates of the target shell;

[0093] When the bounding box does not intersect the target attachment body, it is determined that the positional relationship between the target attachment body and the target attachment surface satisfies the attachment result.

[0094] That is to say, when it is determined that attachment can be achieved under the attachment direction, it is also necessary to determine whether the initial state of the attachment body and the target shell intersect. If the initial state of the attachment body and the target shell intersect, the attachment operation does not need to be performed. Please refer to Figure 5 , which shows a schematic diagram of the initial state of an attachment body and a target shell involved in an embodiment of the present application. Figure 5 As shown, optionally, the computer device can determine the bounding boxes of the target shell and the attached body (that is, the external cuboid), and further determine whether the bounding boxes of the two intersect. If the bounding boxes of the two intersect, it is further determined whether the attached body and all its adjacent faces intersect with the target shell; if there is no intersection (such as Figure 5 501 in ), the target shell and the target attachment body are considered to be non-intersecting in the initial state; if there is an intersection (such as Figure 5 502), the target shell is considered to intersect with the initial state of the attachment body.

[0095] Step 304: when the positional relationship between the target attachment body and the target shell satisfies the attachment condition, the ordered boundary of the target shell is projected onto the attachment surface according to the attachment direction to obtain a projection polygon.

[0096] Please refer to Figure 6 , which shows a schematic diagram of an ordered boundary search of a target shell involved in an embodiment of the present application. Figure 6As shown, the computer device can search for the boundary edge chain list of the target shell according to the topological relationship of the target shell. First, the computer device can obtain a roof target shell 601 composed of three faces (F0, F1, F2), and further obtain a top view 602 of the roof of the target shell, which is composed of three faces F0, F1, F2 and ten edges e0 to e9. Then, the boundary of the target shell is searched according to the following steps:

[0097] Step A: First, search for any boundary edge in the target shell that is empty on the opposite side as the starting boundary edge and mark it as processed, such as e0.

[0098] Step B: Get the next boundary edge e3 according to the ordered boundary list of F0. If e3 is a boundary edge, then this edge is the next boundary edge. If e3 is not a boundary edge, then get the face F1 where its opposite edge is located, and get the next edge e6 in F1 with e3.

[0099] Step C: Repeat step B until the next boundary edge is detected. For example, continue to detect whether e6 is a boundary edge. If e6 is not a boundary edge, obtain the face F2 where its opposite edge is located, and obtain the next edge e9 of e6 on F2. If e9 is a boundary edge, then e9 is the next boundary edge of e0.

[0100] Step D: Repeat steps B and C to search for the next boundary edge, and mark the searched boundary edge as processed, until the next boundary edge is the starting boundary edge e0. Then the boundary edge linked list search ends.

[0101] Step E: Repeat steps A to D until all boundary edges are processed.

[0102] The target shell boundary is projected onto the attachment surface in the attachment direction to generate a legal projection polygon 603 .

[0103] Step 305: Determine the covering relationship between the target attachment body and the target attachment surface according to the relationship between the projection polygon and the target attachment surface.

[0104] Optionally, the covering relationship includes one of the target surface fully covering the attachment surface, the attachment surface fully covering the target surface, and the target surface partially covering the attachment surface.

[0105] Please refer to Figure 7 , which shows a schematic diagram of a coverage relationship involved in an embodiment of the present application. Figure 7 As shown, in a possible implementation, the target attachment surface is projected according to the attachment direction to obtain an attachment surface polygon; when the projection polygon contains the attachment surface polygon, the coverage relationship is that the target surface fully covers the attachment surface (such as Figure 7 701 in ); when the attachment surface polygon contains the projection polygon, the covering relationship is that the attachment surface covers the target surface (such as Figure 7 702); when the projection polygon intersects with the attachment surface polygon, the covering relationship is that the target surface partially covers the attachment surface (such as Figure 7 703 in ).

[0106] Step 306: construct a result attachment body according to the covering relationship between the target attachment body and the target attachment surface, and the covering portion of the target attachment surface on the target attachment body.

[0107] In a possible implementation, when the covering relationship is that the target surface completely covers the attachment surface, the target attachment body is extended to the auxiliary plane to obtain a first attachment body; the first attachment body is cut through the target shell to construct the result attachment body.

[0108] Please refer to Figure 8 , which shows a schematic diagram of a result attachment body in which a target surface fully covers an attachment surface according to an embodiment of the present application. Figure 8 As shown, when the target surface completely covers the attachment surface, the extended attachment body is obtained by directly extending the attachment body to a certain auxiliary plane on the target shell, and then the extended attachment body is cut with the target shell to obtain the cutting result outside the target shell as the result attachment body.

[0109] When the target surface completely covers the attachment surface, the computer device also needs to determine whether the target attachment is a stretchable attachment. Figure 8 801 in the figure), the target attachment body can be stretched to the auxiliary plane to generate a new extended attachment body (such as Figure 8 802 in ), and cut the extended attachment through the target shell to generate the resulting attachment (such as Figure 8 803 in ).

[0110] If the target attachment is a non-stretchable attachment, the target attachment can be extended to the auxiliary plane (such as Figure 8 804 in ), generating a new extended attachment (such as Figure 8 805 in ), and cut the extended attachment through the target shell to generate the resulting attachment (such as Figure 8 806 in ).

[0111] Please refer to Fig. 9 , which shows a schematic diagram of an attachment stretching judgment involved in an embodiment of the present application. Fig. 9 As shown, all adjacent faces of the attached face are obtained according to the topological relationship, all adjacent faces are traversed, and the normal cross product vectors of two adjacent side faces are calculated and saved.

[0112] If all the saved cross product vectors are parallel vectors, the attachment is a stretchable attachment, such as Fig. 9As shown, f0~f3 are the four sides of the attachment surface F, N0~N3 are the normals of f0~f3 respectively, C01 is the cross product vector of N0 and N1, C12 is the cross product vector of N1 and N2, C23 is the cross product vector of N2 and N3, and C30 is the cross product vector of N3 and N0. If C01, C12, C23, and C30 are all parallel, it is considered that the attachment can be stretched, and the stretching direction is C01 (such as Fig. 9 901).

[0113] If there are non-parallel cross product vectors in C01, C12, C23, and C30 (such as Fig. 9 As shown in part 902), the attachment is non-stretchable and is an extendable attachment.

[0114] In a possible implementation, when the covering relationship is that the attachment surface covers the target surface, a stretched body of the projected polygon is generated on the attachment surface as a result attachment body.

[0115] Please refer to Fig.10 , which shows a schematic diagram of a result attachment body in which the attachment surface fully covers the target surface according to an embodiment of the present application. Fig.10 As shown in FIG. 1 , when the attachment surface completely covers the target shell, a target shell projection polygon stretch body in the attachment direction is directly generated on the attachment surface as a new attachment body, and then the new attachment body is subjected to a Boolean operation with the original attachment body to obtain the result attachment body. The computer device obtains the two-dimensional projection polygon of the target shell on the attachment surface in the attachment direction, and then obtains the stretch body formed by stretching the two-dimensional projection polygon in the attachment direction (such as Fig.10 1001 in the figure); then obtain the newly added attachment body generated after the stretched body is cut by the target shell (as shown in FIG. Fig.10 1002), and finally the resultant attachment obtained by performing a Boolean operation on the original attachment and the newly added attachment (as shown in FIG. Fig.10 1003).

[0116] In a possible implementation, when the covering relationship is that the target surface partially covers the attachment surface, a covering polygon between the target shell and the target attachment body is determined;

[0117] Projecting the covering polygon according to the attachment direction to obtain a second attachment body;

[0118] The second attachment body is cut through the target shell to construct the resulting attachment body.

[0119] Please refer to Fig.11 , which shows a schematic diagram of a result attachment body in which a target surface partially covers an attachment surface according to an embodiment of the present application. Fig.11 Shown is the attachment of a non-stretchable wedge-shaped attachment to a partially covered target shell. Fig.11 The projected polygon of the target shell boundary on the attachment surface intersects with the attachment surface polyhedron. In this case, the target surface can actually only cover part of the attachment surface (such as Fig.11 At this time, the computer device locally extends the two-dimensional edge chain projection of the target shell boundary inside the attachment surface polygon, stretches the two-dimensional edge chain into a three-dimensional cut shell in the attachment direction, and cuts the attachment into two parts (such as the inner and outer parts). Fig.11 The final attachment body below the target shell is saved as the result attachment body (as shown in part 1102 of FIG. Fig.11 1103).

[0120] Step 307: merge the result attachment body with the target attachment body to obtain an attachment result.

[0121] Please refer to Fig.12 , which shows a schematic diagram of line-surface merging involved in an embodiment of the present application. Fig.12 As shown, after the computer device generates the result attachment body based on the target attachment body, there may be a colinear part and a coplanar part between the two (such as Fig.12 1201), at this time, the computer device can merge the result attachment body and the target attachment body, and merge the coplanar part and the colinear part to obtain the final attachment result (as shown in FIG. Fig.12 1202).

[0122] In summary, in the present application, the computer device first determines the target attachment body and the target shell to which the attachment body needs to be attached, and determines whether the attachment conditions are met. If so, the ordered boundary of the target shell is projected on the target attachment surface according to the attachment direction, and a projection polygon is obtained to indicate the covering relationship between the attachment body and the target shell. The computer device then constructs a new result attachment body according to the covering relationship as the newly added part of the attachment body attached to the target shell. Finally, the computer device merges the result attachment body with the target attachment body to obtain the attachment result. The above scheme automatically realizes the automatic attachment of the attachment body and the target shell, and takes into account the covering relationship between the attachment body and the target shell. The designer does not need to manually adjust and edit the redundant parts, thereby improving the accuracy of the automatic attachment result.

[0123] Fig.13 1 is a structural block diagram of a quick attachment device according to an exemplary embodiment. The quick attachment device comprises:

[0124] The data acquisition module 1301 is used to acquire the target attachment body and the target shell;

[0125] A projection module 1302 is used to project the ordered boundary of the target shell onto the attachment surface of the target attachment body according to the attachment direction to obtain a projection polygon when the positional relationship between the target attachment body and the target shell meets the attachment condition;

[0126] A covering relationship determination module 1303, configured to determine a covering relationship between the target attachment body and the target shell according to a relationship between the projection polygon and the attachment surface;

[0127] The attachment body construction module 1304 is used to construct the result attachment body according to the covering relationship between the target attachment body and the target shell, and the covering part of the target shell on the target attachment body;

[0128] The merging module 1305 is used to merge the result attachment body with the target attachment body to obtain an attachment result.

[0129] In a possible implementation manner, the covering relationship includes one of: the target surface completely covers the attachment surface, the attachment surface completely covers the target surface, and the target surface partially covers the attachment surface;

[0130] The coverage relationship determination module is further used to:

[0131] Projecting the target attachment body according to the attachment direction to obtain an attachment surface polygon;

[0132] When the projection polygon includes an attachment surface polygon, the coverage relationship is that the target surface fully covers the attachment surface;

[0133] When the attachment surface polygon includes the projection polygon, the covering relationship is that the attachment surface covers the target surface;

[0134] When the projection polygon intersects with the attachment surface polygon, the covering relationship is that the target surface partially covers the attachment surface.

[0135] In a possible implementation, the attachment body construction module is further used to, when the covering relationship is that the target surface completely covers the attachment surface, extend the target attachment body to the auxiliary plane to obtain a first attachment body;

[0136] The first attachment body is cut through the target shell to construct the resulting attachment body.

[0137] In a possible implementation, the attachment body construction module is further configured to generate a stretched body of the projected polygon on the attachment surface as a result attachment body when the covering relationship is that the attachment surface covers the target surface.

[0138] In a possible implementation, the attachment body construction module is further used to determine a covering polygon between the target shell and the target attachment body when the covering relationship is that the target surface partially covers the attachment surface;

[0139] Projecting the covering polygon according to the attachment direction to obtain a second attachment body;

[0140] The second attachment body is cut through the target shell to construct the resulting attachment body.

[0141] In a possible implementation manner, the device further includes:

[0142] A product calculation module, used to calculate the product of the normal of the attachment surface and the attachment direction;

[0143] The attachment condition determination module is used to determine that the positional relationship between the target attachment body and the target shell meets the attachment condition when the multiplication result is greater than the attachment threshold.

[0144] In a possible implementation, the attachment condition determination module is further configured to:

[0145] When the product result is greater than the attachment threshold, obtaining a bounding box of the target shell according to the boundary coordinates of the target shell;

[0146] When the bounding box does not intersect the target attachment body, it is determined that the positional relationship between the target attachment body and the target shell satisfies the attachment result.

[0147] In summary, in the present application, the computer device first determines the target attachment body and the target shell to which the attachment body needs to be attached, and determines whether the attachment conditions are met. If so, the ordered boundary of the target shell is projected on the target attachment surface according to the attachment direction, and a projection polygon is obtained to indicate the covering relationship between the attachment body and the target shell. The computer device then constructs a new result attachment body according to the covering relationship as the newly added part of the attachment body attached to the target shell. Finally, the computer device merges the result attachment body with the target attachment body to obtain the attachment result. The above scheme automatically realizes the automatic attachment of the attachment body and the target shell, and takes into account the covering relationship between the attachment body and the target shell. The designer does not need to manually adjust and edit the redundant parts, thereby improving the accuracy of the automatic attachment result.

[0148] Fig.14The structural block diagram of a computer device 1400 shown in an exemplary embodiment of the present application is shown. The computer device can be implemented as a server in the above-mentioned solution of the present application. The computer device 1400 includes a central processing unit (CPU) 1401, a system memory 1404 including a random access memory (RAM) 1402 and a read-only memory (ROM) 1403, and a system bus 1405 connecting the system memory 1404 and the central processing unit 1401. The computer device 1400 also includes a mass storage device 1406 for storing an operating system 1409, an application program 1410 and other program modules 1411.

[0149] The mass storage device 1406 is connected to the central processing unit 1401 through a mass storage controller (not shown) connected to the system bus 1405. The mass storage device 1406 and its associated computer readable medium provide non-volatile storage for the computer device 1400. That is, the mass storage device 1406 may include a computer readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.

[0150] Without loss of generality, the computer-readable medium may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electronically-Erasable Programmable Read-Only Memory (EEPROM) flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that the computer storage medium is not limited to the above. The above-mentioned system memory 1404 and mass storage device 1406 can be collectively referred to as memory.

[0151] According to various embodiments of the present disclosure, the computer device 1400 can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 1400 can be connected to the network 1408 through the network interface unit 1407 connected to the system bus 1405, or the network interface unit 1407 can be used to connect to other types of networks or remote computer systems (not shown).

[0152] The memory further includes at least one computer program, which is stored in the memory. The central processing unit 1401 implements all or part of the steps in the methods shown in the above embodiments by executing the at least one computer program.

[0153] In an exemplary embodiment, a computer-readable storage medium is also provided, which is used to store at least one computer program, and the at least one computer program is loaded and executed by a processor to implement all or part of the steps in the above method. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0154] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned Figure 2 or Figure 3 All or part of the steps of the method shown in the corresponding embodiment.

[0155] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0156] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A rapid attachment method, characterized in that: The method comprises: Get the target attachment body and target shell; When the positional relationship between the target attachment body and the target shell satisfies the attachment condition, projecting the ordered boundary of the target shell onto the attachment surface of the target attachment body according to the attachment direction to obtain a projection polygon; Determining a covering relationship between the target attachment body and the target shell according to a relationship between the projection polygon and the attachment surface; Constructing a result attachment body according to the covering relationship between the target attachment body and the target shell, and the covering part of the target shell on the target attachment body; The result attachment body is combined with the target attachment body to obtain an attachment result.

2. The method according to claim 1, characterized in that The covering relationship includes one of the target surface fully covering the attachment surface, the attachment surface fully covering the target surface, and the target surface partially covering the attachment surface; The determining the covering relationship between the target attachment body and the target shell according to the relationship between the projection polygon and the attachment surface comprises: Projecting the target attachment body according to the attachment direction to obtain an attachment surface polygon; When the projection polygon includes an attachment surface polygon, the coverage relationship is that the target surface fully covers the attachment surface; When the attachment surface polygon includes the projection polygon, the covering relationship is that the attachment surface covers the target surface; When the projection polygon intersects with the attachment surface polygon, the covering relationship is that the target surface partially covers the attachment surface.

3. The method according to claim 2, characterized in that The step of constructing a result attachment body according to the covering relationship between the target attachment body and the target shell, and the covering portion of the target shell on the target attachment body, comprises: When the covering relationship is that the target surface completely covers the attachment surface, the target attachment body is extended to the auxiliary plane to obtain a first attachment body; The first attachment body is cut through the target shell to construct the resulting attachment body.

4. The method according to claim 2, characterized in that: The step of constructing a result attachment body according to the covering relationship between the target attachment body and the target shell, and the covering portion of the target shell on the target attachment body, comprises: When the covering relationship is that the attachment surface covers the target surface, a stretched body of the projected polygon is generated on the attachment surface as a result attachment body.

5. The method according to claim 2, characterized in that: The step of constructing a result attachment body according to the covering relationship between the target attachment body and the target shell, and the covering portion of the target shell on the target attachment body, comprises: When the covering relationship is that the target surface partially covers the attachment surface, determining the covering polygon of the target shell and the target attachment body; Projecting the covering polygon according to the attachment direction to obtain a second attachment body; The second attachment body is cut through the target shell to construct the resulting attachment body.

6. The method according to any one of claims 1 to 5, characterized in that: Before projecting the ordered boundary of the target attachment body onto the target shell according to the attachment direction, the method further includes: Calculating the product of the normal of the attachment surface and the attachment direction; When the multiplication result is greater than the attachment threshold, it is determined that the positional relationship between the target attachment body and the target shell satisfies the attachment condition.

7. The method according to claim 6, characterized in that When the multiplication result is greater than the attachment threshold, determining that the positional relationship between the target attachment body and the target shell satisfies the attachment condition includes: When the product result is greater than the attachment threshold, obtaining a bounding box of the target shell according to the boundary coordinates of the target shell; When the bounding box does not intersect the target attachment body, it is determined that the positional relationship between the target attachment body and the target shell satisfies the attachment result.

8. A quick attachment device, characterized in that: The device comprises: A data acquisition module, used for acquiring a target attachment body and a target shell; A projection module, configured to project the ordered boundary of the target shell onto the attachment surface of the target attachment body according to the attachment direction to obtain a projection polygon when the positional relationship between the target attachment body and the target shell satisfies the attachment condition; A covering relationship determination module, used to determine the covering relationship between the target attachment body and the target shell according to the relationship between the projection polygon and the attachment surface; An attachment body construction module, used for constructing a result attachment body according to the covering relationship between the target attachment body and the target shell, and the covering part of the target shell on the target attachment body; A merging module is used to merge the result attachment body with the target attachment body to obtain an attachment result.

9. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the fast attachment method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the fast attachment method according to any one of claims 1 to 7.