Method and device for detecting and processing curved surface selfing line of three-dimensional model and related equipment

By constructing self-intersection discriminant and subdivided surfaces, the problems of low efficiency and low accuracy of surface self-intersection lines in the prior art are solved, and the rapid and accurate detection of surface self-intersection lines in the three-dimensional model is achieved.

CN120147261APending Publication Date: 2025-06-13ACAD OF MATHEMATICS & SYSTEMS SCIENCE - CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510219088.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

In the prior art, the surface self-intersection line detection method has problems such as low efficiency or low accuracy, and it is difficult to quickly and accurately detect surface self-intersection lines in a three-dimensional model.

Method used

By obtaining the surface feature information of the surface to be detected in the three-dimensional model, constructing a self-intersection discrimination formula and extracting the self-intersection discrimination sequence to determine whether the surface has self-intersection. If present, perform surface subdivision until it is determined that the surface does not have self-intersect or subdivided surface sheets meet the preset flatness conditions.

Benefits of technology

The accuracy and efficiency of surface self-intersection line detection in the three-dimensional model can be improved, and it can quickly determine whether the surface has self-intersection, and perform effective subdivision and intersection operations when self-intersection exists.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147261A_ABST
    Figure CN120147261A_ABST
Patent Text Reader

Abstract

The invention provides a curved surface selfing line detection processing method and device of a three-dimensional model and related equipment, and relates to the field of computer aided design. The method comprises the following steps: acquiring curved surface feature information of a to-be-detected curved surface in a three-dimensional model; constructing a selfing discriminant according to the curved surface feature information; a selfing discrimination sequence is extracted from the selfing discriminant, and whether selfing exists in the curved surface to be detected is judged according to the selfing discrimination sequence; if the to-be-detected curved surface has self-intersection, subdividing the to-be-detected curved surface to obtain a first curved surface patch and a second curved surface patch which do not have overlapped parts and a third curved surface patch and a fourth curved surface patch which have overlapped parts; performing intersection judgment on the first curved surface patch and the second curved surface patch, and executing intersection operation when the first curved surface patch and the second curved surface patch are judged to be intersected; respectively and repeatedly executing the steps on the third curved surface patch and the fourth curved surface patch until the curved surface patch obtained by judging that the to-be-detected curved surface does not have self-intersection or subdivision meets a preset flatness condition; and when the selfing line only exists in the local area of the to-be-detected curved surface, eliminating the selfing part of the to-be-detected curved surface. According to the invention, the accuracy and efficiency of curved surface selfing line detection processing in the three-dimensional model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] CAD (Computer-Aided Design) is a technology that uses computer hardware and software to assist designers in engineering design. As an important design tool, CAD can help designers complete design work more intuitively and efficiently, and is widely used in fields such as aerospace, ship design, integrated circuit design, automotive design, and architectural design.

[0003] A CAD model is a digital representation created during the computer-aided design process, used to display the geometric shape, structure, features, and properties of an object. CAD can be used for the design of two-dimensional models or three-dimensional models. In three-dimensional models, the detection of self-intersection lines on the surface plays a key role in determining the surface topology. The fast and stable calculation of self-intersection lines is an important issue in computer-aided design and has wide applications in geometric modeling operations such as mesh generation, Boolean operations, and solid shelling. For example, in the neighborhood of self-intersection lines, mesh interpenetration often occurs during the mesh generation of a surface, affecting the topological correctness of the mesh surface; during the Boolean operation of a solid, calculation often fails when dealing with the self-intersection area of its outer surface; solid shelling requires offsetting the outer surface of the solid inward by a specified distance to generate an offset surface as the inner surface, and when self-intersection occurs on this inner surface, it often leads to the failure of the shelling operation.

[0004] Currently, the surface self-intersection line detection schemes provided in the related technologies mainly include the following two types:

[0005] 1) Symbolic calculation methods, including the resultant method, the method based on a basis, the algebraic decomposition method, and the moving plane method, etc. This method has problems in implicitization, equation solving, etc. as the degree of the surface increases, resulting in low efficiency.

[0006] 2) Numerical calculation methods, including the approximate implicitization method, the sampling method, and the hierarchical bounding box method, etc. This method has obvious precision sensitivity in practical applications: in high-precision calculation scenarios, its calculation amount will increase significantly, resulting in low efficiency; while in cases with low-precision requirements, although the efficiency is high, small loops on the self-intersection line are easily missed, affecting the topological correctness of the self-intersection line.

[0007] Analysis shows that the surface self-intersection line detection methods provided in the related technologies all have certain limitations. In this field, there is an urgent need for a surface self-intersection line detection method that can improve efficiency and ensure topological correctness.

[0008] It should be noted that the information disclosed in the above background art section is only used to strengthen the understanding of the background of the present disclosure, and thus may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention

[0009] The present disclosure provides a method, an apparatus, and related devices for detecting and processing self - intersection lines of a curved surface of a three - dimensional model, which at least overcome to some extent the technical problems of low efficiency or low accuracy in the self - intersection line detection methods provided in the related art.

[0010] Other features and advantages of the present disclosure will become apparent from the following detailed description, or will be learned in part through the practice of the present disclosure.

[0011] According to one aspect of the present disclosure, a method for detecting and processing self - intersection lines of a curved surface of a three - dimensional model is provided. The method includes: obtaining surface feature information of a to - be - detected curved surface in the three - dimensional model, where the three - dimensional model is a model created in a three - dimensional virtual space and includes at least one curved surface; constructing a self - intersection discriminant according to the surface feature information; extracting a self - intersection discriminant sequence from the self - intersection discriminant, and judging whether the to - be - detected curved surface has self - intersection according to the self - intersection discriminant sequence; if the to - be - detected curved surface has self - intersection, then subdividing the to - be - detected curved surface to obtain a first curved surface patch and a second curved surface patch without overlapping parts, and a third curved surface patch and a fourth curved surface patch with overlapping parts; performing an intersection determination on the first curved surface patch and the second curved surface patch, and performing an intersection operation when the determination is that they intersect; respectively repeating the above steps for the third curved surface patch and the fourth curved surface patch until it is determined that the to - be - detected curved surface has no self - intersection or the curved surface patches obtained by subdivision meet a preset flatness condition.

[0012] In some embodiments, the self - intersection discriminant is expressed as follows:

[0013] f(u,v) = r u (u,v)×r v (u,v)·n(u 0 ,v 0 );

[0014] Wherein,

[0015] Wherein, n(u 0 ,v 0 ) is the normal vector of the to - be - detected curved surface r(u,v) at a fixed parameter (u 0 ,v 0 ), (u 0 ,v 0 ) is an arbitrary point on the parameter domain of the to - be - detected curved surface r(u,v); r u (u,v) and r v (u,v) are the partial derivatives of the to - be - detected curved surface r(u,v) with respect to u and v respectively; (p,q) represents the degree of the curved surface r(u,v); w ijdenotes the weight factor of the surface r(u, v); P ij denotes the control points of the surface r(u, v) to be detected; the number of control points of the surface r(u, v) to be detected is (n + 1) × (m + 1), where (n + 1) denotes the number of control points in the u direction and (m + 1) denotes the number of control points in the v direction; N i,p (u) and N j,q (v) denote the spline basis functions.

[0016] In some embodiments, the surface to be detected is a NURBS surface, the self - intersection discriminant is a mathematical function with spline basis functions as the basis, and the self - intersection discriminant sequence is the coefficient of the self - intersection discriminant under the basis. Among them, the self - intersection discriminant is expressed as follows:

[0017]

[0018] where, μ 1 = 3pn - 3p 2 + n + 3p + 5;

[0019] μ 2 = 3qm - 3q 2 + m + 3q + 5;

[0020] where, (p, q) denotes the degree of the surface; the number of control points of the surface to be detected is (n + 1) × (m + 1), where (n + 1) denotes the number of control points in the u direction and (m + 1) denotes the number of control points in the v direction;

[0021] The self - intersection discriminant sequence is expressed as follows:

[0022]

[0023] where, for all all satisfy c ij ≥ 0, then it indicates that the NURBS surface r(u, v) has no self - intersection.

[0024] In some embodiments, the surface to be detected is subdivided to obtain a first surface patch and a second surface patch without overlapping parts, and a third surface patch and a fourth surface patch with overlapping parts, including: obtaining the parameter domain of the surface to be detected, where the parameter domain includes: a first parameter range in the first coordinate axis direction and a second parameter range in the second coordinate axis direction, and the first coordinate axis direction and the second coordinate axis direction are two mutually perpendicular coordinate axis directions; comparing the magnitudes of the first parameter range and the second parameter range; in the coordinate axis direction with the larger parameter range, determining a first threshold and a second threshold, where both the first threshold and the second threshold are located between the minimum value and the maximum value of the parameter range in the corresponding coordinate axis direction, and the first threshold is less than the second threshold; subdividing the surface to be detected at the first threshold to obtain the first surface patch and the third surface patch, where the first surface patch is the surface patch smaller than the first threshold, and the third surface patch is the surface patch larger than the first threshold; subdividing the surface to be detected at the second threshold to obtain the second surface patch and the fourth surface patch, where the second surface patch is the surface patch larger than the second threshold, and the fourth surface patch is the surface patch smaller than the second threshold.

[0025] In some embodiments, an intersection determination is performed on the first surface patch and the second surface patch, and an intersection operation is performed when the determination is that they intersect, including: determining whether the axial bounding boxes of the first surface patch and the second surface patch intersect; if so, respectively forming a first control network and a second control network according to the control points of the first surface patch and the second surface patch, calculating the intersection points of the first control network and the second control network, and projecting the intersection points of the first control network and the second control network onto the corresponding surface patches to obtain approximate intersection points of the first surface patch and the second surface patch; determining the actual intersection points of the first surface patch and the second surface patch through the Newton iteration algorithm; determining the intersection line of the first surface patch and the second surface patch according to the actual intersection points of the first surface patch and the second surface patch.

[0026] In some embodiments, the above steps are repeatedly executed for the third surface patch and the fourth surface patch respectively until it is determined that the surface to be detected has no self - intersection or the surface patches obtained by subdivision meet the preset flatness condition, including: determining the plane corresponding to each surface patch according to the set of control points of each surface patch, where the set of control points contains: a plurality of control points; for the set of control points of each surface patch, calculating the distance from each control point to the corresponding plane, and determining whether the distance is less than a preset threshold, if so, determining that the surface patch meets the preset flatness condition.

[0027] In some embodiments, the method for detecting and processing the self-intersection line of the surface of a three-dimensional model provided in the embodiments of the present disclosure further includes: when the self-intersection line only exists in a local area of the surface to be detected, eliminating the self-intersecting part of the surface to be detected by solving an optimization problem with constraints, specifically including:

[0028] Let the target self-intersection-free surface after eliminating the self-intersecting part be

[0029]

[0030] where represents the control points of the surface ; w ij represents the weight factor of the surface r(u, v) to be detected; (p, q) represents the degree of the surface r(u, v) to be detected; the number of control points of the surface and the surface r(u, v) to be detected is both (n + 1)×(m + 1), where (n + 1) represents the number of control points in the u direction and (m + 1) represents the number of control points in the v direction; N i,p (u) and N j,q (v) represent spline basis functions;

[0031] Calculate the self-intersection discrimination sequence of the surface ;

[0032] Solve the optimization problem with constraints to obtain the control points of the surface Then the surface is the result after eliminating the self-intersecting part of the surface r(u, v) to be detected;

[0033] Among them, the optimization problem with constraints is as follows:

[0034] The constraint condition is where P ij represents the control points of the surface r(u, v); represents the control points of the surface ;

[0035] According to another aspect of the present disclosure, there is also provided a device for detecting and processing self-intersection lines of a curved surface of a three-dimensional model, including: a curved surface feature information acquisition module for acquiring the curved surface feature information of the curved surface to be detected in the three-dimensional model, wherein the three-dimensional model is a model including at least one curved surface created in a three-dimensional virtual space; a self-intersection discriminant construction module for constructing a self-intersection discriminant according to the curved surface feature information; a self-intersection discriminant sequence extraction module for extracting a self-intersection discriminant sequence from the self-intersection discriminant and judging whether the curved surface to be detected has self-intersection according to the self-intersection discriminant sequence; a curved surface subdivision module for, if the curved surface to be detected has self-intersection, subdividing the curved surface to be detected to obtain a first curved surface patch and a second curved surface patch without overlapping parts, and a third curved surface patch and a fourth curved surface patch with overlapping parts; a self-intersection line detection module for performing an intersection determination on the first curved surface patch and the second curved surface patch and performing an intersection operation when the determination is that they intersect; a recursive processing module for respectively repeating the above steps for the third curved surface patch and the fourth curved surface patch until it is determined that the curved surface to be detected has no self-intersection or the curved surface patches obtained by subdivision meet a preset flatness condition.

[0036] In some embodiments, the device for detecting and processing self-intersection lines of a curved surface of a three-dimensional model provided in the embodiments of the present disclosure further includes: a self-intersection elimination module for, when the self-intersection line only exists in a local area of the curved surface to be detected, eliminating the self-intersection part of the curved surface to be detected by solving an optimization problem with constraints.

[0037] According to another aspect of the present disclosure, there is also provided an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the method for detecting and processing self-intersection lines of a curved surface of a three-dimensional model as described in any one of the above by executing the executable instructions.

[0038] According to another aspect of the present disclosure, there is also provided a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method for detecting and processing self-intersection lines of a curved surface of a three-dimensional model as described in any one of the above.

[0039] According to another aspect of the present disclosure, there is also provided a computer program product, including: a computer program or instruction, and the computer program or instruction, when executed by a processor, implements the method for detecting and processing self-intersection lines of a curved surface of a three-dimensional model as described in any one of the above.

[0040] In the embodiments of the present disclosure, a method, an apparatus, and related devices for detecting and processing self - intersection lines of a curved surface of a 3D model construct a self - intersection discriminant according to the curved - surface feature information of the curved surface to be detected in the 3D model, and then extract a self - intersection discriminant sequence from the self - intersection discriminant. According to the self - intersection discriminant sequence, it is quickly determined whether the curved surface to be detected has self - intersection. When the curved surface to be detected has self - intersection, the curved surface to be detected is subdivided according to the self - intersection discriminant sequence to obtain a group of curved - surface patches (a first curved - surface patch and a second curved - surface patch) without overlapping parts, and a second group of curved - surface patches (a third curved - surface patch and a fourth curved - surface patch) with overlapping parts; the first curved - surface patch and the second curved - surface patch are determined for intersection, and an intersection - finding operation is performed when the determination is intersection; the above steps are repeatedly executed for the third curved - surface patch and the fourth curved - surface patch respectively until it is determined that the curved surface to be detected has no self - intersection or the curved - surface patches obtained by subdivision meet the preset flatness condition.

[0041] Further, when the self - intersection line only exists in a local area of the curved surface to be detected, the self - intersection part of the curved surface to be detected can also be eliminated.

[0042] Through the method, the apparatus, and the related devices for detecting and processing self - intersection lines of a curved surface of a 3D model provided in the embodiments of the present disclosure, the accuracy and efficiency of detecting and processing self - intersection lines of a curved surface in a 3D model (including but not limited to self - intersection line detection, self - intersection line calculation (extraction), and self - intersection line elimination, etc.) can be improved.

[0043] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the accompanying drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0045] Figure 1 Shows a schematic diagram of an application system architecture in an embodiment of the present disclosure;

[0046] Figure 2 Shows a flowchart of a method for detecting and processing self - intersection lines of a curved surface of a 3D model in an embodiment of the present disclosure;

[0047] Figure 3 Shows a schematic diagram of the overall framework of detecting and processing self - intersection lines of a curved surface in an embodiment of the present disclosure;

[0048] Figure 4 Shows a schematic diagram of subdividing a curved surface in an embodiment of the present disclosure;

[0049] Figure 5 Schematic diagram showing the application of the surface self - intersection line detection and processing method provided in the embodiments of the present disclosure in mesh generation;

[0050] Figure 6 Schematic diagram showing the application of the surface self - intersection line detection and processing method provided in the embodiments of the present disclosure in Boolean operation;

[0051] Figure 7 Schematic diagram showing the application of the surface self - intersection line detection and processing method provided in the embodiments of the present disclosure in solid shelling;

[0052] Figure 8 Schematic diagram showing the analysis of the surface self - intersection line detection and processing results in the embodiments of the present disclosure;

[0053] Figure 9 Schematic diagram showing another analysis of the surface self - intersection line detection and processing results in the embodiments of the present disclosure;

[0054] Figure 10 Schematic diagram showing the analysis of the surface self - intersection line extraction results in the embodiments of the present disclosure;

[0055] Figure 11 Schematic diagram showing the analysis of the results of eliminating the self - intersection part of the surface in the embodiments of the present disclosure;

[0056] Figure 12 Schematic diagram showing the surface self - intersection line detection and processing device of a 3D model in the embodiments of the present disclosure;

[0057] Figure 13 Schematic block diagram showing the structure of an electronic device in the embodiments of the present disclosure. Detailed implementation manners

[0058] Now, example embodiments will be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0059] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated description will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0060] The following will, with reference to the accompanying drawings, elaborate in detail the specific implementation manners of the embodiments of the present disclosure.

[0061] Figure 1 Fig. shows a schematic diagram of an exemplary application system architecture to which the method for detecting the self-intersection line of a curved surface of a 3D model in the embodiments of the present disclosure can be applied. As Figure 1 shown, the system architecture may include a terminal device 101, a network 102, and a server 103.

[0062] The network 102 is used to provide a medium for the communication link between the terminal device 101 and the server 103, and can be a wired network or a wireless network.

[0063] Optionally, the above-mentioned wireless network or wired network uses standard communication technologies and / or protocols. The network is usually the Internet, but can also be any network, including but not limited to any combination of a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or a virtual private network). In some embodiments, technologies and / or formats including hypertext markup language (HTML), extensible markup language (XML), etc. are used to represent the data exchanged through the network. In addition, conventional encryption technologies such as secure socket layer (SSL), transport layer security (TLS), virtual private network (VPN), and Internet protocol security (IPSec) can be used to encrypt all or some of the links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.

[0064] The terminal device 101 can be various electronic devices, including but not limited to smartphones, tablets, laptop computers, desktop computers, smart speakers, smart watches, wearable devices, augmented reality devices, virtual reality devices, etc.

[0065] Optionally, the clients of the application programs installed in different terminal devices 101 are the same, or are clients of the same type of application program based on different operating systems. Depending on the different terminal platforms, the specific form of the client of the application program can also be different. For example, the client of the application program can be a mobile client, a PC client, etc.

[0066] The server 103 can be a server that provides various services. For example, it can be a background management server that supports the devices for the operations performed by users using the terminal devices 101. The background management server can analyze and process data such as requests received, and feedback the processing results to the terminal devices.

[0067] Optionally, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0068] Those skilled in the art can understand that Figure 1 the numbers of the terminal devices, networks, and servers in are merely illustrative. According to actual needs, there can be any number of terminal devices, networks, and servers. The embodiments of the present disclosure do not limit this.

[0069] Under the above system architecture, an embodiment of the present disclosure provides a method for detecting and processing the self-intersection line of a surface of a three-dimensional model. This method can be executed by any electronic device with computing and processing capabilities.

[0070] In some embodiments, the method for detecting and processing the self-intersection line of a surface of a three-dimensional model provided in the embodiments of the present disclosure can be executed by the terminal devices in the above system architecture; in other embodiments, the method for detecting and processing the self-intersection line of a surface of a three-dimensional model provided in the embodiments of the present disclosure can be executed by the server in the above system architecture; in other embodiments, the method for detecting and processing the self-intersection line of a surface of a three-dimensional model provided in the embodiments of the present disclosure can be implemented by the terminal devices and the server in the above system architecture through interaction.

[0071] Figure 2 shows a flowchart of a method for detecting and processing the self-intersection line of a surface of a three-dimensional model in an embodiment of the present disclosure. As Figure 2 shown, the method for detecting and processing the self-intersection line of a surface of a three-dimensional model provided in the embodiments of the present disclosure may include the following steps:

[0072] S202, obtain the surface feature information of the surface to be detected in the 3D model, where the 3D model is a model containing at least one surface created in a 3D virtual space.

[0073] In the embodiments of the present disclosure, the 3D model provided can be a model containing at least one surface created in a 3D virtual space using any software design tool. The software design tools here include but are not limited to CAD (Computer-Aided Design) tools.

[0074] It should be noted that in computer graphics and geometry, a surface is usually represented by a parametric equation, which corresponds each point on the surface to a point (u, v) in a two-dimensional parameter space. The u-direction and v-direction here are two coordinate axes in the parameter space, defining two main directions of the surface. The u-direction is a direction in the parameter space. When moving along the u-direction, it is usually a horizontal movement on the parameter domain of the surface. The v-direction is the other direction in the parameter space. When moving along the v-direction, it is usually a movement in another direction perpendicular to the u-direction on the parameter domain of the surface. In the given parameter domain D = [u min , u max × [v min , v max , each point on the surface can be calculated by the parametric equation r(u, v), where u and v are parameters.

[0075] In the embodiments of the present disclosure, the surface feature information refers to the feature information used to represent the geometric attributes of the surface. For example, the feature information used to describe the surface shape, surface structure, or other attributes.

[0076] S204, construct a self-intersection discriminant according to the surface feature information.

[0077] It should be noted that in the embodiments of the present disclosure, the surface feature information for constructing the self-intersection discriminant may include surface normal feature information and surface partial derivative information; among them, the surface normal feature information refers to the information of the normal vector (or normal line) associated with each point on the surface. The normal vector is a vector perpendicular to the tangent plane at a certain point on the surface, and its vector change can be used to detect sharp edges or smooth transitions on the surface. The surface partial derivative information refers to the partial derivatives of the surface equation with respect to its parameters. The partial derivatives can be used to calculate the normal vector (by cross product), and can also be used to analyze attributes such as the curvature and twist of the surface. In a parameterized surface, the partial derivative r u (u, v) of the surface in the u-direction refers to the tangent vector of the surface in the u-direction, which is used to represent the rate of change of the surface in the u-direction. The partial derivative r v(u, v) refers to the tangent vector of the surface in the v direction, which is used to represent the rate of change of the surface in the v direction.

[0078] In one embodiment, the self - intersection discriminant constructed according to the surface normal feature information and the surface partial derivative information is expressed as follows:

[0079] f(u, v) = r u (u, v) × r v (u, v) · n(u 0 , v 0 ) (1)

[0080] Among them,

[0081]

[0082] Among them, n(u 0 , v 0 ) is the normal vector of the surface to be detected r(u, v) at a fixed parameter (u 0 , v 0 ); (u 0 , v 0 ) is an arbitrary point on the parameter domain of the surface to be detected r(u, v); r u (u, v) and r v (u, v) are the partial derivatives of the surface to be detected r(u, v) with respect to u and v respectively; (p, q) represents the degree of the surface r(u, v); w ij represents the weight factor of the surface r(u, v); P ij represents the control points of the surface r(v, v); the number of control points is (n + 1) × (m + 1); N i,p (u) and N j,q (v) represent the spline basis functions. Taking N i,p (u) as an example, its definition is as follows:

[0083]

[0084] Among them, {u 0 , u 1 , …, u n+p+1} is the knot vector of the surface r(u, v) in the u direction, and {v 0 , v 1 , …, v m+q+1} is the knot vector of the surface r(u, v) in the v direction.

[0085] S206, extract the self - intersection discriminant sequence from the self - intersection discriminant, and determine whether the surface to be detected has self - intersection according to the self - intersection discriminant sequence.

[0086] In one embodiment, when the surface to be detected is a NURBS surface, the self-intersection discriminant can be simplified to a mathematical function with spline basis functions as the basis:

[0087]

[0088] where μ 1 = 3pn - 3p 2 + n + 3p + 5;

[0089] μ 2 = 3qm - 3q 2 + m + 3q + 5;

[0090] where (p, q) represents the degree of the surface; the number of control points of the surface to be detected is (n + 1)×(m + 1), where (n + 1) represents the number of control points in the u direction and (m + 1) represents the number of control points in the v direction.

[0091] In this embodiment, the self-intersection discriminant sequence is the coefficient of the self-intersection discriminant under the basis, and the self-intersection discriminant sequence is expressed as follows:

[0092]

[0093] where, for all it satisfies c ij ≥ 0, then it indicates that the NURBS surface r(u, v) has no self-intersection.

[0094] S208. If the surface to be detected has self-intersection, then subdivide the surface to be detected to obtain a first surface patch and a second surface patch without overlapping parts, and a third surface patch and a fourth surface patch with overlapping parts.

[0095] It should be noted that the self - intersection discrimination sequence in the embodiments of the present disclosure can be used to determine whether there is self - intersection on the surface to be detected. If there is no self - intersection, the algorithm terminates; if there is self - intersection, the surface to be detected is subdivided to obtain a first surface patch and a second surface patch without overlapping parts, and a third surface patch and a fourth surface patch with overlapping parts. In specific implementation, the following steps may be included: Obtain the parameter domain of the surface to be detected, where the parameter domain includes: a first parameter range in the first coordinate axis direction and a second parameter range in the second coordinate axis direction, and the first coordinate axis direction and the second coordinate axis direction are two mutually perpendicular coordinate axis directions; Compare the magnitudes of the first parameter range and the second parameter range; In the coordinate axis direction with a larger parameter range, determine a first threshold and a second threshold, where both the first threshold and the second threshold are between the minimum value and the maximum value of the parameter range in the corresponding coordinate axis direction, and the first threshold is less than the second threshold; Subdivide the surface to be detected at the first threshold to obtain the first surface patch and the third surface patch, where the first surface patch is the surface patch less than the first threshold, and the third surface patch is the surface patch greater than the first threshold; Subdivide the surface to be detected at the second threshold to obtain the second surface patch and the fourth surface patch, where the second surface patch is the surface patch greater than the second threshold, and the fourth surface patch is the surface patch less than the second threshold.

[0096] S210, Determine whether the first surface patch and the second surface patch intersect, and perform an intersection operation when the determination is intersection.

[0097] It should be noted that in the embodiments of the present disclosure, the first surface patch and the second surface patch are two surface patches on the surface to be detected without overlapping parts. The following steps can be used to determine whether the first surface patch and the second surface patch intersect and find the intersection line when they intersect: Determine whether the axial bounding boxes of the first surface patch and the second surface patch intersect; If so, construct a control network according to the control points of the two surface patches, calculate the intersection points of the two control networks, and project the intersection points of the two control networks onto the corresponding surface patches to obtain approximate intersection points of the two surface patches; Determine the actual intersection points of the two surface patches through the Newton iteration algorithm; Determine the intersection line of the two surface patches according to the actual intersection points of the two surface patches.

[0098] S212, Repeat the above steps for the third surface patch and the fourth surface patch respectively until it is determined that the surface to be detected has no self - intersection or the surface patches obtained by subdivision meet the preset flatness condition.

[0099] It should be noted that in the embodiments of the present disclosure, the third surface patch and the fourth surface patch are two surface patches with overlapping parts on the surface to be detected. The self - intersection line detection of the surface patches with overlapping parts can be performed through the following steps: Determine the planes corresponding to each surface patch according to the control point set of each surface patch, where the control point set includes: a plurality of control points; for the control point set of each surface patch, calculate the distance from each control point to the corresponding plane, and determine whether the distance is less than a preset threshold. If so, it is determined that the surface patch meets the preset flatness condition.

[0100] In some embodiments, the method for detecting and processing the self - intersection line of the surface of the three - dimensional model provided in the embodiments of the present disclosure further includes:

[0101] S214. When the self - intersection line only exists in a local area of the surface to be detected, eliminate the self - intersection part of the surface to be detected.

[0102] In specific implementation, in the above S214, the self - intersection part of the surface to be detected can be eliminated by solving an optimization problem with constraints, which specifically includes the following steps:

[0103] Let the target non - self - intersecting surface after eliminating the self - intersection part be

[0104]

[0105] where represents the control points of the surface w ij represents the weight factor of the surface r(u, v) to be detected; (p, q) represents the degree of the surface r(u, v) to be detected; the number of control points of the surface and the surface r(u, v) to be detected are both (n + 1)×(m + 1), where (n + 1) represents the number of control points in the u - direction, and (m + 1) represents the number of control points in the v - direction; N i,p (u) and N j,q (v) represent spline basis functions;

[0106] Calculate the self - intersection discrimination sequence of the surface

[0107] Solve the optimization problem with constraints to obtain the control points of the surface Then the surface is the result after eliminating the self - intersection part of the surface r(u, v) to be detected;

[0108] where the optimization problem with constraints is as follows:

[0109] The constraint condition is Among them, P ij represents the control points of the surface r(u, v); represents the surface of the control points.

[0110] As can be seen from the above, in the embodiment of the present disclosure, the method for detecting and processing the self-intersection line of the surface of the three-dimensional model constructs a self-intersection discriminant according to the surface feature information of the surface to be detected in the three-dimensional model, and then extracts a self-intersection discriminant sequence from the self-intersection discriminant. According to the self-intersection discriminant sequence, it is quickly determined whether the surface to be detected has self-intersection. When the surface to be detected has self-intersection, the surface to be detected is subdivided according to the self-intersection discriminant sequence to obtain a first group of surface patches (the first surface patch and the second surface patch) without overlapping parts, and a second group of surface patches (the third surface patch and the fourth surface patch) with overlapping parts; the first surface patch and the second surface patch are determined for intersection, and an intersection operation is performed when the determination is intersection; the above steps are repeatedly executed for the third surface patch and the fourth surface patch respectively until it is determined that the surface to be detected has no self-intersection or the surface patches obtained by subdivision meet the preset flatness condition.

[0111] Furthermore, when the self-intersection line only exists in a local area of the surface to be detected, the self-intersection part of the surface to be detected can also be eliminated. For example, the self-intersection part of the surface to be detected can be eliminated by solving an optimization problem with constraints.

[0112] Through the method for detecting and processing the self-intersection line of the surface of the three-dimensional model provided in the embodiment of the present disclosure, the accuracy and efficiency of detecting and processing the self-intersection line of the surface in the three-dimensional model can be improved.

[0113] The self-intersection line detection and processing in the embodiment of the present disclosure include but are not limited to self-intersection line detection, self-intersection line calculation (extraction), and self-intersection line elimination and other processes.

[0114] Figure 3 shows the overall framework of the self-intersection line detection and processing of the surface in the embodiment of the present disclosure. It is assumed that the surface to be detected input is a NURBS surface. The output is whether the NURBS surface has self-intersection. If it has self-intersection, the self-intersection line trajectory is output at the same time.

[0115] Next, taking the NURBS surface as an example, combined with Figure 3 to illustrate in detail the method for detecting and processing the self-intersection line of the surface of the three-dimensional model provided in the embodiment of the present disclosure. As Figure 3 shown, the specific process is as follows:

[0116] S1, construct a self-intersection discriminant using the surface normal feature: The input is a NURBS surface r(u, v) of the three-dimensional model, and its expression is as shown in the above formula (2).

[0117] S2: Extract the self-intersection discriminant sequence from the self-intersection discriminant, and determine whether the surface to be detected has self-intersection according to the self-intersection discriminant sequence: The input is the self-intersection discriminant f(u,v). The self-intersection discriminant can be expressed in a form with spline basis functions as the basis. The coefficients of the self-intersection discriminant under this set of basis are extracted to obtain a self-intersection discriminant sequence, as shown in the above formula (6). If for all All satisfy c ij ≥0, it means that the surface r(u,v) does not self-intersect.

[0118] S3: Subdivide the surface according to the self-intersection judgment sequence: If the self-intersection judgment sequence indicates that the surface has no self-intersection, the algorithm terminates. Otherwise, subdivide the surface r(u,v).

[0119] Figure 4 The schematic diagram of the result of subdividing the surface according to the embodiment of the present disclosure is shown. Figure 4 The specific steps for subdividing the NURBS surface r(u,v) include:

[0120] 3.1) Let the parameter domain of the surface r(u,v) be D = [u min ,u max ]×[v min ,v max ], without loss of generality, let v max -v min >u max -u min , any (v min +v max ) / 2 in the neighborhood of two values ​​v 0 ,v 1 , satisfying v 0 <v 1 ;

[0121] 3.2) If Figure 2 As shown, the surface r(u,v) is placed at v=v 0 Subdivide at 0 and r 0 ′ =rr 0 , where r 0 ′ is the surface r(u,v) minus r 0 The latter part;

[0122] 3.3) Similarly, if Figure 4 As shown, the surface r(u,v) is placed at v=v 1 Subdivide at 1 and r 1 ′ =rr 1 , where r1 ′ is the part obtained by removing r from the surface r(u, v). 1 after that.

[0123] S4: Perform intersection determination and intersection calculation on the non-overlapping surface patches obtained by subdivision: For the non-overlapping surface patches r 0 ′ and r 1 ′ perform intersection determination and intersection calculation. The specific steps are as follows:

[0124] 4.1) Determine whether the axial bounding boxes of r 0 ′ and r 1 ′ intersect. If they do not intersect, then step S4 ends, and it is determined that r 0 ′ and r 1 ′ do not intersect; if they intersect, then execute steps S4.2 and S4.3;

[0125] 4.2) Calculate the intersection point of the control nets formed by the control points of r 0 ′ and r 1 ′ respectively project it onto r 0 ′ and r 1 ′ to obtain two points P 0 and P 1 , use P 0 and P 1 as the initial values, and calculate the intersection point of r 0 ′ and r 1 ′ through Newton iteration;

[0126] 4.3) If the intersection point of r 0 ′ and r 1 ′ is not found, then use a quadtree to subdivide r 0 ′ and r 1 ′ and repeat steps S4.1 - S4.2 for the subdivided surface patches until an intersection point of r 0 ′ and r 1 ′ is found, or the subdivided surface patches are flat enough; if an intersection point of r 0 ′ and r1 ′ For the intersection point, calculate r 0 ′ and r 1 ′ For the intersection line, the specific steps include:

[0127] 4.3.1) Use a quadtree to subdivide r 0 ′ and r 1 ′ respectively until the subdivided surface patches are flat enough (meeting the preset flatness condition);

[0128] 4.3.2) Take all the surface patch vertices obtained by subdivision of r 0 ′ as grid vertices to obtain a triangular mesh surface M 0 , where the surface patch vertices refer to the four control points at the four corners, denoted as Then and form two triangles; similarly, take all the surface patch vertices obtained by subdivision of r 1 ′ as grid vertices to obtain a triangular mesh surface M 1 ;

[0129] 4.3.3) Calculate the intersection of M 0 and M 1 to obtain a set of approximate intersection points of r 0 ′ and r 1 ′ Iterate these approximate intersection points using the Newton iteration method to obtain a set of intersection points of r 0 ′ and r 1 ′

[0130] 4.3.4) For each surface patch ψ = ψ(u, v) obtained by subdivision of r ′ 0 and each surface patch obtained by subdivision of r ′ 1 If ψ(u, v) intersects with the axial bounding box of Solve the following system of equations using the Newton iteration method to find the solution:

[0131]

[0132] where ψ u , ψ v are the partial derivatives of ψ with respect to u and v respectively,​​ Partial derivatives with respect to s and t respectively. If the system of equations has a solution, take this solution as the initial value and solve for the intersection points of the surface patch ψ(u, v) and by the Newton iteration method, and add the intersection points to the set ; in;

[0133] 4.3.5) Respectively take as the starting points and trace along the tangent direction of the intersection line to obtain the intersection line of r 0 ′ and r 1 ′ .

[0134] S5: Recursively detect the self-intersection line of the surface.

[0135] As Figure 4 shown, repeat steps S1 - S5 for the surface patches r 0 and r 1 obtained by subdivision respectively until it is determined that the surface has no self-intersection or the surface patches obtained by subdivision are flat enough.

[0136] The surface patch being flat enough means that the maximum distance between the surface control points and a plane is close enough. Specifically, for any given surface patch r i , assuming it contains (n + 1)×(m + 1) control points and the control point set is Q = {Q 00 , Q 01 , …, Q 0m , …, Q n0 , Q n1 , …, Q nm}, then the three points Q 00 , Q 0m , Q n0 determine a plane L 0 , and the three points Q 0m , Q n0 , Q nm determine a plane L 1 .

[0137] Given a flatness threshold ∈, if for any it satisfies dist(Q ij , L 0 ) < ∈ and dist(Q ij , L 1 ) < ∈, it indicates that the surface patch r i is flat enough, where dist(Q ij , L k ) represents the distance from the point Q ij to the plane L k , k = 0, 1.

[0138] S6: Eliminate the self - intersection part of the surface.

[0139] In specific implementation, the above - mentioned method for solving the optimization problem with constraints can be adopted, which will not be elaborated here.

[0140] Figure 5 Shows the application schematic diagram of the surface self - intersection line detection and processing method provided by the embodiments of the present disclosure in mesh generation. The embodiments of the present disclosure can ensure the coordination of the mesh in the neighborhood of the self - intersection line. (a) is a top view, (b) is a side view, and the local details in the self - intersection neighborhood are given.

[0141] Figure 6 Shows the application schematic diagram of the surface self - intersection line detection and processing method provided by the embodiments of the present disclosure in Boolean operation. When the intersection region of two solids contains the self - intersection line of the outer surface of the solid, the Boolean operation often fails to calculate correctly. By calculating the self - intersection line trajectory of the present invention, the union, intersection, and difference of the two solids can be calculated correctly.

[0142] Figure 7 Shows the application schematic diagram of the surface self - intersection line detection and processing method provided by the embodiments of the present disclosure in solid shelling. (a) is the input solid, (b) is the self - intersection phenomenon that occurs during the shelling process, and (c) is the solid shelling result obtained by using the present invention. By using the present invention, the problem of self - intersection of the inner surface during the shelling process can be processed, and the correct shelling result can be given.

[0143] Figure 8 Shows an analysis schematic diagram of the surface self - intersection line detection and processing result in the embodiments of the present disclosure. It shows the comparison diagram of the results of the surface self - intersection line detection and processing method provided by the embodiments of the present disclosure and other methods for determining whether a simple NURBS surface is self - intersecting. Among them, True indicates a correct determination, and False indicates an incorrect determination. Compared with the other four methods PSC, MP, the open - source geometry engine OCCT, and the commercial software ACIS, the surface self - intersection line detection and processing method provided by the embodiments of the present disclosure not only has higher efficiency but also can ensure the correctness of the determination result.

[0144] Figure 9 Shows another analysis schematic diagram of the surface self - intersection line detection and processing result in the embodiments of the present disclosure. It shows the comparison diagram of the results of the surface self - intersection line detection and processing method provided by the embodiments of the present disclosure and other methods for determining whether a complex NURBS surface is self - intersecting. Among them, True indicates a correct determination, and False indicates an incorrect determination. Compared with the open - source geometry engine OCCT and the commercial software ACIS, the surface self - intersection line detection and processing method provided by the embodiments of the present disclosure not only has higher efficiency but also can ensure the correctness of the determination result.

[0145] Figure 10It shows a schematic diagram for analyzing the extraction result of the surface self - intersection line in an embodiment of the present disclosure, which presents a comparison diagram of the results of calculating the self - intersection line of a NURBS surface by the method for detecting and processing the surface self - intersection line provided in the embodiment of the present disclosure and other methods, where False indicates a determination error. Compared with the open - source geometric engine OCCT, the method for detecting and processing the surface self - intersection line provided in the embodiment of the present disclosure has higher topological stability for calculating the self - intersection line trajectory.

[0146] Figure 11 It shows a schematic diagram of the result of the method for eliminating the self - intersection region of the surface provided in the embodiment of the present disclosure. For the case where the self - intersection line only exists in a local region of the surface, this method can effectively eliminate the self - intersection part of the surface.

[0147] The method for detecting and processing the surface self - intersection line provided in the embodiment of the present disclosure constructs a self - intersection discriminant using the surface normal feature and gives a sufficient condition for determining that the surface has no self - intersection. Only through a self - intersection discriminant sequence constructed by the surface control points, the self - intersection situation of the surface can be quickly determined. Then, based on the determination result, the self - intersection line of the surface can be accurately and quickly calculated, ensuring the stability of the self - intersection determination and the topological correctness of the self - intersection line. The method for detecting and processing the surface self - intersection line provided in the embodiment of the present disclosure can be used in, but is not limited to, many fields of computer - aided design such as mesh generation, Boolean operation, and solid shelling, and has high practical application value.

[0148] Based on the same inventive concept, an apparatus for detecting and processing the surface self - intersection line of a three - dimensional model is also provided in the embodiment of the present disclosure, as described in the following embodiments. Since the principle of solving problems in this apparatus embodiment is similar to that of the above - mentioned method embodiment, the implementation of this apparatus embodiment can refer to the implementation of the above - mentioned method embodiment, and the repeated parts will not be elaborated.

[0149] Figure 12 It shows a schematic diagram of an apparatus for detecting and processing the surface self - intersection line of a three - dimensional model in an embodiment of the present disclosure, as Figure 12 shown, the apparatus includes: a surface feature information acquisition module 121, a self - intersection discriminant construction module 122, a self - intersection discriminant sequence extraction module 123, a surface subdivision module 124, a self - intersection line detection module 125, and a recursive processing module 126.

[0150] Among them, the surface feature information acquisition module 121 is used to acquire the surface feature information of the surface to be detected in the three-dimensional model, where the three-dimensional model is a model containing at least one surface created in the three-dimensional virtual space; the self-intersection discriminant construction module 122 is used to construct a self-intersection discriminant according to the surface feature information; the self-intersection discriminant sequence extraction module 123 is used to extract the self-intersection discriminant sequence from the self-intersection discriminant; the surface subdivision module 124 is used to subdivide the surface to be detected according to the self-intersection discriminant sequence to obtain a first surface patch and a second surface patch without overlapping parts, and a third surface patch and a fourth surface patch with overlapping parts; the self-intersection line detection module 125 is used to determine the intersection of the first surface patch and the second surface patch, and perform an intersection operation when the determination is that they intersect; the recursive processing module 126 is used to repeat the above steps for the third surface patch and the fourth surface patch respectively until there is no self-intersection on the surface to be detected or the surface patches obtained by subdivision meet the preset flatness condition.

[0151] In some embodiments, when the surface to be detected is a NURBS surface, the self-intersection discriminant is a mathematical function with spline basis functions as the basis, as shown in the above formula (1). The self-intersection discriminant sequence is the coefficient of the self-intersection discriminant under the basis, as shown in the above formula (6).

[0152] In some embodiments, the above surface subdivision module 124 is further used to: acquire the parameter domain of the surface to be detected, where the parameter domain includes: a first parameter range in the first coordinate axis direction and a second parameter range in the second coordinate axis direction, and the first coordinate axis direction and the second coordinate axis direction are two mutually perpendicular coordinate axis directions; compare the sizes of the first parameter range and the second parameter range; in the coordinate axis direction with the larger parameter range, repeat the following steps to obtain multiple non-adjacent surface patches on the surface to be detected: determine a first threshold and a second threshold, where both the first threshold and the second threshold are between the minimum value and the maximum value of the parameter range in the corresponding coordinate axis direction, and the first threshold is less than the second threshold; subdivide the surface to be detected at the first threshold to obtain a first surface patch and a second surface patch corresponding to the first threshold, where the first surface patch is the surface patch greater than the first threshold, and the second surface patch is the remaining part of the surface to be detected except the first surface patch; subdivide the surface to be detected at the second threshold to obtain a third surface patch and a fourth surface patch corresponding to the second threshold, where the third surface patch is the surface patch less than the second threshold, and the fourth surface patch is the remaining part of the surface to be detected except the third surface patch; determine the second surface patch and the fourth surface patch as two surface patches on the surface to be detected without overlapping parts.

[0153] In some embodiments, the above-mentioned self-intersection line detection module 125 is further configured to: determine whether the axial bounding boxes of two surface patches without overlapping parts on the surface to be detected intersect; if so, construct a control network based on the control points of the two surface patches, calculate the intersection points of the two control networks, and project the intersection points of the two control networks onto the corresponding surface patches to obtain approximate intersection points of the two surface patches; determine the actual intersection points of the two surface patches through the Newton iteration algorithm; and determine the intersection line of the two surface patches according to the actual intersection points of the two surface patches.

[0154] In some embodiments, the above-mentioned recursive processing module 126 is further configured to: for the third surface patch and the fourth surface patch, determine the planes corresponding to the respective surface patches according to the set of control points of each surface patch, where the set of control points includes: a plurality of control points; for the set of control points of each surface patch, calculate the distance from each control point to the corresponding plane, and determine whether the distance is less than a preset threshold, and if so, determine that the surface patch meets the preset flatness condition.

[0155] In some embodiments, the surface self-intersection line detection and processing device for a three-dimensional model provided in the embodiments of the present disclosure further includes: a self-intersection elimination module 127, configured to eliminate the self-intersecting part of the surface to be detected when the self-intersection line only exists in a local area of the surface to be detected. In specific implementation, the self-intersecting part of the surface to be detected can be eliminated by solving an optimization problem with constraints.

[0156] It should be noted here that the various modules in the above device embodiments and the corresponding steps in the method embodiments have the same examples and application scenarios, but are not limited to the content disclosed in the above method embodiments. It should be noted that the above modules, as part of the device, can be executed in a computer system such as a set of computer-executable instructions.

[0157] Those skilled in the art can understand that various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuit", "module" or "system" here.

[0158] Based on the same inventive concept, embodiments of the present disclosure also provide an electronic device, which includes: a processor; and a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the surface self-intersection line detection and processing method of any one of the above through executing the executable instructions. Since the principle of solving problems in this electronic device embodiment is similar to that of the above method embodiment, the implementation of this electronic device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be described again.

[0159] Next, refer to Figure 13The electronic device 800 according to this embodiment of the present disclosure will be described. Figure 13 The displayed electronic device 1300 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0160] As Figure 13 shown, the electronic device 1300 is presented in the form of a general computing device. The components of the electronic device 1300 may include, but are not limited to: at least one of the above-mentioned processing units 1310, at least one of the above-mentioned storage units 1320, and a bus 1330 connecting different system components (including the storage unit 1320 and the processing unit 1310).

[0161] Among them, the storage unit stores program codes, and the program codes can be executed by the processing unit 1310, so that the processing unit 1310 executes the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification. For example, the processing unit 1310 may execute the following steps of the above method embodiment: obtaining surface feature information of a surface to be detected in a three-dimensional model, where the three-dimensional model is a model including at least one surface created in a three-dimensional virtual space; constructing a self-intersection discriminant according to the surface feature information; extracting a self-intersection discriminant sequence from the self-intersection discriminant, and judging whether the surface to be detected has self-intersection according to the self-intersection discriminant sequence; if the surface to be detected has self-intersection, then subdividing the surface to be detected to obtain a first surface patch and a second surface patch without overlapping parts, and a third surface patch and a fourth surface patch with overlapping parts; performing an intersection determination on the first surface patch and the second surface patch, and performing an intersection operation when the determination is that they intersect; respectively repeating the above steps for the third surface patch and the fourth surface patch until it is determined that the surface to be detected has no self-intersection or the surface patches obtained by subdivision meet a preset flatness condition.

[0162] The storage unit 1320 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 13201 and / or a cache storage unit 13202, and may further include a read-only storage unit (ROM) 13203.

[0163] The storage unit 1320 may further include a program / utility 13204 having a set (at least one) of program modules 13205. Such program modules 13205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0164] The bus 1330 can represent one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, an Accelerated Graphics Port, a processing unit, or a local bus using any of the various bus structures.

[0165] The electronic device 1300 can also communicate with one or more external devices 1340 (such as a keyboard, a pointing device, a Bluetooth device, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 1300, and / or communicate with any device that enables the electronic device 1300 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 1350. Moreover, the electronic device 1300 can also communicate with one or more networks (such as a Local Area Network (LAN), a Wide Area Network (WAN), and / or a public network, such as the Internet) through the network adapter 1360. As shown in the figure, the network adapter 1360 communicates with other modules of the electronic device 1300 through the bus 1330. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 1300, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0166] Through the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software, or can be implemented by the way of software combined with necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0167] Based on the same inventive concept, an embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the method for detecting the self-intersection line of the surface of the three-dimensional model in any one of the above. Since the principle of solving the problem in this embodiment of the computer-readable storage medium is similar to that in the above method embodiment, the implementation of this embodiment of the computer-readable storage medium can refer to the implementation of the above method embodiment, and the repeated parts will not be described again.

[0168] More specific examples of the computer-readable storage medium in the present disclosure may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0169] In the present disclosure, the computer-readable storage medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium, and this readable medium may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0170] Optionally, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber cable, RF, etc., or any suitable combination of the above.

[0171] In specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (for example, by connecting through an Internet service provider via the Internet).

[0172] Based on the same inventive concept, an embodiment of the present disclosure also provides a computer program product, including a computer program or instruction, which when executed by a processor implements the method for detecting the self-intersection line of the surface of the three-dimensional model in any one of the above method embodiments. Since the principle of solving the problem in this embodiment of the computer program product is similar to that of the above method embodiment, the implementation of this embodiment of the computer program product may refer to the implementation of the above method embodiment, and the repeated parts will not be elaborated.

[0173] It should be noted that although several modules or units of a device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described modules or units can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0174] In addition, although the steps of the methods in the present disclosure are described in a specific order in the drawings, this does not require or imply that these steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step for execution, and / or one step may be decomposed into multiple steps for execution, etc.

[0175] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the methods according to the embodiments of the present disclosure.

[0176] After considering the specification and practicing the invention disclosed herein, those skilled in the art will readily conceive of other embodiments of the present disclosure. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the appended claims.

Claims

1. A method for detecting and processing self-intersection lines of a three-dimensional model surface, characterized in that: include: Acquiring surface feature information of a surface to be detected in a three-dimensional model, wherein the three-dimensional model is a model created in a three-dimensional virtual space and includes at least one surface; Constructing a self-intersection discriminant according to the surface feature information; Extracting a self-intersection discriminant sequence from the self-intersection discriminant formula, and judging whether the surface to be detected has self-intersection according to the self-intersection discriminant sequence; If the to-be-detected curved surface has self-intersection, subdivide the to-be-detected curved surface to obtain a first curved surface patch and a second curved surface patch without overlapping parts, and a third curved surface patch and a fourth curved surface patch with overlapping parts; Performing an intersection determination on the first curved surface patch and the second curved surface patch, and performing an intersection operation when it is determined that the first curved surface patch and the second curved surface patch intersect; The above steps are repeated for the third curved surface patch and the fourth curved surface patch respectively, until it is determined that the to-be-detected curved surface does not have any self-intersection or the curved surface patch obtained by subdivision satisfies a preset flatness condition.

2. The method for detecting and processing curved self-intersection lines of a three-dimensional model according to claim 1, characterized in that: The surface feature information includes: surface normal feature information and surface partial derivative information. The self-intersection discriminant is expressed as follows: f(u,v)=r u (u,v)×r v (u,v)·n(u0,v0); in, Where n(u0,v0) is the normal vector of the surface to be detected r(u,v) at a fixed parameter (u0,v0), (u0,v0) is any point on the parameter domain of the surface to be detected r(u,v); u (u,v) and r v (u,v) are the partial derivatives of the surface to be detected r(u,v) with respect to u and v respectively; (p,q) represents the degree of the surface r(u,v); w ij represents the weight factor of the surface r(u,v); P ij represents the control points of the surface to be detected r(u,v); the number of control points of the surface to be detected r(u,v) is (n+1)×(m+1), where (n+1) represents the number of control points in the u direction and (m+1) represents the number of control points in the v direction; N i,p (u) and N j,q (v) represents the spline basis function.

3. The method for detecting and processing curved self-intersection lines of a three-dimensional model according to claim 1, characterized in that: The surface to be detected is a NURBS surface, the self-intersection discriminant is a mathematical function based on a spline basis function, and the self-intersection discriminant sequence is the coefficient of the self-intersection discriminant under the basis; Wherein, the self-intersection discriminant is expressed as follows: Where μ1 = 3pn-3p 2 +n+3p+5; μ2=3qm-3q 2 +m+3q+5; Wherein, (p, q) represents the degree of the surface; the number of control points of the surface to be detected is (n+1)×(m+1), where (n+1) represents the number of control points in the u direction, and (m+1) represents the number of control points in the v direction; The self-crossing discriminant sequence is expressed as follows: Among them, for all All satisfy c ij ≥0, it means that the NURBS surface r(u,v) does not have self-intersection.

4. The method for detecting and processing curved self-intersection lines of a three-dimensional model according to claim 1, characterized in that: Subdividing the to-be-detected curved surface to obtain a first curved surface patch and a second curved surface patch without overlapping portions, and a third curved surface patch and a fourth curved surface patch with overlapping portions, including: Acquire a parameter domain of the curved surface to be detected, wherein the parameter domain includes: a first parameter range in a first coordinate axis direction and a second parameter range in a second coordinate axis direction, wherein the first coordinate axis direction and the second coordinate axis direction are two coordinate axis directions perpendicular to each other; Comparing the first parameter range with the second parameter range; In the coordinate axis direction where the parameter range is larger, determining a first threshold and a second threshold, wherein the first threshold and the second threshold are both located between the minimum value and the maximum value of the parameter range in the corresponding coordinate axis direction, and the first threshold is smaller than the second threshold; Subdividing the to-be-detected curved surface at the first threshold to obtain the first curved surface patch and the third curved surface patch, wherein the first curved surface patch is a curved surface patch smaller than the first threshold, and the third curved surface patch is a curved surface patch larger than the first threshold; The to-be-detected curved surface is subdivided at the second threshold to obtain the second curved surface patch and the fourth curved surface patch, wherein the second curved surface patch is a curved surface patch larger than the second threshold, and the fourth curved surface patch is a curved surface patch smaller than the second threshold.

5. The method for detecting and processing curved self-intersection lines of a three-dimensional model according to claim 1, characterized in that: Performing an intersection determination on the first curved surface patch and the second curved surface patch, and performing an intersection operation when the first curved surface patch and the second curved surface patch are determined to be intersected, comprising: Determine whether the axial bounding boxes of the first curved surface patch and the second curved surface patch intersect; If yes, construct a first control network and a second control network respectively according to the control points of the first curved surface patch and the second curved surface patch, calculate the intersection of the first control network and the second control network, and project the intersection of the first control network and the second control network onto the corresponding curved surface patch to obtain the approximate intersection of the first curved surface patch and the second curved surface patch; Determine the actual intersection point of the first curved surface patch and the second curved surface patch by using a Newton iterative algorithm; An intersection line between the first curved surface patch and the second curved surface patch is determined according to actual intersection points between the first curved surface patch and the second curved surface patch.

6. The method for detecting and processing curved self-intersection lines of a three-dimensional model according to claim 1, characterized in that: Repeating the above steps for the third curved surface patch and the fourth curved surface patch respectively until it is determined that the surface to be detected does not have self-intersection or the curved surface patch obtained by subdivision satisfies a preset flatness condition, including: Determine the plane corresponding to each curved surface patch according to the control point set of each curved surface patch, wherein the control point set includes: a plurality of control points; For each set of control points of the curved surface patch, the distance from each control point to the corresponding plane is calculated to determine whether the distance is less than a preset threshold. If so, it is determined that the curved surface patch meets the preset flatness condition.

7. The method for detecting and processing curved self-intersection lines of a three-dimensional model according to any one of claims 1 to 6, characterized in that: The method comprises: When the self-intersection line only exists in a local area of ​​the surface to be detected, the self-intersection part of the surface to be detected is eliminated by solving a constrained optimization problem, which specifically includes: Suppose the target non-self-intersection surface after eliminating the self-intersection part is: in, Representation Surface The control point, w ij represents the weight factor of the surface to be detected r(u,v); (p,q) represents the degree of the surface to be detected r(u,v); The number of control points of the surface to be detected r(u,v) is (n+1)×(m+1), where (n+1) represents the number of control points in the u direction and (m+1) represents the number of control points in the v direction; N i,p (u) and N j,q (v) represents the spline basis function; Calculation surface Self-discriminant sequence Solve the constrained optimization problem and obtain the surface Control Points Then the surface That is, the result after eliminating the self-intersection part of the surface r(u,v) to be detected; The constrained optimization problem is as follows: The constraints are Among them, P ij Represents the control point of the surface r(u,v); Representation Surface control point.

8. A device for detecting and processing self-intersection lines of a three-dimensional model surface, characterized in that: include: A surface feature information acquisition module, used to acquire surface feature information of a surface to be detected in a three-dimensional model, wherein the three-dimensional model is a model created in a three-dimensional virtual space and includes at least one surface; A self-intersection discriminant construction module, used to construct a self-intersection discriminant according to the surface feature information, wherein the self-intersection discriminant is a mathematical function based on a spline basis function; A self-intersection discriminant sequence extraction module, used to extract a self-intersection discriminant sequence from the self-intersection discriminant formula, and judge whether the surface to be detected has self-intersection according to the self-intersection discriminant sequence; A surface subdivision module, configured to subdivide the surface to be detected if there is self-intersection on the surface to be detected, to obtain a first surface patch and a second surface patch without overlapping parts, and a third surface patch and a fourth surface patch with overlapping parts; A self-intersection line detection module, used for determining the intersection of the first curved surface patch and the second curved surface patch, and performing an intersection operation when the intersection is determined; The recursive processing module is used to repeatedly execute the above steps on the third surface patch and the fourth surface patch respectively until it is determined that the surface to be detected does not have self-intersection or the surface patch obtained by subdivision meets a preset flatness condition.

9. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the method for detecting and processing curved self-intersection lines of a three-dimensional model according to any one of claims 1 to 6 by executing the executable instructions.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for detecting and processing the self-intersection lines of a three-dimensional model surface described in any one of claims 1 to 6 is implemented.