A contour mapping method, device, apparatus and storage medium

By breaking the vertices and mapping the plane of the 3D closed contour, combined with intersection elimination processing, a more accurate 2D target mapping contour is obtained, which solves the problem of incomplete geometric model caused by direct projection and improves the accuracy and efficiency of repairing the geometric model.

CN118918296BActive Publication Date: 2026-03-27IND SOFTWARE DIGITAL INNOVATION (GUANGZHOU) CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, the geometric model obtained by directly using the two-dimensional projection method of three-dimensional contours is incomplete and inaccurate, leading to errors in the repair process.

Method used

By acquiring multiple vertices of a 3D closed contour, selecting the initial vertex to disconnect and map onto a plane to form an open contour, performing closure processing, judging and eliminating intersecting regions, and obtaining the target mapped contour.

Benefits of technology

It improves the accuracy and deformation rate of 2D contours, reduces intersection phenomena, and makes the repaired geometric model closer to the real shape, thus improving processing and repair efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118918296B_ABST
    Figure CN118918296B_ABST
Patent Text Reader

Abstract

The application discloses a contour mapping method, device, equipment and storage medium, selects an initial vertex from each first vertex of a three-dimensional closed contour, breaks at the initial vertex to obtain an initial open contour, and the initial vertex becomes two first vertices; maps the first vertex on a plane to obtain each second vertex, groups each second vertex to form a first open contour, and the two second vertices obtained after the initial vertex is changed are not connected; closes the first open contour to obtain a first closed contour; judges whether the first closed contour contains at least two closed areas; if yes, a target area is determined, intersection elimination processing is performed on the target area, a new first closed contour is obtained, and the step of judging whether the first closed contour contains at least two closed areas is returned to be executed; and if no, the first closed contour is taken as a target mapping contour. The target mapping contour obtained by the scheme is more accurate and closer to the real shape of the three-dimensional closed contour.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of contour mapping, and particularly relates to a contour mapping method, device, equipment and storage medium. BACKGROUND

[0002] A geometric model is a low-dimensional manifold embedded in a three-dimensional space, which does not have a regular parameter domain by itself, and the shape is more complex than a two-dimensional graph. In the processing, application, repair and other work of the geometric model, many difficulties will be encountered by the skilled person in the art, and therefore the geometric model is usually parameterized in the processing process. For example, in a scene, there is a hole on the surface of a geometric model, and the hole needs to be supplemented to obtain a complete geometric model. Therefore, a three-dimensional contour corresponding to the hole is obtained, a two-dimensional contour is obtained by projecting the three-dimensional contour, and the two-dimensional contour is used to supplement the hole.

[0003] However, the three-dimensional contour is usually complex, and the two-dimensional contour obtained by the ordinary projection method is quite different from the real plane contour originally corresponding to the three-dimensional contour. If the two-dimensional contour is directly used to supplement the hole, the obtained geometric model will be incomplete and inaccurate. SUMMARY

[0004] Therefore, the present application provides a contour mapping method, device, equipment and storage medium to solve the problem that if the two-dimensional contour is directly used to supplement the hole, the obtained geometric model will be incomplete and inaccurate.

[0005] To achieve the above purpose, the present scheme is as follows:

[0006] In a first aspect, a contour mapping method comprises:

[0007] obtaining a three-dimensional closed contour containing a plurality of first vertices;

[0008] selecting an initial vertex from each of the first vertices, and disconnecting the three-dimensional closed contour at the initial vertex to obtain an initial open contour, and the initial vertex is changed into two first vertices;

[0009] mapping each first vertex of the initial open contour on a plane to obtain each second vertex, and composing each second vertex into a first open contour on the plane;

[0010] performing closed processing on the first open contour to obtain a first closed contour;

[0011] judging whether the first closed contour contains at least two closed regions;

[0012] If yes, a target region is determined from each of the closed regions, and intersection elimination processing is performed on the target region to obtain a new first closed contour, and the step of judging whether the first closed contour contains at least two closed regions is returned to be executed.

[0013] If no, the first closed contour is taken as a target mapping contour.

[0014] In a second aspect, a contour mapping device comprises:

[0015] A three-dimensional closed contour acquisition module is configured to acquire a three-dimensional closed contour containing a plurality of first vertices.

[0016] An initial open contour acquisition module is configured to select an initial vertex from each of the first vertices, and disconnect the three-dimensional closed contour at the initial vertex to obtain an initial open contour, and the initial vertex is converted into two first vertices.

[0017] A first open contour composition module is configured to map each first vertex of the initial open contour on a plane to obtain a second vertex, and compose each second vertex on the plane to obtain a first open contour.

[0018] A closing processing module is configured to perform closing processing on the first open contour to obtain a first closed contour.

[0019] A judging module is configured to judge whether the first closed contour contains at least two closed regions.

[0020] An intersection elimination processing module is configured to, if yes, determine a target region from each of the closed regions, and perform intersection elimination processing on the target region to obtain a new first closed contour, and return to execute the step of judging whether the first closed contour contains at least two closed regions.

[0021] A target mapping contour determination module is configured to, if no, take the first closed contour as a target mapping contour.

[0022] In a third aspect, a contour mapping device comprises a memory and a processor.

[0023] The memory is configured to store a program.

[0024] The processor is configured to execute the program to implement each step of the contour mapping method of the first aspect.

[0025] In a fourth aspect, a storage medium has a computer program stored thereon, and the computer program is executed by a processor to implement each step of the contour mapping method of the first aspect.

[0026] It can be seen from the above technical solution that the application obtains a three-dimensional closed contour containing a plurality of first vertices; selects an initial vertex from each of the first vertices, and disconnects the three-dimensional closed contour at the initial vertex to obtain an initial open contour, and the initial vertex is converted into two first vertices; maps each first vertex of the initial open contour on a plane to obtain each second vertex, and each second vertex is composed into a first open contour on the plane; performs closed processing on the first open contour to obtain a first closed contour; determines whether the first closed contour contains at least two closed regions; if yes, determines a target region from each of the closed regions, and performs intersection elimination processing on the target region to obtain a new first closed contour, and returns to perform the step of determining whether the first closed contour contains at least two closed regions; if no, the first closed contour is taken as a target mapping contour. In the above scheme, the application first obtains a three-dimensional closed contour containing a plurality of first vertices, then selects an initial vertex, disconnects the three-dimensional closed contour at the initial vertex, maps each second vertex after the disconnection, connects the mapped second vertices, and does not connect the two second vertices corresponding to the two first vertices converted from the initial vertex after mapping. Therefore, in the process of composing the first open contour, each second vertex is not constrained by the original closed contour, so that the accuracy of the obtained first open contour is relatively high. The first closed contour obtained by closed processing of the first open contour is more similar to the three-dimensional closed contour as a whole. Since the three-dimensional closed contour is a spatial geometric figure with a complex shape and involves a plane domain, the first closed contour may have an intersection phenomenon. Therefore, the first closed contour needs to be judged. If the first closed contour contains at least two closed regions, it indicates that the first closed contour has an intersection phenomenon, and intersection elimination processing is performed on the first closed contour. Considering that there may be more than one intersection region range in the first closed contour, intersection elimination processing is performed in sequence. In the process of performing intersection elimination processing on a closed region, other closed regions disappear with the elimination of the closed region. Therefore, after the elimination of a closed region (i.e., a target region), it is determined whether the first closed contour contains at least two closed regions, until the first closed contour does not contain a closed region. The finally obtained first closed contour is the target mapping contour. It can be understood that the first closed contour itself does not belong to the closed region defined by the application.

[0027] Therefore, the target mapping contour obtained by using the contour mapping method provided in the scheme is more accurate than the two-dimensional contour obtained by the ordinary projection method or direct mapping, has a lower deformation rate compared with the real two-dimensional contour of the three-dimensional closed contour, and has no intersection phenomenon, and is closer to the real shape of the three-dimensional closed contour, so that the target mapping contour is applied to the geometric model corresponding to the three-dimensional closed contour, which is more conducive to the processing and repair of the geometric model by the staff, and can improve the work efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the provided drawings.

[0029] Figure 1 An optional flowchart of a contour mapping method provided in the embodiments of the present application;

[0030] Figure 2 A geometric model schematic diagram provided in the embodiments of the present application;

[0031] Figure 3 A structure schematic diagram of a first open contour provided in the embodiments of the present application;

[0032] Figures 4 to 6 A structure schematic diagram of a first closed contour provided in the embodiments of the present application;

[0033] Figure 7 A structure schematic diagram of a two-dimensional contour provided in the embodiments of the present application;

[0034] Figure 8 A structure schematic diagram of a target mapping contour provided in the embodiments of the present application;

[0035] Figure 9 A structure schematic diagram of a complete geometric model provided in the embodiments of the present application;

[0036] Figures 10 to 14 A structure schematic diagram of a first closed contour provided in the embodiments of the present application;

[0037] Figure 15 A structure schematic diagram of a contour mapping device provided in the embodiments of the present application;

[0038] Figure 16 A structure schematic diagram of a contour mapping device provided in the embodiments of the present application; DETAILED DESCRIPTION

[0039] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort fall within the scope of the present application.

[0040] The embodiment of the present application provides a contour mapping method, which can be applied in various computer terminals or intelligent terminals, and the execution subject can be a processor or a server of the computer terminal or the intelligent terminal. The method flowchart of the method is as shown in Figure 1 The method specifically comprises the following steps.

[0041] S1: Obtain a three-dimensional closed contour containing a plurality of first vertices.

[0042] The three-dimensional closed contour in the present application is not a planar contour. It can be an arbitrary three-dimensional geometric figure, such as a football, which has a hole on the surface. The contour of the hole on the surface of the football is a three-dimensional closed contour. For example, an irregular piece of surface is cut off from a swimming ring, as shown in Figure 2 The contour of the missing part on the surface of the swimming ring is a three-dimensional closed contour.

[0043] It can be understood that the shape of the three-dimensional closed contour is different, and the overall contour is relatively complex. In order to better map the three-dimensional closed contour, the three-dimensional closed contour to be mapped in the present application contains a plurality of vertices as the first vertices. The vertices can be marked and divided after obtaining the spatial contour, such as setting a vertex at a position where an angle is generated in the spatial contour. Therefore, the spatial contour with a plurality of first vertices can be obtained as the three-dimensional closed contour in the present application.

[0044] The present application sets a vertex at a position where an angle is generated in order to better describe the three-dimensional closed contour. At the same time, the two-dimensional contour obtained after mapping can also be more accurately corresponding to the three-dimensional closed contour through the vertex, and will not affect the subsequent processing of the two-dimensional contour due to the complexity of the three-dimensional closed contour itself.

[0045] S2: Select an initial vertex from each of the first vertices, and disconnect the three-dimensional closed contour at the initial vertex to obtain an initial open contour, and the initial vertex is changed into two first vertices.

[0046] In each of the first vertices in the three-dimensional closed contour, an initial vertex is selected, which can be any first vertex, and the embodiment does not limit the initial vertex. The three-dimensional closed contour is disconnected at the position of the initial vertex, and the three-dimensional closed contour becomes an open three-dimensional contour without closure, i.e., an initial open contour, which can also be described as a three-dimensional line segment having a start point and an end point. The initial start point also becomes two first vertices, which are the start point and the end point of the initial open contour.

[0047] S3: mapping each of the first vertices of the initial open contour on a plane to obtain each second vertex, and combining each of the second vertices on the plane to form a first open contour; wherein in the first open contour, the two second vertices obtained by mapping the initial vertex are not connected.

[0048] A blank plane can be first set, each of the first vertices of the initial open contour is mapped on the plane to obtain each second vertex. In this process, one first vertex corresponds to one second vertex. Since the initial open contour has a complex shape, if two or more first vertices have the same second vertex after mapping, the multiple second vertices will not become one second vertex, that is, the number of second vertices is equal to the number of first vertices, and each first vertex corresponds to one second vertex.

[0049] The three-dimensional closed contour is disconnected in the application, so that each of the first vertices contained in the three-dimensional closed contour will not be constrained by the closure of the contour in the subsequent processing process. Thus, the mapped second vertices can be more accurately matched with the first vertices, and the first open contour formed by the more accurate second vertices will be more accurate.

[0050] After obtaining each of the second vertices, each of the second vertices needs to be combined to form a first open contour. In the combination process, a reasonable connection order can be set for each second vertex. According to the connection order, each second vertex is connected by a straight line, and the two second vertices corresponding to the start point and the end point mentioned in step S2 are not connected. Thus, an open contour is obtained.

[0051] In an example, as shown in FIG. 2, the three-dimensional closed contour is disconnected at the initial vertex, and the three-dimensional closed contour becomes an initial open contour. Figure 3 Figure 3 ​The outline in the diagram is the first open outline, which contains seven second vertices: second vertex 1, second vertex 2, second vertex 3, second vertex 4, second vertex 5, second vertex 6, and second vertex 7. Second vertex 1 and second vertex 7 can be understood as the start and end points of this first open outline. Before the first open outline is formed, there are no connections between the second vertices. During the combination process, second vertex 1 can be used as the starting point, and second vertices 2, 3, 4, 5, 6, and 7 can be connected sequentially, in the order of second vertex 1 to second vertex 7. However, second vertex 1 and second vertex 7 are not connected. This is how the outline is formed. Figure 3 The first open profile shown.

[0052] S4: Close the first open contour to obtain the first closed contour.

[0053] Since this application ultimately requires a closed two-dimensional contour to fill the geometric model or for other applications, after obtaining the first open contour in step S3, it is also necessary to close the first open contour.

[0054] Optionally, the start and end points mentioned in step S2 can be merged into a single vertex. During this merging process, the other second vertices will also move, and their original positions may change. The positions of the edges between the second vertices may also change, thus transforming the first open contour into a closed contour. Continuing with the example above, Figure 3 The first open profile shown, after being closed, becomes as follows: Figure 4 The first closed contour shown is in Figure 4 In the diagram, the original second vertices 1 and 7 are merged into a new merge point. Because merging second vertices 1 and 7 causes other second vertices to move, it can be seen that the positions of second vertices 2, 3, 4, 5, and 6 have all changed. However, from an overall perspective... Figure 3 The first open outline and Figure 4 The first closed contours are still quite similar.

[0055] S5: Determine whether the first closed contour contains at least two closed regions.

[0056] This step is used to determine whether there is an intersection (self-intersection) phenomenon in the first closed contour. It can be understood that if the final target mapping contour is more accurate, has a lower deformation rate, and matches the geometric model corresponding to the three-dimensional closed contour better, there should be no intersection phenomenon in the target mapping contour. That is to say, the target closed region has no other closed regions inside it except for itself.

[0057] As Figure 5 shown in Figure 5 , A is a first closed contour, b and c are both closed regions of the first closed contour, and the first closed contour itself is not a closed region, so the number of closed regions contained in the first closed contour is 2; please refer to Figure 6 , in Figure 6 , D is a first closed contour, e, f and g are all closed regions of the first closed contour, and only the region without other closed regions inside is a closed region in this application, such as the region composed of e and f is not a closed region of the first closed contour, so the number of closed regions contained in the first closed contour is 3; the first closed contour shown in the above Figure 4 does not contain a closed region inside.

[0058] S6: if yes, determine a target region from each of the closed regions, and perform intersection elimination processing on the target region to obtain a new first closed contour, and return to execute the step of judging whether the first closed contour contains at least two closed regions.

[0059] S7: if no, take the first closed contour as a target mapping contour.

[0060] In this application, the target mapping contour obtained is a closed contour.

[0061] If the first closed contour contains at least two closed regions, the closed regions need to be eliminated, and after elimination, the intersection phenomenon of the first closed contour disappears. In the elimination process, elimination needs to be performed in turn, so first determine a target region from each of the closed regions, and perform intersection elimination processing on the target region, and after the processing is completed, the number of closed regions contained in the new first closed contour needs to be determined again. In the process of processing this target region, other closed regions may disappear with the elimination of the target region, so after obtaining the new first closed contour, steps S5-S7 need to be executed in a loop, that is, return to execute step S5 until this loop process can jump directly from step S5 to step S7, that is, the last obtained first closed contour does not contain a closed region, so the last obtained first closed contour can be taken as a target mapping contour.

[0062] In the above scheme, the present application first obtains a three-dimensional closed contour containing a plurality of first vertices, then selects an initial vertex, and disconnects the three-dimensional closed contour at the initial vertex. After the disconnection, the second vertices are mapped and connected. Meanwhile, the two second vertices corresponding to the two first vertices obtained by transforming the initial vertex are not connected after the mapping. In this way, the second vertices can not be constrained by the original closed contour during the formation of the first open contour, so the accuracy of the first open contour obtained is relatively high. The first closed contour obtained after the closure of the first open contour is more similar to the three-dimensional closed contour as a whole. Since the three-dimensional closed contour is a spatial geometric figure with a complex shape and involves many planar domains, the first closed contour may have an intersection phenomenon. Therefore, the first closed contour needs to be judged. If it contains at least two closed regions, it means that the first closed contour has an intersection phenomenon, and the intersection elimination process is performed. Considering that there may be more than one intersection region in the first closed contour, the intersection elimination process is performed sequentially. During the intersection elimination process of a closed region, other closed regions may disappear with the elimination of this closed region. Therefore, after eliminating a closed region (i.e., a target region), the process of judging whether the first closed contour contains at least two closed regions is restarted. Until the first closed contour does not contain a closed region, the final first closed contour is the target mapping contour. It can be understood that the first closed contour itself is not a closed region defined in the present application.

[0063] Therefore, the target mapping contour obtained by the contour mapping method provided in the present application is more accurate than the two-dimensional contour obtained by ordinary projection or direct mapping. Compared with the true two-dimensional contour of the three-dimensional closed contour, the deformation rate is lower, and there is no intersection phenomenon, which is closer to the true shape of the three-dimensional closed contour. Therefore, applying the target mapping contour to the geometric model corresponding to the three-dimensional closed contour is more conducive to the processing and repair of the geometric model by the staff, and can improve the work efficiency.

[0064] Following Figure 2 The three-dimensional closed contour in the example directly maps a two-dimensional contour as shown in Figure 7 As can be seen, the shape is relatively distorted, and the difference with the true two-dimensional contour corresponding to the three-dimensional closed contour is large, and the difference with the three-dimensional closed contour itself is also large, and there is a self-intersection phenomenon, which causes the mapping to lose the one-to-one correspondence property. The target mapping contour obtained by using the contour mapping method provided in the present application is as shown in Figure 8As shown, it can be seen that the target mapping contour shape is clear, high in accuracy, similar to the three-dimensional closed contour, and free of self-intersections, so that after it is supplemented on the partially missing swimming ring, it is perfectly combined with the missing content of the swimming ring, and a complete and accurate swimming ring is obtained, as shown in Figure 9 .

[0065] In addition, the contour mapping method provided in the application can also be applied to a surface reparameterization process, a surface fitting process, and the like.

[0066] The process of forming the first open contour on the plane by the second vertices is specifically described as follows:

[0067] determining a first angle value at each first vertex in the three-dimensional closed contour;

[0068] determining a distance between each two first vertices in the three-dimensional closed contour;

[0069] taking the second vertex mapped from one of the first vertices in the initial vertex transformation as a starting vertex, and taking the second vertex mapped from the other first vertex as an ending vertex;

[0070] connecting the starting vertex, the other second vertices, and the ending vertex in sequence with straight lines according to the positional relationship between the first vertices in the three-dimensional closed contour, to form a contour line;

[0071] correcting the contour line based on the first angle value at each first vertex in the three-dimensional closed contour and the distance between each two first vertices, to obtain a first open contour.

[0072] Specifically, the distance between two first vertices refers to the straight-line distance between the two first vertices, rather than the length of the contour between the two first vertices.

[0073] In the above process, the second vertices can be connected to form a contour line first. In order to improve the similarity of the contour line to the three-dimensional closed contour, the positional relationship between the first vertices in the three-dimensional closed contour and the positional relationship between each two first vertices need to be referred to in the connecting process, so that the second vertices can be correctly connected. However, the contour line formed at this time is only a preliminary contour shape, which still has some difference from the three-dimensional closed contour, and therefore the first angle value at each first vertex in the three-dimensional closed contour and the distance between each two first vertices need to be considered to correct and adjust the contour line, so that the accuracy of the obtained first open contour is higher.

[0074] Optionally, the profile line is modified based on the first angle value at each first vertex of the three-dimensional closed contour and the distance between each two first vertices to obtain a first open contour, and the operation process is specifically as follows:

[0075] determining the second angle value at each second vertex of the profile line and the distance between each two second vertices;

[0076] corresponding each second vertex of the profile line to each first vertex of the three-dimensional closed contour one by one;

[0077] modifying the second angle value at each second vertex corresponding to each first vertex based on the first angle value at the first vertex, and modifying the distance between each two second vertices of the profile line to the distance between the two first vertices corresponding to the two second vertices to form a first open contour.

[0078] Specifically, the profile line is modified in a manner that the second angle value at the second vertex is similar to the first angle value at the corresponding first vertex, and the distance between the two second vertices is the same as the distance between the two first vertices corresponding to the two second vertices, so as to ensure the similarity, so that not only the position of the second vertex can be ensured, but also the positional relationship and the angle relationship between each two second vertices can be ensured.

[0079] It should be noted that the three-dimensional closed contour is a closed space contour, and the two-dimensional contour finally obtained by the present application is also closed, so the first open contour obtained in the above step still needs to be closed. Considering that the closed contour is a planar polygon, it needs to follow the property of the sum of internal angles of a planar polygon, that is, the sum of internal angles of an n-sided polygon is equal to (n-2)·π. In order to ensure that the target mapping contour obtained finally can be more true and accurate, the present step makes preparations for the closing process in advance. It can be understood that for a three-dimensional closed contour with a particularly complex spatial shape, it cannot be completely required that the second angle value of the mapped contour line is equal to the corresponding first angle value, because if it is required that each angle value in the three-dimensional closed contour is equal to each corresponding angle value in the contour line, then the angle values at the starting point and the ending point of the closed contour obtained subsequently will deviate too much from the angle values of the corresponding first vertex in the three-dimensional closed contour, and the shape is also unreasonable compared with the true two-dimensional contour of the three-dimensional closed contour. Therefore, in the process of correcting the second angle, the property of the sum of internal angles of a planar polygon is used as a constraint condition in advance, and the first angle value at each first vertex is used to correct the second angle value at each corresponding second vertex, so that the first open contour obtained after correction is reasonable as a whole, and the second vertex can be corresponded to the corresponding first vertex, and the difference between each second angle value of the first open contour and each corresponding first angle value of the three-dimensional closed contour is balanced. In this way, when closing subsequently, the angle values and distances of the first open contour will not change too much.

[0080] In the above process, an angle value transformation function is defined, which is a monotonically increasing function. The transformation range of the angle transformation function is: [0, 2π]→[0, 2π], which means that the first angle value at each first vertex in the three-dimensional closed contour belongs to [0, 2π], and the second angle value at each second vertex obtained by mapping from the three-dimensional closed contour belongs to [0, 2π]. The second angle value at the second vertex can be represented by the angle value transformation function, let f(θ i )=θ i '; where θ i represents the first angle value at the first vertex, i represents the first vertex, and θ' i represents the second angle value at the mapped second vertex. At the same time, the second angle values at the second vertex need to satisfy the above-mentioned internal angle sum property, so: where n is the number of first vertices in the three-dimensional closed contour.

[0081] The process of closing the first open contour in the present application to obtain the first closed contour is described in detail below.

[0082] determining a profile start point and a profile end point in each second vertex of the first open profile;

[0083] calculating a position deviation between the profile start point and the profile end point;

[0084] calculating a to-be-moved position parameter of each second vertex other than the profile start point and the profile end point according to the position deviation;

[0085] fixing the profile start point and the profile end point, moving each second vertex other than the profile start point and the profile end point according to the to-be-moved position parameter, and coinciding the profile end point with the profile start point to obtain a first closed profile.

[0086] Specifically, during the closing process, the profile end point is mainly moved, but since the profile end point and each second vertex are sequentially connected, if the profile end point is moved, each second vertex may also be moved, and the distance and direction of the movement are uncertain.

[0087] The above process can also be understood as calculating a position change parameter of each second vertex other than the profile start point and the profile end point under a preset first movement rule according to the position deviation, wherein the position change parameter is the to-be-moved position parameter. The first movement rule is to fix the profile start point, move the profile end point and each second vertex, and coincide the profile end point with the profile start point. Alternatively, the profile end point can be fixed, and the profile start point and each second vertex can be moved until the profile start point is moved to the profile end point. The profile start point is fixed to quantify the movement data of the profile end point, i.e., the position deviation, which can be accurately obtained. Then, the movement data of each second vertex, i.e., the to-be-moved position parameter, can be accurately obtained according to the position deviation.

[0088] The specific process of calculating the to-be-moved position parameter of each second vertex other than the profile start point and the profile end point according to the position deviation includes:

[0089] determining the position of each second vertex in the first open profile, and dividing the first open profile into sub-profiles according to the position of each second vertex;

[0090] converting each sub-profile into a local matrix;

[0091] summarizing each local matrix into a global matrix corresponding to the first open profile;

[0092] establishing a one-dimensional array according to the position deviation;

[0093] calculating a target displacement vector based on the global matrix and the one-dimensional array;

[0094] determining the position parameters of the second vertices other than the profile start point and the profile end point to be moved according to the target displacement vector.

[0095] Specifically, the first open profile can be converted into a beam element model, which is a physical model used to simulate beam structures, generally used in finite element analysis, which is usually composed of linear or nonlinear materials, and can simulate the stress behaviors of bending, torsion, tension, compression, etc. of the beam. The converted beam element model is solved by finite element method using the position deviation between the profile start point and the profile end point, wherein the converted beam element model is divided into multiple planar beam elements, and the number of second vertices is divided, that is, in the first open profile, every two second vertices and the part of the profile between the two second vertices constitute a planar beam element, so the number of planar beam elements is equal to the number of second vertices minus 1. A planar beam element has two endpoints, and each endpoint has three degrees of freedom, which can also be understood as three variables, namely axial deformation, vertical offset and rotation angle around the normal direction of the plane, so a planar beam element has six variables. The position parameters of each second vertex to be moved can be represented by these three variables, and the position deviation between the profile start point and the profile end point is also represented by three variables.

[0096] Then the local matrix can be represented by the stiffness matrix, which can be represented by the following formula:

[0097]

[0098] wherein K e represents the stiffness matrix, E is the elastic modulus, E = 2 x 10 5 , I Z is the cross-sectional inertia, A is the cross-sectional area of the first open profile, and a is half the length of the sub-profile.

[0099] After obtaining each local matrix, each local matrix can be summarized into a large matrix, i.e. a global matrix, and the summary method is to sort each sub-profile according to the position of each second vertex in the first open profile, such as the sub-profile composed of the second vertex connected with the profile start point and the profile start point as the first position of the sorting, and the sub-profile composed of the second vertex connected with the profile end point and the profile end point as the last position of the sorting; then for each sub-profile, a transformation matrix P corresponding to the sub-profile is constructed according to the position and angle of the sub-profile in the first open profile, and the transpose matrix P T of the transformation matrix P is calculated, and the local matrix K e corresponding to the sub-profile is multiplied by the transformation matrix P and the transpose matrix P TK e P T K e P, to get a new matrix K e '; then a blank large matrix K m is established, and then each new matrix K e ' corresponding to each sub-contour is filled into the blank large matrix in turn, and the filling order of each new matrix K e ' is the above-mentioned sorting order of the sub-contours, and it should be noted that the new matrix K e ' placed in the first position is placed in the 1st-6th row and 1st-6th column of the matrix, the new matrix K e ' placed in the second position is placed in the 4th-9th row and 4th-9th column of the large matrix, that is, the first two new matrices K e ' are placed in the large matrix, and a 3x3 matrix range is overlapped, and the reason for placing them in this way is that two adjacent plane beam elements share an end point, and the new matrix K e ' placed in the last position is placed in the same way, and finally a global matrix, i.e., a global stiffness matrix, is obtained; then the right-hand side term V, i.e., a one-dimensional array, is set according to the position deviation, and finally K m ·X = V, and the obtained X is the target displacement vector, which contains the moving position parameters of each second vertex except the starting point and the ending point of the contour.

[0100] In an example, the edge between every two second vertices is taken as a contour edge, the number of contour edges of the first open contour is m, and then the number of second vertices is m+1, so V and the obtained X are both vectors with a length of 3x(m+1), and K m is a 3x(m+1) row and 3x(m+1) column matrix. When the contour ending point is moved, the mth second vertex adjacent to the contour ending point will be affected through the above-mentioned overlapped 3x3 matrix range, and then this second vertex moves, and this second vertex will drive the m-1th second vertex adjacent to it to move, and so on.

[0101] Optionally, the process of determining the target region from each of the closed regions in the application comprises: determining the area of each of the closed regions; comparing the sizes of the areas of each of the closed regions, and taking the closed region with the smallest area as the target region.

[0102] Specifically, since there can be various cases of the number of closed regions contained by the first closed contour, some closed regions can disappear with the elimination of other closed regions in the process of processing each closed region, but in order to ensure the stability of the whole first closed contour, the processing of eliminating each closed region should not affect other closed regions as much as possible, therefore, the present application limits the selection of the target region, and the closed region with the smallest area is selected as the target region, so as to perform intersection elimination processing.

[0103] Further, in the first closed contour, other ranges around the target region are closely related to the target region, and if the target region is to be eliminated, the other ranges will be affected, so it is necessary to determine the other closed regions related to the target region, and more accurately, it is necessary to determine the other closed regions intersecting with the target region. It should be noted that the closed region intersecting with the target region defined in the present application refers to the closed region having only one intersection point with the target region, that is, it can be considered that each closed region is composed of countless points (which are not the first vertex or the second vertex mentioned in the present application), and if the target region and a closed region have only one common point (they have only one intersection point), it can be considered that the target region intersects with the closed region. In addition, the intersection of the target region and the closed region can also be referred to as the connection of the target region and the closed region, or the point connection (direct point connection) of the target region and the closed region.

[0104] Since different three-dimensional closed contours have different shapes, the shapes of the first closed contours obtained from different three-dimensional closed contours are also different, the number of closed regions is different, and the number of closed regions intersecting with the target region is also different, so the following three cases are described respectively.

[0105] First, in each closed region of the first closed contour, the number of closed regions intersecting with the target region is determined:

[0106] (I) In each closed region of the first closed contour, if the number of closed regions intersecting with the target region is one, the edge between each two second vertices in the first closed contour is taken as a contour edge, the intersection point between the target region and the intersecting closed region is determined, the contour edge at the intersection point is taken as an intersecting contour edge, and the target region is processed by intersection elimination according to the intersection point and the intersecting contour edge, to obtain a new first closed contour.

[0107] The process of processing the target region by intersection elimination according to the intersection point and the intersecting contour edge to obtain a new first closed contour can specifically include:

[0108] The second vertexes at both ends of each of the intersecting contour edges are taken as third vertexes; one of the third vertexes is randomly selected as a target point, another third vertex which belongs to the same intersecting contour edge as the target point is taken as a first corresponding point of the target point; another third vertex which belongs to the same closed region as the target point is taken as a second corresponding point of the target point; another third vertex except the target point, the first corresponding point and the second corresponding point is taken as a third corresponding point of the target point; each of the intersecting contour edges is deleted from the first closed region, and the target point and the third corresponding point are connected, and the first corresponding point and the second corresponding point are connected to form a new first closed contour. Specifically, the intersecting contour edges actually include two, and the second vertexes at both ends of each of the two intersecting contour edges are located in the target region and the closed region respectively, so the four second vertexes at both ends of the two intersecting contour edges are taken as third vertexes.

[0109] In one example, as Figure 10 indicated, Figure 10 represents a first closed contour, which contains nine second vertexes, and contains two closed regions: closed region 1 and closed region 2, wherein the closed region 1 is the target region, and it can be known from the figure that the closed region intersecting with the target region is the closed region 2, and the intersecting contour edges are the contour edge L between the second vertex 11 and the second vertex 22, and the contour edge M between the second vertex 12 and the second vertex 21, so the second vertexes at both ends of the contour edge L are the second vertex 11 and the second vertex 22, and the second vertexes at both ends of the contour edge M are the second vertex 12 and the second vertex 21, and the four second vertexes are taken as third vertexes, and one of the third vertexes is randomly selected as a target point, such as the second vertex 11, and another third vertex which belongs to the same intersecting contour edge as the second vertex 11 is the second vertex 22 (the first corresponding point), and another third vertex which belongs to the same closed region as the second vertex 11 is the second vertex 12 (the second corresponding point), and then the remaining one of the four is the third corresponding point (the second vertex 21), so the two intersecting contour edges are deleted, and the second vertex 11 and the second vertex 21 are connected, and the second vertex 22 and the second vertex 12 are connected to form a new first closed contour, and the new first closed contour is as Figure 11 indicated, and it can be known from Figure 11 that the new first closed contour does not contain a closed region, so the new first closed contour can be taken as a target mapping contour.

[0110] (ii) If the number of the closed regions intersecting with the target region is two, the area of the target region and the total area of the first closed contour are obtained, the ratio of the area of the target region to the total area is calculated, and the target region is eliminated based on the ratio to obtain a new first closed contour.

[0111] Specifically, if the ratio is less than a preset proportion threshold, two boundary lines between the two intersection points on the contour boundary of the target region are determined, one of the boundary lines is selected at random, and the selected boundary line is moved towards the other boundary line until the target region disappears, and the movement is stopped to obtain a new first closed contour. If the ratio is not less than the proportion threshold, the target region and the intersecting closed regions are taken as intersection regions, for each intersection region, the target region and the intersection region are taken as a new first closed contour, and the step of determining the number of the closed regions intersecting with the target region in each closed region of the first closed contour is performed again.

[0112] The proportion threshold can be set to 0.2, and the embodiment is not limited thereto. In the above scheme, two different intersection elimination methods are set according to the size of the ratio, and the purpose is to minimize the impact on the range of other regions of the first closed contour when eliminating the closed region.

[0113] If the ratio is less than the proportion threshold, it indicates that the range of the target region in the entire first closed contour is very small, and therefore the method of pulling the contour boundary of the first closed contour can be adopted to make the target region disappear. Although pulling the contour boundary also moves other second vertices, the impact is small, and the overall change of the first closed contour is small.

[0114] If the ratio is not less than the proportion threshold, it indicates that the range of the target region in the entire first closed contour is not small, and therefore if the pulling method is adopted, the range of other regions of the first closed contour will be greatly affected if the target region is to disappear, such as the angle value at each second vertex, the length between each two second vertices, etc. will change greatly, so the intersection elimination method adopted when there is only one intersection point can be selected to split the target region and its corresponding two closed regions into two first closed contours, and then the elimination processing is performed again.

[0115] In one example, refer to Figure 12 , Figure 12The whole profile shown is a first closed profile, wherein the ratio of the area of the target region to the total area is less than a proportion threshold, the closed region intersecting the target region has two, and as two intersecting regions, the two intersecting regions are respectively on two sides of the target region, and each has an intersection point with the target region, and there are two boundary lines between the two intersection points: boundary line 1 and boundary line 2. Arbitrarily select a boundary line, such as boundary line 2, and move boundary line 2 towards boundary line 1. Specifically, a point can be randomly selected on boundary line 1, and a vertical line can be drawn at the point on the straight line. Then, boundary line 2 is moved along the vertical line towards boundary line 1. The moving direction is shown by the arrow in the figure. It can be considered that a force is applied to boundary line 2. During the movement, the first closed profile as a whole will also change slightly. The new first closed profile obtained after movement is shown in Figure 13 .

[0116] In another example, referring to Figure 14 , Figure 14 The whole profile shown is also a first closed profile, wherein the ratio of the area of the target region to the total area is not less than a proportion threshold. Then, the whole of the target region and one of the intersecting regions is taken as a new first closed profile, and the whole of the target region and the other intersecting region is also taken as a new first closed profile. For example, the profile in the dashed box in the figure is a new first closed profile.

[0117] (Three) In each closed region of the first closed profile, if the number of closed regions intersecting the target region is greater than two, the closed regions intersecting the target region are taken as intersecting regions. For each intersecting region, the target region and the intersecting region are taken as a new first closed profile, and the step of determining the number of closed regions intersecting the target region in each closed region of the first closed profile is returned to be executed.

[0118] If the number of closed regions intersecting the target region is greater than two, it can be considered that the three-dimensional closed profile is relatively complex in shape. Then, the method used when the number is two can be referred to for elimination processing. The whole of the target region and each intersecting region is taken as a new first closed profile, and then processed respectively. Here, no further description is given.

[0119] Further, if the three-dimensional profile shape obtained at the beginning of the scheme is particularly complex and contains a large number of first vertices, in order to make the mapping process more concise, a part of the first vertices can be appropriately selected and composed into a three-dimensional closed profile actually used for mapping, such as sampling. In this way, the mapping process can be accelerated and the efficiency can be improved. In addition, after the closed regions are eliminated, the shape of the target mapping profile obtained may not be smooth. In order to make the shape more reasonable and smooth, and to better fit the geometric model, smoothing processing can be performed on part or the whole of the target mapping profile.

[0120] With Figure 1 Corresponding to the method, the embodiment of the application further provides a contour mapping device for mapping a three-dimensional closed contour to a two-dimensional open contour. Figure 15 In the specific implementation of the method, the contour mapping device provided by the embodiment of the application can be in a computer terminal or various mobile devices, and can be combined with Figure 1 The contour mapping device is introduced as follows. Figure 15 As shown in FIG. 1, the device can include:

[0121] A three-dimensional closed contour acquisition module 10 is configured to acquire a three-dimensional closed contour containing a plurality of first vertices.

[0122] An initial open contour acquisition module 20 is configured to select an initial vertex from the first vertices, and disconnect the three-dimensional closed contour at the initial vertex to obtain an initial open contour, and meanwhile, the initial vertex is converted into two first vertices.

[0123] A first open contour composition module 30 is configured to map each first vertex of the initial open contour on a plane to obtain a second vertex, and compose a first open contour by using each second vertex on the plane.

[0124] A closed processing module 40 is configured to perform closed processing on the first open contour to obtain a first closed contour.

[0125] A judging module 50 is configured to judge whether the first closed contour contains at least two closed areas.

[0126] An intersection elimination processing module 60 is configured to, if yes, determine a target area from each closed area, perform intersection elimination processing on the target area to obtain a new first closed contour, and return to the step of judging whether the first closed contour contains at least two closed areas.

[0127] A target mapping contour determination module 70 is configured to, if no, take the first closed contour as a target mapping contour.

[0128] In the above scheme, the present application first obtains a three-dimensional closed contour containing a plurality of first vertices, then selects an initial vertex, and disconnects the three-dimensional closed contour at the initial vertex. After the disconnection, each second vertex is mapped, and after the mapping, the two second vertices corresponding to the two first vertices obtained by transforming the initial vertex are connected. In this way, in the process of forming the first open contour, each second vertex is not constrained by the original closed contour, so the accuracy of the obtained first open contour is relatively high. The first closed contour obtained after the first open contour is closed is more similar to the three-dimensional closed contour as a whole. Since the three-dimensional closed contour is a spatial geometric figure with a complex shape and involves a large number of planar domains, the first closed contour may have an intersection phenomenon. Therefore, the first closed contour needs to be judged. If it contains at least two closed regions, it means that the first closed contour has an intersection phenomenon, and the intersection elimination process is performed. Considering that there may be more than one intersection region in the first closed contour, the intersection elimination process is performed in sequence. In the process of eliminating one closed region, other closed regions disappear with the elimination of the closed region. Therefore, after eliminating one closed region (i.e., the target region), it is determined whether the first closed contour contains at least two closed regions. Until the first closed contour does not contain a closed region, the final first closed contour is the target mapping contour. It can be understood that the first closed contour itself is not a closed region defined in the present application.

[0129] Therefore, the target mapping contour obtained by the contour mapping method provided by the present application is more accurate than the two-dimensional contour obtained by the ordinary projection method or direct mapping. Compared with the true two-dimensional contour of the three-dimensional closed contour, the deformation rate is lower, and there is no intersection phenomenon, which is closer to the true shape of the three-dimensional closed contour. Therefore, the target mapping contour is more beneficial to the processing and repair of the geometric model by the staff, and can improve the work efficiency.

[0130] Further, the present application provides a contour mapping device. Optionally, Figure 16 The hardware structure diagram of the contour mapping device is shown, and the hardware structure of the contour mapping device can include at least one processor 01, at least one communication interface 02, at least one memory 03, and at least one communication bus 04. Figure 16

[0131] In the present application, the number of processors 01, communication interfaces 02, memories 03, and communication buses 04 is at least one, and the processors 01, communication interfaces 02, and memories 03 communicate with each other through the communication bus 04. ​

[0132] The processor 01 can be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application, etc.

[0133] The memory 03 can include a high-speed RAM memory, and can also include a non-volatile memory, such as at least one disk memory, etc.

[0134] The memory stores a program, and the processor can call the program stored in the memory, and the program is used to execute the following contour mapping method, comprising:

[0135] Obtaining a three-dimensional closed contour containing a plurality of first vertices;

[0136] Selecting an initial vertex from each of the first vertices, and disconnecting the three-dimensional closed contour at the initial vertex to obtain an initial open contour, and the initial vertex is converted into two first vertices;

[0137] Mapping each first vertex of the initial open contour on a plane to obtain each second vertex, and composing each second vertex on the plane to obtain a first open contour; wherein in the first open contour, the two second vertices obtained by mapping after the conversion of the initial vertex are not connected;

[0138] Performing a closing process on the first open contour to obtain a first closed contour;

[0139] Judging whether the first closed contour contains at least two closed regions;

[0140] If yes, determining a target region from each of the closed regions, and performing an intersection elimination process on the target region to obtain a new first closed contour, and returning to execute the step of judging whether the first closed contour contains at least two closed regions;

[0141] If no, taking the first closed contour as a target mapping contour.

[0142] Optionally, the refinement function and the extension function of the program can refer to the description of the contour mapping method in the method embodiment.

[0143] The embodiments of the present application also provide a storage medium, which can store a program suitable for a processor to execute, and when the program runs, controls a device where the storage medium is located to execute the following contour mapping method, comprising:

[0144] Obtaining a three-dimensional closed contour containing a plurality of first vertices;

[0145] selecting an initial vertex from the first vertices, and breaking the three-dimensional closed contour at the initial vertex to obtain an initial open contour, while the initial vertex is converted into two first vertices;

[0146] mapping each first vertex of the initial open contour on a plane to obtain a second vertex, and composing each second vertex on the plane to form a first open contour; wherein in the first open contour, the two second vertices mapped from the converted initial vertex are not connected;

[0147] performing a closing process on the first open contour to obtain a first closed contour;

[0148] judging whether the first closed contour contains at least two closed regions;

[0149] if yes, determining a target region from each closed region, and performing an intersection elimination process on the target region to obtain a new first closed contour, and returning to execute the step of judging whether the first closed contour contains at least two closed regions;

[0150] if no, taking the first closed contour as a target mapping contour.

[0151] In particular, the storage medium can be a computer-readable storage medium, which can be an electronic storage memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM.

[0152] Optionally, the refinement function and the expansion function of the program can refer to the description of the contour mapping method in the method embodiment.

[0153] In addition, each functional module in each embodiment of the present disclosure can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part. If the function is realized in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present disclosure essentially or say the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions to make a computer device (which can be a personal computer, a live device, or a network device, etc.) execute all or part of the steps of the method of each embodiment of the present disclosure.

[0154] Finally, it should be noted that the terms "first", "second", and the like, herein do not denote any order, quantity, combination, or importance, but rather are used to distinguish one element from another, and are not intended to denote the presence of any such actual relationship or order. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the presence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0155] The various embodiments in the specification are described with progression in this order of description. Embodiments having the same or similar descriptions are referenced by the same reference numerals, and an overlapping description is not repeated.

[0156] The above description of disclosed embodiments provides enabling disclosure sufficient for one of ordinary skill in the art to practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method of contour mapping, characterized by, The method comprises the following steps: acquiring a three-dimensional closed contour comprising a plurality of first vertices; the three-dimensional closed contour is the contour of a swimming ring or a missing part of a leather ball surface; selecting an initial vertex from each of the first vertices, and disconnecting the three-dimensional closed contour at the initial vertex to obtain an initial open contour, and the initial vertex is converted into two first vertices; mapping each of the first vertices of the initial open contour on a plane to obtain a second vertex, and composing a first open contour with each of the second vertices on the plane; wherein in the first open contour, the two second vertices mapped from the converted initial vertex are not connected; performing a closing process on the first open contour to obtain a first closed contour; determining whether the first closed contour contains at least two closed regions; if yes, determining a target region from each of the closed regions, and performing an intersection elimination process on the target region to obtain a new first closed contour, and returning to the step of determining whether the first closed contour contains at least two closed regions; if no, taking the first closed contour as a target mapping contour for repairing the missing part of the swimming ring or the leather ball surface.

2. The method of claim 1, wherein, The step of composing a first open contour with each of the second vertices on the plane comprises the following steps: determining a first angle value at each of the first vertices in the three-dimensional closed contour; determining a distance between each two of the first vertices in the three-dimensional closed contour; taking one of the second vertices mapped from the converted initial vertex as a starting vertex, and taking the other second vertex mapped from the converted initial vertex as an ending vertex; connecting the starting vertex, each of the other second vertices and the ending vertex in sequence with straight lines according to the positional relationship between each of the first vertices in the three-dimensional closed contour to form a contour line; correcting the contour line based on the first angle value at each of the first vertices in the three-dimensional closed contour and the distance between each two of the first vertices to obtain a first open contour.

3. The method of claim 2, wherein, The step of correcting the contour line based on the first angle value at each of the first vertices in the three-dimensional closed contour and the distance between each two of the first vertices to obtain a first open contour comprises the following steps: determining a second angle value at each of the second vertices in the contour line and a distance between each two of the second vertices; corresponding each of the second vertices in the contour line to each of the first vertices in the three-dimensional closed contour one by one; correcting the second angle value at each of the second vertices corresponding to each of the first vertices based on the first angle value at each of the first vertices, and correcting the distance between each two of the second vertices in the contour line to the distance between the two first vertices corresponding to the two second vertices to form a first open contour.

4. The method of claim 1, wherein, The step of performing a closing process on the first open contour to obtain a first closed contour comprises the following steps: determining a contour starting point and a contour ending point from each of the second vertices in the first open contour; calculating a positional deviation between the contour starting point and the contour ending point; calculating a to-be-moved position parameter of each of the second vertices except the contour starting point and the contour ending point according to the positional deviation; Fixing the contour vertex, moving each of the second vertices other than the contour start point and the contour end point according to a respective to-be-moved position parameter, and simultaneously coinciding the contour end point with the contour start point, to obtain a first closed contour.

5. The method of claim 1, wherein, The target region is determined from each of the closed regions, including: An area of each of the closed regions is determined. The areas of each of the closed regions are compared in size, and a closed region with the smallest area is taken as the target region.

6. The method of claim 1, wherein, The target region is subjected to intersection elimination processing to obtain a new first closed contour, including: In each of the closed regions of the first closed contour, a number of closed regions intersecting the target region is determined. If the number is one, an edge between every two second vertices in the first closed contour is taken as a contour edge, an intersection point between the target region and the intersecting closed region is determined, a contour edge at the intersection point is taken as an intersecting contour edge, and the target region is subjected to intersection elimination processing according to the intersection point and the intersecting contour edge to obtain a new first closed contour. If the number is two, an area of the target region and a total area of the first closed contour are obtained, a ratio of the area of the target region to the total area is calculated, and the target region is subjected to elimination processing based on the ratio to obtain a new first closed contour. If the number is greater than two, the closed regions intersecting the target region are taken as intersection regions, for each intersection region, the target region and the intersection region are taken as a new first closed contour, and the step of determining the number of closed regions intersecting the target region in each of the closed regions of the first closed contour is performed again.

7. The method of claim 6, wherein, The target region is subjected to intersection elimination processing according to the intersection point and the intersecting contour edge to obtain a new first closed contour, including: Both second vertices at the two ends of the intersecting contour edge are taken as third vertices. From each of the third vertices, a third vertex is randomly selected as a target point, another third vertex belonging to the same intersecting contour edge as the target point is taken as a first corresponding point of the target point. Another third vertex belonging to the same closed region as the target point is taken as a second corresponding point of the target point. Another third vertex other than the target point, the first corresponding point and the second corresponding point is taken as a third corresponding point of the target point. Each of the intersecting contour edges is deleted from the first closed region, the target point and the third corresponding point are connected, and the first corresponding point and the second corresponding point are connected to form a new first closed contour.

8. The method of claim 6, wherein, The target region is subjected to elimination processing based on the ratio to obtain a new first closed contour, including: If the ratio is less than a preset proportion threshold, two boundary lines between the two intersection points on the contour boundary of the target region are determined. One of the boundary lines is arbitrarily selected, and the boundary line is moved towards the other boundary line until the target region disappears, and the movement is stopped to obtain a new first closed contour. If the ratio is not less than the proportion threshold, the target region and the intersecting closed region are taken as an intersecting region, for each intersecting region, the target region and the intersecting region are taken as a new first closed contour, the step of determining the number of closed regions intersecting with the target region in each closed region of the first closed contour is returned to be executed.

9. The method of claim 4, wherein, The calculating the position parameters of each second vertex except the contour start point and the contour end point according to the position deviation comprises: determining the position of each second vertex in the first open contour, and dividing the first open contour into sub-contours according to the position of each second vertex; respectively converting each sub-contour into a local matrix; summarizing each local matrix into a global matrix corresponding to the first open contour; establishing a one-dimensional array according to the position deviation; calculating a target displacement vector based on the global matrix and the one-dimensional array; determining the position parameters of each second vertex except the contour start point and the contour end point according to the target displacement vector.

10. A contour mapping device characterized by comprising: comprise: a three-dimensional closed contour acquisition module, configured to acquire a three-dimensional closed contour comprising a plurality of first vertices; the three-dimensional closed contour is a contour of a missing part of a swimming ring or a leather ball surface; an initial open contour acquisition module, configured to select an initial vertex from each first vertex, and disconnect the three-dimensional closed contour at the initial vertex to obtain an initial open contour, and the initial vertex is converted into two first vertices; a first open contour composition module, configured to map each first vertex of the initial open contour on a plane to obtain each second vertex, and compose a first open contour on the plane by using each second vertex; a closing processing module, configured to perform closing processing on the first open contour to obtain a first closed contour; a judging module, configured to judge whether the first closed contour comprises at least two closed regions; an intersection elimination processing module, configured to, if yes, determine a target region from each closed region, and perform intersection elimination processing on the target region to obtain a new first closed contour, and return to execute the step of judging whether the first closed contour comprises at least two closed regions; a target mapping contour determination module, configured to, if no, take the first closed contour as a target mapping contour for repairing the missing part of the swimming ring or the leather ball surface.

11. A contour mapping device characterized by comprise a memory and a processor; the memory is configured to store a program; the processor is configured to execute the program to implement each step of the contour mapping method according to any one of claims 1-9.

12. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement each step of the contour mapping method according to any one of claims 1-9. The computer program is executed by the processor to implement each step of the contour mapping method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Two-dimensional graph contour drawing method

    CN105303588A

  • Method for extracting outline from solid / surface model, and computer software program

    JP2009122998A