Model topology information generation method and device, storage medium and processor

CN115761113BActive Publication Date: 2026-10-30NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211319607.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2026-10-30
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

[0004]本公开至少部分实施例提供了一种模型拓扑信息的生成方法、装置、存储介质和处理器,以至少解决模型拓扑信息生成效率低的技术问题

Benefits of technology

[0009]在本公开至少部分实施例中,通过获取构成目标模型的多个面片的面片序列数组,其中,面片序列数组用于描述多个面片的面片顺序和每个面片的顶点数量;获取与面片序列数组对应的原始顶点序号数组,其中,原始顶点序号数组包括顶点数量的顶点序号,顶点序号用于描述构成同一面片的顶点的顶点顺序;按指定的排列顺序,对原始顶点序号数组中构成同一面片的顶点数量的顶点序号进行二次排列,以生成与面片序列数组对应的目标顶点序号数组;基于目标顶点序号数组,生成目标模型的拓扑信息,其中,拓扑信息用于描述目标模型的拓扑结构。也就是说,在本公开实施例中可以按照指定的排列规则,对原始顶点序号数组中构成同一面片的顶点数量的顶点序号进行二次排列,生成目标顶点序号数组,这样基于指定的排列规则生成的目标顶点序号数组是唯一的,基于此,基于目标顶点序号数组生成的模型拓扑信息也是唯一的,且该拓扑信息可以唯一标识该目标模型的拓扑结构,这样基于该目标模型的拓扑信息对目标模型进行拓扑检查,无需依赖于检测软件,更加的方便快捷,而且按照这种方法生成的目标模型的拓扑信息数据量较小,可以提升目标模型的拓扑信息的生成效率,解决了模型拓扑信息生成效率低的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115761113B_ABST
    Figure CN115761113B_ABST
Patent Text Reader

Abstract

The application discloses a model topology information generation method and device, a storage medium and a processor. The method comprises the following steps: obtaining a face sequence array of a plurality of face patches constituting a target model, wherein the face sequence array is used for describing the face sequence of the plurality of face patches and the vertex number of each face patch; obtaining an original vertex serial number array corresponding to the face sequence array, wherein the original vertex serial number array comprises vertex serial numbers of the vertex number, and the vertex serial numbers are used for describing the vertex sequence of the vertices constituting the same face patch; performing secondary arrangement on the vertex serial numbers of the vertex number constituting the same face patch in the original vertex serial number array according to a specified arrangement rule, so as to generate a target vertex serial number array corresponding to the face sequence array; and generating topology information of the target model based on the target vertex serial number array, wherein the topology information is used for describing the topology structure of the target model. The application solves the technical problem of low model topology information generation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information processing technology, and more specifically, to a method, apparatus, storage medium, and processor for generating model topology information. Background Technology

[0002] Currently, when generating model topology information, the vertex index array contained in each face of the model is usually used as the model's topology information. In this case, when the model contains a large number of faces, the amount of data generated for the model topology information will be enormous. Moreover, directly using the vertex index array of each face as the model's topology information is not intuitive in terms of data display. Thus, when verifying the model topology information, it is necessary to rely on a data content creation tool (Digital Content Creation, or DCC) to compare and check each vertex index one by one, which is time-consuming and results in low efficiency in generating model topology information.

[0003] There is currently no effective solution to the problem of low efficiency in generating topology information for the aforementioned models. Summary of the Invention

[0004] This disclosure provides at least some embodiments of a method, apparatus, storage medium, and processor for generating model topology information, in order to at least solve the technical problem of low efficiency in generating model topology information.

[0005] According to one embodiment of this disclosure, a method for generating model topology information is provided, comprising: obtaining a face sequence array of multiple faces constituting a target model, wherein the face sequence array is used to describe the face order of the multiple faces and the number of vertices in each face; obtaining an original vertex index array corresponding to the face sequence array, wherein the original vertex index array includes vertex indices of the number of vertices, and the vertex indices are used to describe the vertex order of the vertices constituting the same face; performing a secondary arrangement of the vertex indices of the number of vertices constituting the same face in the original vertex index array according to a specified order rule to generate a target vertex index array corresponding to the face sequence array; and generating topology information of the target model based on the target vertex index array, wherein the topology information is used to describe the topological structure of the target model.

[0006] According to one embodiment of this disclosure, a device for generating model topology information is also provided. The device includes: a first acquisition unit, configured to acquire a face sequence array of multiple faces constituting a target model, wherein the face sequence array describes the face order of the multiple faces and the number of vertices in each face; a second acquisition unit, configured to acquire an original vertex index array corresponding to the face sequence array, wherein the original vertex index array includes vertex indices representing the number of vertices, and the vertex indices describe the vertex order of vertices constituting the same face; an arrangement unit, configured to perform a secondary sorting of the vertex indices representing the number of vertices constituting the same face in the original vertex index array according to a specified arrangement order, to generate a target vertex index array corresponding to the face sequence array; and a generation unit, configured to generate topology information of the target model based on the target vertex index array, wherein the topology information describes the topological structure of the target model.

[0007] According to one embodiment of the present disclosure, a computer-readable storage medium is also provided, which stores a computer program, wherein the computer program is configured to execute the method for generating model topology information in any of the preceding claims at runtime.

[0008] According to one embodiment of this disclosure, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method for generating model topology information as described above.

[0009] In at least some embodiments of this disclosure, a face sequence array constituting multiple faces of a target model is obtained, wherein the face sequence array is used to describe the face order of the multiple faces and the number of vertices in each face; an original vertex number array corresponding to the face sequence array is obtained, wherein the original vertex number array includes the vertex number of the number of vertices, and the vertex number is used to describe the vertex order of the vertices constituting the same face; the vertex number numbers constituting the number of vertices in the original vertex number array are rearranged in a specified order to generate a target vertex number array corresponding to the face sequence array; and based on the target vertex number array, topological information of the target model is generated, wherein the topological information is used to describe the topological structure of the target model. In other words, in this embodiment of the disclosure, the vertex numbers of the number of vertices constituting the same face in the original vertex number array can be rearranged according to a specified arrangement rule to generate a target vertex number array. In this way, the target vertex number array generated based on the specified arrangement rule is unique. Based on this, the model topology information generated based on the target vertex number array is also unique, and this topology information can uniquely identify the topology of the target model. Thus, topology checking of the target model based on the topology information of the target model does not need to rely on detection software, which is more convenient and faster. Moreover, the amount of topology information data of the target model generated by this method is small, which can improve the generation efficiency of the topology information of the target model and solve the technical problem of low generation efficiency of model topology information. Attached Figure Description

[0010] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this application, illustrate exemplary embodiments of the present disclosure and are used to explain the disclosure, but do not constitute an undue limitation thereof. In the drawings:

[0011] Figure 1 This is a hardware structure block diagram of a mobile terminal for a method of generating model topology information according to an embodiment of this disclosure.

[0012] Figure 2 This is a flowchart of a method for generating model topology information according to one embodiment of the present disclosure;

[0013] Figure 3 This is a flowchart of a method for generating model topology information according to one optional embodiment of the present disclosure;

[0014] Figure 4 This is a schematic diagram of a model topology information generation apparatus according to one embodiment of the present disclosure;

[0015] Figure 5 A schematic diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation

[0016] To enable those skilled in the art to better understand the present disclosure, the technical solutions of the present disclosure will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present disclosure.

[0017] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0018] First, some nouns or terms that appear in the description of the embodiments of this disclosure are to be interpreted as follows:

[0019] Message Digest Algorithm (MD5): A widely used cryptographic hash function that produces a 128-bit hash value to ensure the integrity and consistency of transmitted information.

[0020] Topology studies the properties of geometric figures or spaces that remain unchanged after continuous changes in shape, considering only the positional relationships between objects without considering their shapes and sizes.

[0021] Model topology information, which considers the connection of model vertices and the composition of faces to generate the model information;

[0022] A polygon model is a data structure that organizes all node objects in a parent-child hierarchical structure. It is an expression of the enumeration method and one of the commonly used data structures for storing 3D models in 3D DCC software.

[0023] According to one embodiment of this disclosure, an embodiment of a method for generating model topology information is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0024] The methods and embodiments described above in this disclosure can be executed in a terminal device, computer terminal, or similar computing device. Taking a terminal device as an example, the terminal device can be a smartphone, tablet computer, PDA, mobile internet device, PAD, game console, or other terminal device. Figure 1 This is a hardware structure block diagram of a terminal device for a method of generating model topology information according to an embodiment of this disclosure. Figure 1 As shown, the terminal device may include one or more ( Figure 1 Only one is shown in the diagram. Processor 102 (processor 102 may include, but is not limited to, a central processing unit (CPU), graphics processing unit (GPU), digital signal processing (DSP) chip, microprocessor (MCU), programmable logic device (FPGA), neural network processor (NPU), tensor processor (TPU), artificial intelligence (AI) type processor, etc.) and memory 104 for storing data. In one embodiment of this disclosure, it may also include: transmission device 106 for communication functions, input / output device 108 and display device 110.

[0025] In some optional embodiments primarily focused on gaming scenarios, the aforementioned device may also provide a human-computer interaction interface with a touch-sensitive surface. This interface can sense finger contact and / or gestures to interact with a graphical user interface (GUI). The human-computer interaction functions may include the following: creating web pages, drawing, word processing, creating electronic documents, playing games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. Executable instructions for performing the aforementioned human-computer interaction functions are configured / stored in one or more processor-executable computer program products or readable storage media.

[0026] Those skilled in the art will understand that Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal device described above. For example, the terminal device may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0027] According to one embodiment of this disclosure, an embodiment of a method for generating model topology information is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0028] In one possible implementation, embodiments of this disclosure provide a method for generating model topology information. Figure 2 This is a flowchart of a method for generating model topology information according to one embodiment of the present disclosure, such as... Figure 2 As shown, the method includes the following steps:

[0029] Step S201: Obtain a face sequence array of multiple faces of the target model, wherein the face sequence array is used to describe the face order of the multiple faces and the number of vertices of each face.

[0030] In the technical solution provided in step S201 of this disclosure, the target model can be a polygonal model, which can include multiple faces. Each face corresponds to a face sequence array, which describes the face order and the number of vertices of each face. In other words, each face in the target model has a corresponding number. By arranging the corresponding numbers of each face in order, an array can be obtained. This array is a face sequence array, which specifies the order of the multiple faces of the target model. Each face has multiple vertices, which are the vertices used to constitute the face.

[0031] Optionally, since the face sequence array of multiple faces of the target model is used to describe the face order of multiple faces and the number of vertices of each face, based on this, after obtaining the face sequence array of the target model, that is, the number of faces, face order and the number of vertices constituting each face of the target model are obtained.

[0032] Optionally, the total number of faces in the target model can be represented by allFaceNum, the face sequence array of the target model can be represented by perFaceVertexNumList, and the number of vertices in each face of the target model can be represented by VertexNum. Based on this, when the face sequence array perFaceVertexNumList of the target model is [3, 4, ... 5], it means that the number of vertices in the first face of the target model is 3, the number of vertices in the second face of the target model is 4, and so on, and the number of vertices in each face of the target model can be obtained.

[0033] Step S202: Obtain the original vertex number array corresponding to the face sequence array, wherein the original vertex number array includes the vertex number of the number of vertices, and the vertex number is used to describe the vertex order of the vertices that constitute the same face.

[0034] In the technical solution provided by step S202 of this disclosure, the target model corresponds to an original vertex number array, which corresponds to the face sequence array of the target model. Based on this, the original vertex number array corresponding to the face sequence array can be obtained. The original vertex number array includes the vertex number of the number of vertices, and the vertex number is used to describe the vertex order of the vertices that constitute the same face.

[0035] Optionally, the number of vertices in the target model can be represented by allaVertexNum, and the original vertex index array of the target model can be represented by perFaceVertexIdList. Based on this, following the previous example, when the obtained face sequence array perFaceVertexNumList of the target model is [3, 4...5], and the obtained original vertex index array perFaceVertexIdList of the target model is [1, 2, 3, 3, 2, 1, 4,...5], it means that the number of vertices in the first face of the target model is 3, and the vertex index of these 3 vertices is arranged in the order of [1, 2, 3]. The number of vertices in the second face is 4, and the vertex index of these 4 vertices is arranged in the order of [3, 2, 1, 4]. And so on, the vertex index arrangement of each face of the target model can be obtained.

[0036] Step S203: According to the specified arrangement rules, the vertex indices of the number of vertices constituting the same face in the original vertex index array are rearranged a second time to generate the target vertex index array corresponding to the face sequence array.

[0037] In the technical solution provided by step S203 of this disclosure, after determining the face sequence array of the target model and the original vertex number array corresponding to the face sequence array, the vertex numbers of the number of vertices constituting the same face in the original vertex number array can be rearranged in a specified order to generate the target vertex number array corresponding to the face sequence array.

[0038] Optionally, when performing a secondary arrangement of the vertex indices of the number of vertices constituting the same face in the original vertex indices array according to a specified arrangement order, the first target vertex indices can be determined from the vertex indices of the number of vertices constituting the same face in the original vertex indices array. Then, based on the first target vertex indices and the second target vertex indices adjacent to the first target vertex indices, the target traversal order of the vertex indices constituting the same face is determined. After determining the target traversal order, the vertex indices of the number of vertices constituting the same face can be traversed sequentially from the first target vertex indices according to the target traversal order to obtain the traversal result. The traversal results corresponding to multiple faces in the face sequence array are combined into a target vertex indices array.

[0039] Optionally, when determining the first target vertex number from the vertex indices of the number of vertices constituting the same face, the vertex indices that satisfy the target numerical relationship can be determined from the vertex indices of the number of vertices constituting the same face, and the vertex indices that satisfy the target numerical relationship are determined as the first target vertex number. The target numerical relationship is used to indicate the minimum numerical relationship or the maximum numerical relationship. For example, when the target numerical relationship is the minimum numerical relationship, it is used to indicate that the minimum vertex indices of the number of vertices constituting the same face are determined as the vertex indices that satisfy the target numerical relationship. When the target numerical relationship is the maximum numerical relationship, it is used to indicate that the maximum vertex indices of the number of vertices constituting the same face are determined as the vertex indices that satisfy the target numerical relationship.

[0040] For example, taking any facet that constitutes the target model as an example, assuming that the vertex index array constituting the facet is [7, 3, 6, 9], when the target numerical relationship is the minimum numerical relationship, the minimum vertex index can be determined from the vertex index array corresponding to the facet. The minimum vertex index is 3, and then the minimum vertex index 3 is used as the first target vertex index. Conversely, when the target numerical relationship is the maximum numerical relationship, the maximum vertex index can be determined from the vertex index array of the facet. The maximum vertex index is 9, and then the maximum vertex index 9 is used as the first target vertex index.

[0041] Optionally, after determining the first target vertex number, a third vertex number that satisfies the target numerical relationship can be determined from the two second target vertex numbers adjacent to the first target vertex number. That is, the smallest or largest second target vertex number among the two target vertex numbers is determined as the third target vertex number that satisfies the target numerical relationship. Then, the traversal order from the first target vertex number to the third target vertex number is determined as the target traversal order of the vertex numbers that constitute the number of vertices of the same face.

[0042] Following the previous example, when the target numerical relationship is the minimum numerical relationship, the first target vertex number determined from the vertex number array [7, 3, 6, 9] of a certain face constituting the target model is 3. Since the second target vertex numbers adjacent to this first target vertex number are 7 and 6, and 6 < 7, the smallest second target vertex number among the two is 6. Based on this, the second target vertex number 6 can be determined as the third target vertex number. Then, the vertex number array corresponding to this face can be regarded as a circular array, and the traversal order from the first target vertex number 3 to the third target vertex number 6 is determined as the target traversal order of the vertex numbers constituting the face, that is, vertex numbers 3, 6, 9, 7 are determined as the target traversal order of the vertex numbers constituting the face. Conversely, when the target numerical relationship is the maximum numerical relationship, the first target vertex number determined from the vertex number array [7, 3, 6, 9] of a certain face constituting the target model is 9. Since... The vertex index array is considered as a circular array. The second target vertex indices adjacent to the first target vertex index 9 are 7 and 6. Since 7 > 6, the second target vertex index 7 can be determined as the third target vertex index. After determining the first and third target vertex indices, the vertex index array corresponding to the face can also be considered as a circular array. The traversal order from the first target vertex index 9 to the third target vertex index 7 is determined as the target traversal order of the vertex indices that constitute the face. That is, vertex indices 9, 7, 3, and 6 are determined as the target traversal order of the vertex indices that constitute the face. Using the same method, the target traversal order of the vertex indices of each face constituting the target model can be determined. After determining the target traversal order of the vertex indices that constitute each face, the vertex indices of each face can be arranged according to the corresponding target traversal order based on the face sequence array of the target model to obtain the target vertex index array corresponding to the face sequence array of the target model.

[0043] Optionally, in the technical solution provided in step S203 of this disclosure, each vertex number in the vertex number array corresponding to each facet of the target model has an index number. The index number corresponding to the first vertex number in the vertex number array is 0, and the index number corresponding to the i-th vertex number in the vertex number array is i-1. Based on this, the vertex number array of each facet of the target model can be regarded as a circular array. After determining the first target vertex number in the vertex numbers constituting the same facet, the first index number of the first target vertex number in the vertex number array corresponding to the facet can be obtained. Then, the second index number is determined based on the first index number and the number of vertices, and the vertex number indexed by the second index number in the number of vertices is determined as the second target vertex number.

[0044] For example, suppose the vertex index array of a certain face that constitutes the target model is [7, 6, 9, 3]. The first target vertex in this vertex index array is 3. Since the first target vertex is 3, it is located in the 4th position in the vertex index array. Therefore, the index number corresponding to the first target vertex is 3, that is, the first index number is 3.

[0045] Optionally, after determining the first index number in the vertex index array, the first sum between the first index number and the number of vertices can be obtained. After obtaining the first sum, the difference between the first sum and the target value is obtained, and then the difference is moduloed by the number of vertices to obtain the second index number. The target value is determined by the number of bits separating the vertex index of the second index number and the first target vertex index in the vertex index array. For example, if the vertex index of the second index number and the first target vertex index are adjacent in the vertex index array, the target value can be 1.

[0046] For example, when the vertex index array is [7, 6, 9, 3], the first target vertex index in the vertex index array is 3, the first index corresponding to the first target vertex index is 3, and the number of vertices in the vertex index array is 4. Based on this, the first sum between the first index and the number of vertices is 7. Since the vertex index of the second index to be obtained is adjacent to the first target vertex index, that is, the target value is 1, the difference between the first sum 7 and the target value 1 is 6. The modulo operation between this difference and the number of vertices 4 yields a value of 2. This value 2 can then be used as the second index. The vertex indexed by the second index is 9, and this vertex index 9 can be determined as the second target vertex index.

[0047] Optionally, a second sum between the first index number and the target value can be obtained, and then the second sum can be moduloed with the number of vertices to obtain the second index number.

[0048] For example, when the vertex index array is [7, 6, 9, 3], the first index number corresponding to the first target vertex number 3 is 3. The second sum between the first index number and the target value is 4. The modulo operation of the second sum and the number of vertices 4 yields a value of 0. This value 0 can then be used as the second index number. The vertex number corresponding to the second index number is 7. Therefore, the vertex number 7 can be determined as the second target vertex number.

[0049] Step S204: Based on the target vertex index array, generate the topological information of the target model, wherein the topological information is used to describe the topological structure of the target model.

[0050] In the technical solution provided by step S204 of this disclosure, after determining the target vertex index array, the topological information of the target model can be generated based on the target vertex index array, wherein the topological information is used to describe the topological structure of the target model.

[0051] Optionally, the total number of vertices of the target model's multiple faces, the number of multiple faces, one of the identifiers of the multiple faces, and the array of target vertex indices can be converted into a text string, and then topological information can be generated based on the text string.

[0052] Optionally, after obtaining the topology information, the topology information to be verified of the target model can also be verified based on the topology information. For example, the topology information to be verified of the target model can be obtained, and then the topology information to be verified can be compared with the topology information of the generated target model. When the topology information to be verified is consistent with the topology information of the generated target model, it is determined that the topology information to be verified has been successfully verified; when the topology information to be verified is inconsistent with the topology information of the target model, it is determined that the topology information to be verified has failed to be verified.

[0053] In at least some embodiments of this disclosure, a face sequence array constituting multiple faces of a target model is obtained, wherein the face sequence array is used to describe the face order of the multiple faces and the number of vertices in each face; an original vertex number array corresponding to the face sequence array is obtained, wherein the original vertex number array includes the vertex number of the number of vertices, and the vertex number is used to describe the vertex order of the vertices constituting the same face; the vertex number numbers constituting the number of vertices in the original vertex number array are rearranged in a specified order to generate a target vertex number array corresponding to the face sequence array; and based on the target vertex number array, topological information of the target model is generated, wherein the topological information is used to describe the topological structure of the target model. In other words, in this embodiment of the disclosure, the vertex numbers of the number of vertices constituting the same face in the original vertex number array can be rearranged according to a specified arrangement rule to generate a target vertex number array. In this way, the target vertex number array generated based on the specified arrangement rule is unique. Based on this, the model topology information generated based on the target vertex number array is also unique, and this topology information can uniquely identify the topology of the target model. Thus, topology checking of the target model based on the topology information of the target model does not need to rely on detection software, which is more convenient and faster. Moreover, the amount of topology information data of the target model generated by this method is small, which can improve the generation efficiency of the topology information of the target model and solve the technical problem of low generation efficiency of model topology information.

[0054] The method described above in this embodiment will be further illustrated with examples below.

[0055] As an optional implementation, step S203 involves rearranging the vertex indices of the number of vertices constituting the same face in the original vertex indices array according to a specified arrangement order to generate a target vertex indices array corresponding to the face sequence array. This includes: determining a first target vertex indices from the vertex indices constituting the same face in the original vertex indices array; determining a target traversal order for the vertex indices constituting the same face based on the first target vertex indices and a second target vertex indices adjacent to the first target vertex indices; traversing the vertex indices constituting the same face in the target traversal order, starting from the first target vertex indices, to obtain traversal results; and combining the traversal results corresponding to multiple faces in the face sequence array into a target vertex indices array.

[0056] In this embodiment, since the original vertex number array includes the vertex number array of each facet constituting the target model, the vertex number that satisfies the target numerical relationship can be determined from the vertex number of the number of vertices constituting the same facet in the original vertex number array. Then, the vertex number that satisfies the target numerical relationship is determined as the first target vertex number. The target numerical relationship includes the minimum numerical relationship and the maximum numerical relationship.

[0057] Optionally, when the target numerical relationship is the minimum numerical relationship, the target numerical relationship is used to indicate the minimum vertex number to be determined from the vertex numbers of the number of vertices constituting the same face, and the minimum vertex number is determined as the vertex number that satisfies the target numerical relationship. For example, taking the vertex number array of a face in the original vertex number array as an example, assuming that the vertex number array constituting the face is [7, 3, 6, 9], when the target numerical relationship is the minimum numerical relationship, the minimum vertex number can be determined from the vertex number array corresponding to the face. The minimum vertex number is 3, and then the minimum vertex number 3 is taken as the first target vertex number.

[0058] Optionally, when the target numerical relationship is the maximum numerical relationship, the target numerical relationship is used to indicate the determination of the maximum vertex number among the vertex numbers of the number of vertices constituting the same face, and the maximum vertex number is determined as the vertex number that satisfies the target numerical relationship. Similarly, taking the vertex number array [7, 3, 6, 9] as an example, when the target numerical relationship is the maximum numerical relationship, the maximum vertex number can be determined from the vertex number array corresponding to the face. The maximum vertex number is 0, and then the maximum vertex number 9 is taken as the first target vertex number.

[0059] Optionally, after determining the first target vertex number, a third target vertex number that satisfies the target numerical relationship can be determined from the two second target vertex numbers adjacent to the first target vertex number; then the traversal order from the first target vertex number to the third target vertex number is determined as the target traversal order of the vertex numbers constituting the same face.

[0060] Optionally, if the target numerical relationship of the first target vertex is determined to be the minimum numerical relationship, then the target numerical relationship of the third target vertex is also determined to be the minimum numerical relationship among the two second target vertex numbers adjacent to the first target vertex. Conversely, if the target numerical relationship of the first target vertex is determined to be the maximum numerical relationship, then the target numerical relationship of the third target vertex is also determined to be the maximum numerical relationship among the two second target vertex numbers adjacent to the first target vertex.

[0061] For example, taking the vertex index array [7, 3, 6, 9] as an example, when the first target vertex index is the smallest vertex index 3 in the array, it means that the target numerical relationship used to determine the first target vertex index is the minimum numerical relationship. Based on this, we can use the minimum numerical relationship to determine a minimum vertex index among the two second target vertex indices 6 and 7 adjacent to the first target vertex index 3. Since 6 < 7, it means that the second target vertex index that satisfies the minimum numerical relationship among these two second target vertex index arrays is 6. We can determine the second target vertex index 6 as the third target vertex index. In this case, we can regard the vertex index array as a circular array, and determine the traversal order from the first target vertex index 3 to the third target vertex index 6 as the target traversal order of the vertex indices that constitute the face; conversely, when the vertex index is not 3, the target vertex index is not 6. When the first target vertex number in the array is 9, it indicates that the target numerical relationship used to determine the first target vertex number is the maximum numerical relationship. In this case, the vertex number array is regarded as a circular array. The second target vertex numbers adjacent to the first target vertex number in the vertex number array are 6 and 7. Based on this, the maximum vertex number can be determined from the second target vertex numbers 6 and 7 using the maximum numerical relationship. Since 7 > 6, the second target vertex number 7 can be used as the third target vertex number that satisfies the maximum numerical relationship. Then, the vertex number array is also regarded as a circular array, and the traversal order from the first target vertex number 9 to the third target vertex number 7 is determined as the target traversal order of the vertex numbers that constitute the face. According to this method, the target traversal order of the vertex number array that constitutes each face of the target model can be determined.

[0062] Optionally, after determining the target traversal order of the vertex index array that constitutes each facet of the target model, the vertex indexes of the number of vertices constituting the same facet can be traversed sequentially from the first target vertex index according to the target traversal order to obtain the traversal result. The traversal results corresponding to multiple faces in the facet sequence array are then combined into a target vertex index array.

[0063] For example, taking the vertex index array [7, 3, 6, 9] as an example, this vertex index array is considered as a circular array. When the target traversal order is the traversal order of the first target vertex index 3 to the third target vertex index 6, the vertex indices 3, 6, 9, and 7 in the vertex index array can be traversed sequentially according to the target traversal order to obtain the traversal result. When the target traversal order is the traversal order of the first target vertex index 9 to the third target vertex index 7, the vertex indices 9, 7, 3, and 6 in the vertex index array can be traversed sequentially according to the target traversal order to obtain the traversal result. According to this method, the traversal result of the vertex index array of each face constituting the target model can be determined. After obtaining the traversal result of the vertex index array of each face, the traversal result of the vertex index array of each face can be combined into the target vertex index array according to the face sequence array.

[0064] Optionally, after determining the first target vertex number, the first index number of the first target vertex number in the vertex number of the number of vertices can be obtained, and then the second index number can be determined based on the first index number and the number of vertices. The vertex number indexed by the second index number in the vertex number of the number of vertices is determined as the second target vertex number.

[0065] Optionally, the vertex index array of each facet constituting the target model can be regarded as a circular array. In this case, after determining the first target vertex index among the vertex indices constituting the same facet, the first index index of the first target vertex index in the vertex index array corresponding to the facet can also be obtained. It should be noted that the index index corresponding to the first vertex index in each vertex index array is 0, and the index index corresponding to the i-th vertex index in the vertex index array is i-1.

[0066] For example, when the vertex index array of a certain face of the target model is [7, 6, 9, 3], and the first target vertex index in the vertex index array is 3, since the first target vertex index 3 is located in the 4th position in the vertex index array, the index number corresponding to the first target vertex index is 3, that is, the first index number is 3.

[0067] Optionally, after determining the first index number, the second index number can be determined based on the first index number and the number of vertices. For example, the first sum between the first index number and the number of vertices can be obtained; the difference between the first sum and the target value can be obtained; and then the difference can be moduloed with the number of vertices to obtain the second index number, wherein the number of vertices is the number of vertices that constitute the face corresponding to the first target vertex number.

[0068] For example, when the vertex index array is [7, 6, 9, 3], the first target vertex index 3 in the vertex index array corresponds to the first index index 3, and the number of vertices in the vertex index array is 4. Based on this, the first sum between the first index index and the number of vertices is 7. Since the vertex index corresponding to the second index index to be obtained is adjacent to the first target vertex index in the vertex index array, and the index indexes of the two vertex indices differ by 1, the target value can be determined to be 1. In this case, the difference between the first sum 7 and the target value 1 is 6. The modulo operation between this difference and the number of vertices 4 yields a value of 2, which can then be used as the second index index. The vertex index corresponding to this second index index is 9, and this vertex index 9 can be used as the second target vertex index.

[0069] Optionally, a second sum between the first index number and the target value can be obtained, and then a modulo operation can be performed on the second sum and the number of vertices to obtain the second index number.

[0070] For example, when the vertex index array is [7, 6, 9, 3], the first index number corresponding to the first target vertex number 3 is 3. The second sum between the first index number 3 and the target value 1 is 4. The modulo operation of the second sum and the number of vertices 4 yields a value of 0. This value 0 can then be used as the second index number. The vertex number corresponding to the second index number is 7. This vertex number 7 can then be used as the second target vertex number.

[0071] As an optional implementation, step S204, based on the target vertex index array, generates topological information of the target model, including: converting the target vertex index array and at least one of the following information into a text string: the total number of vertices of multiple faces, the number of multiple faces, and the identifier of multiple faces; generating topological information based on the text string.

[0072] In this embodiment, a blank text string can be pre-generated and used as the original text string. During the process of converting the target vertex index array and the total number of vertices of multiple faces into a text string, a first conversion step can be performed: converting the target model's target vertex index array into a first string, converting the total number of vertices of multiple faces into a second string, and adding the first and second strings to the original text string to obtain the target text string. During the process of converting the target vertex index array and the number of faces into a text string, a second conversion step can be performed: converting the target model's target vertex index array into a first string, converting the number of faces into a second string, and adding the first and second strings to the original text string to obtain the target text string. During the process of converting the target vertex index array and the identifiers of multiple faces into a text string, a third conversion step can be performed: converting the target model's target vertex index array into a first string, converting the identifiers of multiple faces into a second string, and adding the first and second strings to the original text string to obtain the target text string. The target text string is then converted into the text content.

[0073] Optionally, after determining the string corresponding to the target model, the string can be converted into text content using the MD5 algorithm, and the hash value corresponding to the text content can be calculated. The hash value corresponding to the text content can be a 128-bit hash value, which can then be used to determine the topological information of the target model.

[0074] Optionally, after obtaining the topology information of the target model, the topology information to be verified generated by the target model in at least one model processing stage can also be obtained, and then the topology information to be verified can be compared with the generated topology information. When the topology information to be verified is consistent with the topology information, it can be determined that the verification of the information to be verified is successful. When the topology information to be verified is inconsistent with the topology information, it can be determined that the verification of the information to be verified is unsuccessful.

[0075] For example, as described above, the topology information of the target model can be a 128-bit hash value, and this topology information represents the topological structure of the target model. Based on this, when verifying the topology information to be checked, the hash value corresponding to the topology information can be compared. If the hash value of the topology information to be checked matches the hash value of the topology information, the topology information to be checked has been successfully verified; if the hash value of the topology information to be checked does not match the hash value of the topology information, the topology information to be checked has failed. In this way, performing topology checks on the target model based on its topology information is more efficient.

[0076] The technical solutions of the present invention will be further illustrated below with reference to preferred embodiments.

[0077] In related technologies, the vertex indices of each facet of a model are typically stored as an array, lacking a simple and intuitive model topology information. Therefore, when performing topology checks, the model is usually imported into DCC software, and the software's tools are used to check for topological consistency. For models with a large number of faces, this results in a massive amount of data to be stored. In this case, topology checks require comparing each data point individually, consuming significant time and computer resources, and reducing the efficiency of topology checks.

[0078] However, this disclosure provides a method for generating model topology information, which will be further described below. For example... Figure 3 As shown, the method may include the following steps:

[0079] Step S301: Obtain the total number of vertices of the target model, convert the obtained total number of vertices into a string and add it to the pre-generated blank text.

[0080] In this embodiment, a blank text string named "content" can be generated beforehand. Then, the total number of vertices in the target model, allVertexNum, can be obtained, converted into a string, and appended to the end of "content".

[0081] Step S302: Obtain the total number of facets of the target model, convert the obtained total number of facets into a string and add it to the blank text.

[0082] In this embodiment, the total number of facets of the target model, allFaceNum, can be obtained, converted into a string, and the converted string can be appended to the end of the content.

[0083] Step S303: Obtain the array of facet sequences of the target model.

[0084] In this embodiment, a face sequence array perFaceVertexNumList of the target model can be obtained. This face sequence array contains the face order of multiple faces that constitute the target model and the number of vertices of each face.

[0085] Step S304: Obtain the original vertex index array of the target model.

[0086] In this embodiment, the original vertex index array perFaceVertexIdList corresponding to the face sequence array of the target model can be obtained. The original vertex index array includes the vertex index of the number of vertices, and the vertex index is used to describe the vertex order of the vertices that constitute the same face.

[0087] Step S305: Initialize the face sequence array of the target model with the original vertex number array.

[0088] In this embodiment, the face sequence array obtained in step S303 and the original vertex number array obtained in step S304 can be used for initialization to obtain the vertex number array corresponding to each face of the target model.

[0089] Step S306: Determine whether the face number of the target face is less than the total number of faces in the target model.

[0090] In this embodiment, after selecting a target facet, it can be determined whether the facet number of the target facet is less than the total number of faces in the target model, that is, whether the target facet has a next facet in the target model. If the target facet has a next facet, then step S308 is executed. If the target facet does not have a next facet, then the strings corresponding to the vertex numbers of the target facet are directly added to the end of the blank text in order. After that, step S307 is executed.

[0091] Step S307: Convert the string corresponding to the target model in the blank text into an MD5 code.

[0092] In this embodiment, after obtaining the text content corresponding to the model, the MD5 algorithm can be used to convert the text content corresponding to the target model into an MD5 code, and the MD5 code can be used as the topological information of the target model.

[0093] Step S308: Obtain the identifier of the target facet.

[0094] In this embodiment, each facet in the model contains an identifier, based on which the identifier corresponding to the target model can be obtained.

[0095] Step S309: Set the index increment value of the vertex number array corresponding to the target facet.

[0096] In this embodiment, after determining the identifier of the target facet, the vertex number array corresponding to the target facet can be obtained. Then, based on the target numerical relationship, the first target vertex number in the vertex number array and the first index number corresponding to the first target vertex number can be determined. Then, based on the first index number and the number of vertices corresponding to the vertex number array of the target facet, the index increment value of the vertex number corresponding to the target facet can be determined.

[0097] Step S310: Traverse the vertex numbers of the target face in traversal order.

[0098] In this embodiment, the traversal order of the vertex index array corresponding to the target face can be determined according to the index increment value determined above. After the traversal order is determined, the multiple vertex indices corresponding to the target face can be traversed in sequence according to the traversal order.

[0099] Step S311: Convert the vertex indices of the target face into strings according to the traversal order.

[0100] In this embodiment, when traversing the vertex index array corresponding to the target face in traversal order, the vertex indices encountered can be converted into strings in traversal order. Then, the resulting strings are appended to the end of the blank text in traversal order.

[0101] Step S312: Obtain the next target facet.

[0102] In this embodiment, after converting the vertex indices corresponding to the target face into strings and appending them to the end of the blank text in traversal order, the next target face can be obtained. After obtaining the next target face, step S308 can be executed. This process is repeated until the target face is the last face among the multiple faces of the model.

[0103] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (e.g., ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0104] This embodiment also provides a model topology information generation apparatus, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the terms "unit" and "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0105] Figure 4 This is a schematic diagram of a model topology information generation apparatus according to an embodiment of the present disclosure, such as... Figure 4As shown, the topology information generation device 400 of the model includes: a first acquisition unit 401, a second acquisition unit 402, an arrangement unit 403, and a generation unit 404.

[0106] The first acquisition unit 401 is used to acquire a face sequence array of multiple faces constituting the target model, wherein the face sequence array is used to describe the face order of the multiple faces and the number of vertices of each face;

[0107] The second acquisition unit 402 is used to acquire the original vertex number array corresponding to the face sequence array, wherein the original vertex number array includes the vertex number of the number of vertices, and the vertex number is used to describe the vertex order of the vertices that constitute the same face;

[0108] The arrangement unit 403 is used to perform a secondary arrangement of the vertex indices of the number of vertices constituting the same face in the original vertex indices array according to a specified arrangement rule, so as to generate a target vertex indices array corresponding to the face sequence array.

[0109] The generation unit 404 is used to generate topological information of the target model based on the target vertex index array, wherein the topological information is used to describe the topological structure of the target model.

[0110] Optionally, the arrangement unit 403 includes: a first determining module, used to determine a first target vertex number from the vertex numbers constituting the same face in the original vertex number array; a second determining module, used to determine the target traversal order of the vertex numbers constituting the same face based on the first target vertex number and the second target vertex number adjacent to the first target vertex number; a traversal module, used to traverse the vertex numbers constituting the same face sequentially from the first target vertex number according to the target traversal order to obtain the traversal result; and a combination module, used to combine the traversal results corresponding to multiple faces in the face sequence array into a target vertex number array.

[0111] Optionally, the first determining module includes: a first determining submodule, used to determine the vertex number that satisfies the target numerical relationship from the vertex numbers of the number of vertices constituting the same face; and a second determining submodule, used to determine the vertex number that satisfies the target numerical relationship as the first target vertex number.

[0112] Optionally, the second determining module includes: a third determining submodule, used to determine, among two second target vertex numbers adjacent to the first target vertex number, a third target vertex number that satisfies the target numerical relationship; and a fourth determining submodule, used to determine, from the traversal order of the first target vertex number to the third target vertex number, the target traversal order of the vertex numbers constituting the number of vertices in the same face.

[0113] Optionally, the first determining submodule is further configured to: determine the smallest or largest vertex number among the vertex numbers constituting the same face as the vertex number that satisfies the target numerical relationship; the third determining submodule is further configured to: determine the smallest or largest second target vertex number among the two second target vertex numbers as the third target vertex number that satisfies the target numerical relationship.

[0114] Optionally, the device 400 further includes: a third acquisition unit, configured to acquire a first index number of the first target vertex number among the vertex numbers in the number of vertices; a first determination unit, configured to determine a second index number based on the first index number and the number of vertices; and a second determination unit, configured to determine the vertex number indexed by the second index number among the vertex numbers in the number of vertices as the second target vertex number.

[0115] Optionally, the first determining unit includes: a first obtaining module, used to obtain a first sum between the first index number and the number of vertices; a second obtaining module, used to obtain the difference between the first sum and the target value; and a first calculation module, used to perform a modulo operation on the difference and the number of vertices to obtain the second index number.

[0116] Optionally, the first determining unit further includes: a third obtaining module, used to obtain a second sum between the first index number and the target value; and a second operation module, used to perform a modulo operation on the second sum and the number of vertices to obtain the second index number.

[0117] Optionally, the device 400 further includes: a fourth acquisition unit, used to acquire the topology information to be verified of the target model; a third determination unit, used to determine that the topology information to be verified has been successfully verified when the topology information to be verified is consistent with the topology information; and a fourth determination unit, used to determine that the topology information to be verified has failed to be verified when the topology information to be verified is inconsistent with the topology information.

[0118] Optionally, the fourth acquisition unit includes: a fourth acquisition module, used to acquire the topology information to be verified generated by the target model in at least one model processing stage.

[0119] Optionally, the generation unit includes: a conversion module for converting the target vertex index array and one of the following information into a text string: the total number of vertices of the multiple faces, the number of multiple faces, and the identifiers of the multiple faces; and a generation module for generating topological information based on the text string.

[0120] Optionally, a generation module is used to calculate the hash value corresponding to the text string to obtain topological information.

[0121] In the topology information generation device of the model in this embodiment, a first acquisition unit acquires a face sequence array of multiple faces constituting the target model, wherein the face sequence array is used to describe the face order of the multiple faces and the number of vertices of each face; a second acquisition unit acquires an original vertex number array corresponding to the face sequence array, wherein the original vertex number array includes the vertex number of the number of vertices, and the vertex number is used to describe the vertex order of the vertices constituting the same face; an arrangement unit performs a secondary arrangement of the vertex number of the number of vertices constituting the same face in the original vertex number array according to a specified arrangement rule to generate a target vertex number array corresponding to the face sequence array; and a generation unit generates topology information of the target model based on the target vertex number array, wherein the topology information is used to describe the topological structure of the target model. In this embodiment, the vertex indices of the number of vertices constituting the same face in the original vertex index array are rearranged to generate a target vertex index array. This target vertex index array, generated based on a specified arrangement rule, is unique. Consequently, the model topology information generated based on the target vertex index array is also unique, and this topology information can uniquely identify the topology of the target model. Therefore, topology checking of the target model based on this topology information does not rely on detection software, making it more convenient and faster. Furthermore, the amount of topology information data generated using this method is relatively small, which improves the generation efficiency of the target model's topology information and solves the technical problem of low generation efficiency of model topology information.

[0122] It should be noted that the above-mentioned units and modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but not limited to these: all the above-mentioned units and modules are located in the same processor; or, the above-mentioned units and modules are located in different processors in any combination.

[0123] Embodiments of this disclosure also provide a computer-readable storage medium storing a computer program configured to perform the steps in any of the above method embodiments when executed.

[0124] Optionally, in this embodiment, the computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0125] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any terminal device in a group of terminal devices.

[0126] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0127] S1, obtain an array of face sequence of multiple faces that constitute the target model, wherein the face sequence array is used to describe the face order of multiple faces and the number of vertices of each face;

[0128] S2, obtain the original vertex number array corresponding to the face sequence array, wherein the original vertex number array includes the vertex number of the number of vertices, and the vertex number is used to describe the vertex order of the vertices that constitute the same face;

[0129] S3, according to the specified arrangement rules, rearrange the vertex indices of the number of vertices that constitute the same face in the original vertex index array to generate the target vertex index array corresponding to the face sequence array;

[0130] S4. Based on the target vertex index array, generate the topological information of the target model, where the topological information is used to describe the topological structure of the target model.

[0131] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: determining a first target vertex index from the vertex indices of the number of vertices constituting the same face in the original vertex index array; determining a target traversal order of the vertex indices constituting the same face based on the first target vertex index and a second target vertex index adjacent to the first target vertex index; traversing the vertex indices of the number of vertices constituting the same face sequentially from the first target vertex index according to the target traversal order to obtain a traversal result; and combining the traversal results corresponding to multiple faces in the face sequence array into a target vertex index array.

[0132] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: determining the vertex number that satisfies a target numerical relationship from among the vertex numbers of the number of vertices constituting the same face; and determining the vertex number that satisfies the target numerical relationship as the first target vertex number.

[0133] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: determining a third target vertex number that satisfies a target numerical relationship among two second target vertex numbers adjacent to the first target vertex number; and determining a target traversal order of vertex numbers constituting the number of vertices that make up the same face from the traversal order of the first target vertex number to the third target vertex number.

[0134] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: determining the smallest or largest vertex number among the vertex numbers constituting the same face as the vertex number that satisfies the target numerical relationship; and determining the smallest or largest second target vertex number among two second target vertex numbers as the third target vertex number that satisfies the target numerical relationship.

[0135] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: obtaining a first index number of the first target vertex number among the vertex numbers of the number of vertices; determining a second index number based on the first index number and the number of vertices; and determining the vertex number indexed by the second index number among the vertex numbers of the number of vertices as the second target vertex number.

[0136] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: obtaining a first sum between a first index number and the number of vertices; obtaining the difference between the first sum and a target value; and performing a modulo operation on the difference and the number of vertices to obtain a second index number.

[0137] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: obtaining a second sum between a first index number and a target value; and performing a modulo operation on the second sum and the number of vertices to obtain a second index number.

[0138] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: acquiring topology information to be verified of a target model; determining that the topology information to be verified has been successfully verified in response to the topology information being consistent with the topology information; and determining that the topology information to be verified has failed in response to the topology information being inconsistent with the topology information.

[0139] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: acquiring topology information to be verified generated by the target model in at least one model processing stage.

[0140] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: converting a target vertex index array into a text string along with at least one of the following information: the total number of vertices of the multiple faces, the number of multiple faces, and the identifiers of the multiple faces; generating topological information based on the text string.

[0141] Optionally, the aforementioned computer-readable storage medium may be configured to store a computer program for performing the following steps: calculating the hash value corresponding to the text string to obtain topological information.

[0142] In the computer-readable storage medium of this embodiment, a method for generating model topology information is provided. This method involves rearranging the vertex indices of the number of vertices forming the same face in the original vertex indices array of the target model according to a specified arrangement rule, thereby generating a target vertex indices array. Since the target vertex indices array generated based on the specified arrangement rule is unique, the model topology information generated based on the target vertex indices array is also unique, and this topology information can uniquely identify the topology of the target model. Therefore, topology checking of the target model based on this topology information does not require detection software, making it more convenient and faster. Furthermore, the amount of topology information data generated by this method is relatively small, which improves the generation efficiency of the target model's topology information and solves the technical problem of low generation efficiency of model topology information.

[0143] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0144] In exemplary embodiments of this application, a computer-readable storage medium stores a program product capable of implementing the methods described above in this embodiment. In some possible implementations, various aspects of the embodiments of this disclosure may also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps according to various exemplary embodiments of this disclosure described in the "Exemplary Methods" section above.

[0145] The program product for implementing the above-described method according to embodiments of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the embodiments of the present disclosure is not limited thereto. In the embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0146] The aforementioned program product may take the form of any combination of one or more computer-readable media. Such computer-readable storage media may be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (not exhaustive) of computer-readable storage media include: electrical connections having one or more wires, portable 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 thereof.

[0147] It should be noted that the program code contained on the computer-readable storage medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0148] Embodiments of this disclosure also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.

[0149] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0150] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0151] S1, obtain an array of face sequence of multiple faces that constitute the target model, wherein the face sequence array is used to describe the face order of multiple faces and the number of vertices of each face;

[0152] S2, obtain the original vertex number array corresponding to the face sequence array, wherein the original vertex number array includes the vertex number of the number of vertices, and the vertex number is used to describe the vertex order of the vertices that constitute the same face;

[0153] S3, according to the specified arrangement rules, rearrange the vertex indices of the number of vertices that constitute the same face in the original vertex index array to generate the target vertex index array corresponding to the face sequence array;

[0154] S4. Based on the target vertex index array, generate the topological information of the target model, where the topological information is used to describe the topological structure of the target model.

[0155] Optionally, the processor described above may be configured to store a computer program for performing the following steps: determining a first target vertex number from the vertex numbers of the number of vertices constituting the same face in the original vertex number array; determining a target traversal order of the vertex numbers constituting the same face based on the first target vertex number and a second target vertex number adjacent to the first target vertex number; traversing the vertex numbers of the number of vertices constituting the same face sequentially from the first target vertex number according to the target traversal order to obtain the traversal result; and combining the traversal results corresponding to multiple faces in the face sequence array into a target vertex number array.

[0156] Optionally, the processor described above may be configured to store a computer program for performing the following steps: determining the vertex number that satisfies the target numerical relationship from the vertex numbers of the number of vertices constituting the same face; and determining the vertex number that satisfies the target numerical relationship as the first target vertex number.

[0157] Optionally, the processor may be configured to store a computer program for performing the following steps: determining a third target vertex number that satisfies a target numerical relationship among two second target vertex numbers adjacent to the first target vertex number; and determining a target traversal order of vertex numbers constituting the number of vertices that make up the same face by traversing the order from the first target vertex number to the third target vertex number.

[0158] Optionally, the processor may be configured to store a computer program for performing the following steps: determining the smallest or largest vertex number among the vertex numbers constituting the same face as the vertex number that satisfies the target numerical relationship; determining the smallest or largest second target vertex number among two second target vertex numbers as the third target vertex number that satisfies the target numerical relationship.

[0159] Optionally, the processor may be configured to store a computer program for performing the following steps: obtaining a first index number of the first target vertex number among the vertex numbers of the number of vertices; determining a second index number based on the first index number and the number of vertices; and determining the vertex number indexed by the second index number among the vertex numbers of the number of vertices as the second target vertex number.

[0160] Optionally, the processor may be configured to store a computer program for performing the following steps: obtaining a first sum between a first index number and the number of vertices; obtaining the difference between the first sum and a target value; and performing a modulo operation on the difference and the number of vertices to obtain a second index number.

[0161] Optionally, the processor described above may be configured to store a computer program for performing the following steps: obtaining a second sum between a first index number and a target value; and performing a modulo operation on the second sum and the number of vertices to obtain a second index number.

[0162] Optionally, the processor may be configured to store a computer program for performing the following steps: acquiring topology information of the target model to be verified; determining that the topology information to be verified has been successfully verified in response to the topology information being consistent with the topology information; and determining that the topology information to be verified has failed to be verified in response to the topology information being inconsistent with the topology information.

[0163] Optionally, the processor may be configured to store a computer program for performing the following steps: acquiring topology information to be verified generated by the target model in at least one model processing stage.

[0164] Optionally, the processor described above may be configured to store a computer program for performing the following steps: converting the target vertex index array into a text string with at least one of the following information: the total number of vertices of the multiple faces, the number of multiple faces, and the identifiers of the multiple faces; generating topology information based on the text string.

[0165] Optionally, the processor described above can be configured to store a computer program for performing the following steps: calculating the hash value corresponding to the text string to obtain topological information.

[0166] In the processor of this embodiment, a method for generating topology information of a model is provided. The method involves rearranging the vertex indices of the number of vertices forming the same face in the original vertex indices array of the target model according to a specified arrangement rule, thereby generating a target vertex indices array. Since the target vertex indices array generated based on the specified arrangement rule is unique, the model topology information generated based on the target vertex indices array is also unique, and this topology information can uniquely identify the topology of the target model. Therefore, topology checking of the target model based on this topology information does not require relying on detection software, making it more convenient and faster. Furthermore, the amount of topology information data generated using this method is relatively small, which improves the generation efficiency of the target model's topology information and solves the technical problem of low generation efficiency of model topology information.

[0167] Figure 5 A schematic diagram of an electronic device according to an embodiment of the present disclosure. (See diagram below.) Figure 5 As shown, the electronic device 500 is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0168] like Figure 5As shown, the electronic device 500 is presented in the form of a general-purpose computing device. The components of the electronic device 500 may include, but are not limited to: at least one processor 510, at least one memory 520, a bus 530 connecting different system components (including memory 520 and processor 510), and a display 540.

[0169] The memory 520 stores program code that can be executed by the processor 510, causing the processor 510 to perform the steps described in the method section of the embodiments of this application according to various exemplary implementations of this disclosure.

[0170] The memory 520 may include a readable medium in the form of volatile memory cells, such as random access memory (RAM) 5201 and / or cache memory 5202, and may further include read-only memory (ROM) 5203, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.

[0171] In some instances, memory 520 may also include programs / utilities 5204 having a set (at least one) of program modules 5205, including but 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 an implementation of a network environment. Memory 520 may further include memory remotely located relative to processor 510, which can be connected to electronic device 500 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0172] Bus 530 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, peripheral bus, graphics acceleration port, processor 510, or a local bus using any of the various bus structures.

[0173] The display 540 may be, for example, a touchscreen liquid crystal display (LCD) that allows a user to interact with the user interface of the electronic device 500.

[0174] Optionally, the electronic device 500 can also communicate with one or more external devices 600 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 500, and / or any device that enables the electronic device 500 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via the input / output (I / O) interface 550. Furthermore, the electronic device 500 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via a network adapter 560. Figure 5 As shown, network adapter 560 communicates with other modules of electronic device 500 via bus 530. It should be understood that, although... Figure 5 As not shown, other hardware and / or software modules may be used in conjunction with electronic device 500, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0175] The aforementioned electronic device 500 may also include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply, and / or a camera.

[0176] Those skilled in the art will understand that Figure 5 The structure shown is for illustrative purposes only and does not limit the structure of the electronic device described above. For example, the electronic device 500 may also include components that are more... Figure 5 The more or fewer components shown, or having the same Figure 1 Different configurations are shown. The memory 520 can be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the model topology information generation method in this embodiment. The processor 510 executes various functional applications and data processing by running the computer program stored in the memory 520, thereby implementing the aforementioned model topology information generation method.

[0177] The sequence numbers of the embodiments disclosed above are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0178] In the above embodiments of this disclosure, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0179] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0180] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0181] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0182] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0183] The above description is only a preferred embodiment of this disclosure. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles of this disclosure, and these improvements and modifications should also be considered within the scope of protection of this disclosure.

Claims

1. A method for generating model topology information, characterized in that, include: Obtain a face sequence array of multiple faces constituting the target model, wherein the face sequence array is used to describe the face order of the multiple faces and the number of vertices of each face; Obtain the original vertex index array corresponding to the face sequence array, wherein the original vertex index array includes the vertex index of the number of vertices, and the vertex index is used to describe the vertex order of the vertices that constitute the same face; According to the specified arrangement rules, the vertex numbers of the number of vertices constituting the same face in the original vertex number array are rearranged in a secondary manner to generate a target vertex number array corresponding to the face sequence array; Based on the target vertex index array, the topological information of the target model is generated, wherein the topological information is used to describe the topological structure of the target model; The step of performing a secondary arrangement of the vertex indices of the number of vertices constituting the same face in the original vertex indices array according to a specified arrangement rule to generate a target vertex indices array corresponding to the face sequence array includes: determining a first target vertex indices among the vertex indices constituting the same face in the original vertex indices array; determining a target traversal order of the vertex indices constituting the same face based on the first target vertex indices and a second target vertex indices adjacent to the first target vertex indices; traversing the vertex indices constituting the same face in the target traversal order starting from the first target vertex indices to obtain traversal results; and combining the traversal results corresponding to the multiple faces in the face sequence array to form the target vertex indices array, wherein the first target vertex indices are either the smallest vertex indices among the vertex indices constituting the same face, or the largest vertex indices among the vertex indices constituting the same face; The process of generating topological information of the target model based on the target vertex index array includes: converting the target vertex index array and at least one of the following information into a text string: the total number of vertices of the plurality of faces, the number of the plurality of faces, and the identifier of the plurality of faces; and generating the topological information based on the text string. The method further includes: obtaining topology information to be verified of the target model, wherein the topology information to be verified is generated by the target model in at least one model processing stage; determining that the topology information to be verified is successfully verified in response to the topology information being consistent with the topology information; and determining that the topology information to be verified fails in response to the topology information being inconsistent with the topology information.

2. The method according to claim 1, characterized in that, Determining the first target vertex index from the vertex indices of the number of vertices constituting the same facet includes: Determine the vertex number that satisfies the target numerical relationship among the vertex numbers of the number of vertices constituting the same face, wherein the target numerical relationship is used to indicate the determination of the minimum vertex number among the vertex numbers of the number of vertices constituting the same face, or the target numerical relationship is used to indicate the determination of the maximum vertex number among the vertex numbers of the number of vertices constituting the same face. The vertex index that satisfies the target numerical relationship is determined as the first target vertex index.

3. The method according to claim 2, characterized in that, Based on the first target vertex index and the second target vertex index adjacent to the first target vertex index, the target traversal order of the vertex indices constituting the same facet is determined, including: Among the two second target vertex numbers adjacent to the first target vertex number, determine the third target vertex number that satisfies the target numerical relationship; The traversal order from the first target vertex index to the third target vertex index is determined as the target traversal order of the number of vertices constituting the same face.

4. The method according to claim 3, characterized in that, Determining the vertex number that satisfies the target numerical relationship from the vertex numbers of the number of vertices constituting the same face includes: determining the smallest or largest vertex number among the vertex numbers of the number of vertices constituting the same face as the vertex number that satisfies the target numerical relationship. Determining a third target vertex number that satisfies the target numerical relationship among two second target vertex numbers adjacent to the first target vertex number includes: determining the smallest or largest second target vertex number among the two second target vertex numbers as the third target vertex number that satisfies the target numerical relationship.

5. The method according to claim 1, characterized in that, The method further includes: Obtain the first index number of the first target vertex number among the vertex numbers of the number of vertices; The second index number is determined based on the first index number and the number of vertices; The vertex index indexed by the second index number among the vertex indices of the stated number of vertices is determined as the second target vertex index; The step of determining the second index number based on the first index number and the number of vertices includes: obtaining a first sum between the first index number and the number of vertices; obtaining the difference between the first sum and a target value, wherein the target value is determined by the number of bits between the vertex number indexed by the second index number and the first target vertex number in the vertex number array; and performing a modulo operation on the difference and the number of vertices to obtain the second index number.

6. The method according to claim 5, characterized in that, Determining the second index number based on the first index number and the number of vertices includes: Obtain the second sum between the first index number and the target value; The second index number is obtained by performing a modulo operation between the second sum and the number of vertices.

7. The method according to claim 1, characterized in that, Generating the topology information based on the text string includes: The topological information is obtained by calculating the hash value corresponding to the text string.

8. A device for generating model topology information, characterized in that, include: The first acquisition unit is used to acquire a face sequence array of multiple faces constituting the target model, wherein the face sequence array is used to describe the face order of the multiple faces and the number of vertices of each face; The second acquisition unit is used to acquire the original vertex number array corresponding to the face sequence array, wherein the original vertex number array includes the vertex number of the number of vertices, and the vertex number is used to describe the vertex order of the vertices constituting the same face; The arrangement unit is used to perform a secondary arrangement of the vertex indices of the number of vertices constituting the same face in the original vertex indices array according to a specified arrangement rule, so as to generate a target vertex indices array corresponding to the face sequence array; A generation unit is configured to generate topological information of the target model based on the target vertex index array, wherein the topological information is used to describe the topological structure of the target model; The arrangement unit is further configured to perform a secondary arrangement of the vertex indices of the number of vertices constituting the same face in the original vertex indices array according to a specified arrangement rule through the following steps, to generate a target vertex indices array corresponding to the face sequence array: In the original vertex indices array, a first target vertex indices are determined from the vertex indices of the number of vertices constituting the same face; based on the first target vertex indices and a second target vertex indices adjacent to the first target vertex indices, a target traversal order is determined for the vertex indices of the number of vertices constituting the same face; in the vertex indices of the number of vertices constituting the same face, the vertex indices of the number of vertices are traversed sequentially from the first target vertex indices according to the target traversal order to obtain a traversal result; the traversal results corresponding to the multiple faces in the face sequence array are combined into the target vertex indices array, wherein the first target vertex indices are either the smallest vertex indices among the vertex indices constituting the same face, or the largest vertex indices among the vertex indices constituting the same face; The generation unit is further configured to generate topological information of the target model based on the target vertex index array through the following steps: converting the target vertex index array and at least one of the following information into a text string: the total number of vertices of the plurality of faces, the number of the plurality of faces, and the identifier of the plurality of faces; generating the topological information based on the text string; The device is further configured to: acquire topology information to be verified of the target model, wherein the topology information to be verified is generated by the target model in at least one model processing stage; determine that the topology information to be verified is successfully verified in response to the topology information being consistent with the topology information; and determine that the topology information to be verified fails to be verified in response to the topology information being inconsistent with the topology information.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method according to any one of claims 1 to 7.

10. A processor, characterized in that, The processor is used to run a program, wherein the program is executed by the processor to perform the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Three-dimensional model simplification method and device, computer equipment and computer storage medium

    CN114241151A

  • Software processing apparatus and method for creating three-dimensional topologically complete surface boundary representations from arbitrary polygon models

    US20090284528A1