Meshing method and system for implicit expression model, computer device, computer readable storage medium and computer program product

By gradually meshing the method of enclosing the space and filling it numerically, the problem of slow calculation speed of implicit model conversion to mesh model is solved, and the calculation speed and model accuracy are improved.

CN119578009BActive Publication Date: 2025-05-16SHANGHAI VOXELDANCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510126074.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-27
Publication Date
2025-05-16
Estimated Expiration
2045-01-27

AI Technical Summary

Technical Problem

In the prior art, the calculation speed of converting implicit models to grid models is slow, resulting in large amounts of calculation.

Method used

By creating a surrounding space that completely wraps the implicit expression model and meshing it step by step, only the subgrids with the threshold interval containing the value interval are meshed at the next level until the preset resolution is met. Then, the subgrid with the implicit expression value interval containing the threshold interval is selected as the key grid in the subgrid that meets the preset resolution and is numerically filled to generate a mesh model.

Benefits of technology

The calculation amount of implicit expression model conversion into grid model is reduced, the calculation speed is improved, and a more accurate voxel grid model is generated through accurate numerical filling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119578009B_ABST
    Figure CN119578009B_ABST
Patent Text Reader

Abstract

The present application discloses a gridding method and system, computer equipment, computer-readable storage medium and computer program product for an implicit expression model, wherein the gridding method comprises the following steps: creating an enclosing space with a preset resolution that can completely enclose the implicit expression model; gridding the enclosing space step by step, including: recursively determining the value range of the implicit expression of each sub-grid of the current level to grid the sub-grids whose value range contains a threshold range to the next level until each sub-grid of the current level meets the preset resolution; selecting the sub-grid whose value range of the implicit expression contains the threshold range from each sub-grid that meets the preset resolution as the key grid for numerical filling to generate a gridded model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of 3D printing technology, and specifically to a meshing method and system for implicitly expressing a model, a computer device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Implicit modeling is widely used in technical fields such as 3D printing and computer-aided design (CAD). Implicit models constructed by implicit modeling have many advantages. For example, implicit models constructed by implicit modeling can have smooth surfaces and complex structures, and can easily perform Boolean operations. Moreover, the accuracy of the model does not depend on the resolution.

[0003] However, when implicit modeling is applied to the field of 3D printing, due to the format restrictions on the input model of most current 3D printing-related software (such as CAE software, 3D printing pre-processing software, etc.), and the format restrictions on the input model to be rendered when rendering the model, the implicit model often cannot be directly input, and the implicit model needs to be converted into an adaptive mesh model. For example, for CAE software, the implicit model needs to be converted into the voxel mesh model required by the CAE software. For another example, for pre-processing software, the implicit model needs to be converted into a triangular mesh model. However, the current process of converting the implicit model to a mesh model requires a large amount of calculation, which leads to slow calculation speed.

[0004] Therefore, how to improve the calculation speed of converting implicit models into mesh models is a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the shortcomings of the above-mentioned related technologies, the purpose of the present application is to provide a gridding method and system for an implicit expression model, a computer device, a computer-readable storage medium and a computer program product, so as to overcome the technical problem existing in the above-mentioned related technologies of how to improve the calculation speed of converting an implicit model into a grid model.

[0006] To achieve the above-mentioned purpose and other related purposes, the first aspect disclosed in the present application discloses a gridding method for an implicit expression model, comprising the following steps: creating an enclosing space with a preset resolution that can completely enclose the implicit expression model; gridding the enclosing space step by step, including: recursively determining the value range of the implicit expression of each sub-grid of the current level to grid the sub-grids whose value range contains a threshold range to the next level until each sub-grid of the current level meets the preset resolution; selecting the sub-grid whose value range of the implicit expression contains the threshold range from each sub-grid that meets the preset resolution as the key grid for numerical filling to generate a gridded model.

[0007] The second aspect of the present application discloses a gridding system for an implicit expression model, comprising: an enclosing space creation module, used to create an enclosing space with a preset resolution that can completely enclose the implicit expression model; a gridding and filling module, used to grid the enclosing space step by step, and the gridding of the enclosing space step by step includes: recursively executing to determine the value range of the implicit expression of each sub-grid of the current level respectively to grid the sub-grids whose value range contains a threshold range for the next level, until each sub-grid of the current level meets the preset resolution; and also used to select the sub-grid whose value range of the implicit expression contains the threshold range from each sub-grid that meets the preset resolution as the key grid for numerical filling; a conversion module, used to generate a gridded model based on the enclosing space after gridding and filling.

[0008] The third aspect of the present application discloses a computer device, comprising: a storage device for storing at least one program; a processing device connected to the storage device, for calling the at least one program from the storage device and implementing the gridding method of the implicit expression model as described in the first aspect of the present application when executing it.

[0009] The fourth aspect of the present application discloses a computer-readable storage medium storing at least one program, which, when called and executed by a computer processor, implements the gridding method of the implicit expression model as described in the first aspect of the present application.

[0010] The fifth aspect of the present application discloses a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the gridding method of the implicit expression model as described in the first aspect of the present application.

[0011] In summary, the meshing method and system of the implicit expression model, computer equipment, computer-readable storage medium and computer program product disclosed in the present application, in the process of gridding the enclosing space that can completely enclose the implicit expression model step by step, only the sub-grids whose value interval includes a threshold interval are meshed at the next level until the sub-grids at the current level meet the preset resolution, and the sub-grids whose value interval of the implicit expression includes the threshold interval are selected from the sub-grids that meet the preset resolution as key grids for numerical filling to generate a gridded model. In this way, the present application can reduce the amount of calculation for converting the implicit expression model (also referred to as an implicit model or a model based on implicit expression) into a grid model and improve the calculation speed for converting the implicit expression model into a grid model. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The features and advantages of the inventions of the present application can be better understood by referring to the exemplary embodiments and drawings described in detail below. The drawings are briefly described as follows:

[0013] Figure 1 Shown is a flowchart of a gridding method for an implicit expression model in one embodiment of the present application.

[0014] Figure 2 Shown is a schematic diagram of a parameter configuration window in an embodiment of the present application.

[0015] Figure 3 Shown is a schematic diagram of an enclosed space and the enclosed space after first meshing in one embodiment of the present application.

[0016] Figure 4 It is a schematic diagram showing an embodiment of the present application in which a sub-grid is evenly divided using the length and width directions of the sub-grid as directions in which even division can be performed.

[0017] Figure 5 It is a schematic diagram showing an embodiment of the present application in which a sub-grid is evenly divided using the length direction of the sub-grid as the direction in which even division can be performed.

[0018] Figure 6 Displayed for this application Figure 3 The schematic diagram of the next-level gridding of the sub-grid whose value interval of the implicit expression in the illustrated embodiment includes the threshold interval.

[0019] Figures 7 to 9 Schematic diagrams showing the relative positional relationship between the key grid and the implicit expression model in different embodiments of the present application are shown respectively.

[0020] Fig.10 Shown is a module block diagram of a gridding system for an implicit expression model in one embodiment of the present application.

[0021] Fig.11 Shown is a schematic diagram of the structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0022] The following is a description of the embodiments of the present application by specific specific embodiments, and those familiar with the technology can easily understand the advantages of the present application and the technical effects that can be achieved by the content disclosed in this specification. In the following description, some embodiments can refer to the drawings pointed to. It should be understood that other embodiments without drawings can also be used, and specific steps, modules or units, electrical and operational changes can be made without departing from the spirit and scope of the present application. The detailed description below should not be considered restrictive, and the scope of the embodiments of the present application is limited only by the claims published by the present application. The terms used herein are only for describing specific embodiments and are not intended to limit the present application.

[0023] Although the term first, second or third etc. is used to describe various elements or parameters in this article in some instances, these elements or parameters should not be limited by these terms. These terms are only used to distinguish an object or parameter from another object or parameter, and are not used to limit the order, timing, priority or importance of multiple objects. For example, the first threshold value can be referred to as the second threshold value, and similarly, the second threshold value can be referred to as the first threshold value, without departing from the scope of the various described embodiments, the first threshold value and the second threshold value are both describing a threshold value, but unless the context is otherwise clearly indicated, they are not the same threshold value.

[0024] Furthermore, as used in this article, the singular forms "one", "an" and "the" are intended to also include plural forms, unless there is an indication to the contrary in the context. It should be further understood that the terms "comprising", "including" indicate the presence of the described features, steps, operations, elements, components, projects, kinds, and / or groups, but do not exclude the presence, occurrence or addition of one or more other features, steps, operations, elements, components, projects, kinds, and / or groups. For example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. In addition, the term "and / or" that may be used hereinafter, describes the association relationship of associated objects, indicating that three kinds of relationships may exist, for example, A and / or B, which can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / ", if not otherwise specified, generally represents that the associated objects before and after are a kind of "and / or" relationship. In addition, in the description of the embodiments of the present application, "multiple" refers to two or more than two.

[0025] Some nouns or terms used in each embodiment of the present application are explained below, and the nouns or terms are also used as a part of the content of the invention. It will be appreciated by those skilled in the art that, unless otherwise defined, all terms including technical terms and scientific terms used herein have the same meaning as the general understanding of the technicians in the field to which the present application belongs. It should also be understood that those terms such as those defined in general dictionaries should be understood to have a meaning consistent with the meaning in the context of the prior art, and unless specifically defined as herein, will not be interpreted with an idealized or overly formal meaning.

[0026] The computer three-dimensional space described in the embodiments of the present application is a computer space with three dimensions (X-axis, Y-axis, and Z-axis) for constructing a 3D model. In the following embodiments, the direction corresponding to the X-axis in the enclosed space and the grid is called the length direction, the direction corresponding to the Y-axis in the enclosed space and the grid is called the width direction, and the direction corresponding to the Z-axis in the enclosed space and the grid is called the height direction. In one embodiment, the 3D model is a model constructed in the field of 3D printing technology, and the 3D model constructed in the computer three-dimensional space can use a 3D printer to print out a 3D object in the actual physical space. Among them, the 3D object can be any 3D object such as aerospace parts, automotive parts, industrial equipment parts, handicrafts, medical equipment, etc.

[0027] The implicit expression model (also referred to as an implicit model or a model based on implicit expression) described in the embodiments of the present application expresses the geometric shape of the 3D model implicitly. The input of the implicit expression is the three-dimensional coordinates of a point in the three-dimensional space of the computer, and the output is a numerical value indicating the relative position relationship between the point and the surface of the 3D model, which is also referred to as an output value in some embodiments. Specifically, the three-dimensional coordinates of each point in the three-dimensional space of the computer are respectively input into the implicit expression, wherein the set of points with an output value of 0 defines the outer contour shape of the 3D model, and these points can be regarded as being on the 3D model. If the implicit output value corresponding to the point is less than 0, it indicates that the point is inside the 3D model, and if the implicit output value corresponding to the point is greater than 0, it indicates that the point is outside the 3D model. Of course, in other embodiments, depending on the difference of the implicit expression, if the implicit output value corresponding to the point is less than 0, it can also indicate that the point is outside the 3D model, and if the implicit output value corresponding to the point is greater than 0, it indicates that the point is inside the 3D model.

[0028] The implicit expression (or simply referred to as implicit) described in the embodiments of the present application can be of any type or any combination of types. For example, in one example, the implicit expression is configured as an equation, that is, the geometric shape of the 3D model is expressed by an equation. In this example, a 3D model of a sphere with a radius of 1 is taken as an example, and its corresponding implicit expression is an implicit equation: ,in, The value of is the output value of the implicit equation, is the input of the implicit equation. In another example, the implicit expression is configured to express the geometric shape of the 3D model through a function or a combination of functions, for example, a maximum value function max(), a minimum value function min(), a length function length(), and a combination thereof. In yet another example, the implicit expression is configured to express the geometric shape of the 3D model through a conversion relationship or a specified algorithm, for example, a triangular mesh is converted into an implicit conversion relationship. The above examples are only illustrative. In other examples, the implicit expression can also be configured as a combination of any of the above examples. The present application does not limit the type or method of implicit expression, as long as it can express the geometric shape of the 3D model in the manner defined above.

[0029] The mesh model described in the embodiments of the present application refers to a model expressed, composed, or spliced ​​with the basic units of the mesh. Among them, the basic unit of the mesh can be, for example, a cubic unit or a patch unit, the cubic unit can be a cube or a cuboid unit, and the patch unit can be a two-dimensional plane structure of a basic geometric shape (such as a triangle, a quadrilateral, etc.). Taking the basic unit of the mesh as a cubic unit as an example, the corresponding mesh model is a model formed by cubic units, which is also referred to as a voxel mesh model in some examples. Taking the basic unit of the mesh as a triangular patch unit as an example, the corresponding mesh model is a mesh model expressed by triangular patches, which is also referred to as a triangular mesh model or a triangular patch model in some examples.

[0030] In view of the technical problem of how to improve the calculation speed of converting an implicit model into a grid model described in the background technology, the present application discloses a gridding method and system, a computer device, a computer-readable storage medium, and a computer program product for an implicit expression model. Among them, the gridding method can, in the process of gridding the enclosing space that can completely enclose the implicit expression model step by step, only perform the next-level gridding on the subgrids whose value intervals include a threshold interval until each subgrid of the current level meets the preset resolution, and select the subgrids whose value intervals of the implicit expression include the threshold interval from each subgrid that meets the preset resolution as key grids for numerical filling to generate a gridded model. In this way, the present application can reduce the amount of calculation for converting the implicit expression model (also referred to as the implicit model in some embodiments) into a grid model and improve the calculation speed for converting the implicit expression model into a grid model.

[0031] The present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. The technical solutions in the embodiments of the present application are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments and technical effects obtained by ordinary technicians in this field without creative work should belong to the scope of protection of this application. The "one implementation method", "implementation method" or similar words mentioned in the whole text of this specification mean that the specific features, structures or characteristics described together with the implementation method are included in at least one implementation method of the present application. Therefore, in the whole text of this specification, the appearance of the phrases "in one implementation method", "in an implementation method" and similar words may (but not necessarily) refer to the same implementation method.

[0032] In some embodiments, the present application provides a gridding method for an implicit expression model, which can be executed by a computer device configured with a gridding system for an implicit expression model. The gridding system for the implicit expression model is a software tool or software module that can process data, and it executes the gridding method for the implicit expression model with the help of the operating environment provided by the hardware device and / or operating system in the computer device.

[0033] In one embodiment, the computer device can be configured as an electronic device, that is, the meshing method of the implicit expression model is executed by the electronic device. For example, the electronic device includes desktop computers, laptops, tablet computers, smart TVs, smart phones, tablets, industrial computers and other devices. The electronic device can also be an electronic device composed of a host with multiple virtual machines and a human-computer interaction device corresponding to each virtual machine (such as a touch screen, keyboard and mouse).

[0034] In one embodiment, the computer device may be configured as a server, that is, the server executes the gridding method of the implicit expression model. The server may be arranged on one or more physical servers according to various factors such as function and load. In some examples, the server may be a server based on a cloud architecture, and the server refers to a cloud computing platform provided by a cloud computing provider, and the cloud computing platform can provide services such as IaaS (Infrastructure-as-a-Service), PaaS (Platform-as-a-Service), and SaaS (Software-as-a-Service). Among them, the cloud computing platform includes a public cloud, a private cloud, and a hybrid cloud. In some examples, the server may be composed of a distributed or centralized server cluster. For example, the server cluster is composed of at least one physical server. Multiple virtual servers are configured in each physical server, each virtual server runs at least one functional module in the system, and each virtual server communicates through a network.

[0035] See also Figure 1 , which is a flow chart of a method for meshing an implicit expression model in an embodiment of the present application. As shown in the figure, the method for meshing an implicit expression model includes step S110, step S120, and step S130. The following takes the method for meshing an implicit expression model executed by a computer device as an example to illustrate various embodiments.

[0036] In step S110, the computer device creates an enclosing space with a preset resolution that can completely enclose the implicit expression model. It should be noted that the enclosing space with a preset resolution can be understood as the enclosing space having a preset resolution, and the subsequent division operation of the enclosing space cannot be performed without restriction, and does not indicate whether the enclosing space in step S110 has been divided according to the preset resolution. In addition, the creation of the enclosing space described in the relevant embodiments of this step can be understood as predefining an enclosing space, and it does not necessarily need to be presented in a visual manner in the display interface of the computer device.

[0037] The preset resolution is used to indicate the granularity at which the bounding space can be gridded, which can be predefined or pre-stored, or determined based on user input. In one embodiment, the preset resolution is configured as the size of the smallest unit (or unit size) at which the bounding space can be divided.

[0038] Further, the preset resolution includes the resolution in the X-axis direction (also referred to as the resolution in the length direction or the X-axis resolution), the resolution in the Y-axis direction (also referred to as the resolution in the width direction or the Y-axis resolution), and the resolution in the Z-axis direction (also referred to as the resolution in the height direction or the Z-axis resolution). Taking the preset resolution configured as the size of the above-mentioned minimum unit as an example, the resolution in the X-axis direction refers to the size of the minimum unit in the X-axis direction, which can be understood as the length of the minimum unit, the resolution in the Y-axis direction refers to the size of the minimum unit in the Y-axis direction, which can be understood as the width of the minimum unit, and the resolution in the Z-axis direction refers to the size of the minimum unit in the Z-axis direction, which can be understood as the height of the minimum unit. Among them, the resolutions in the X-axis, Y-axis, and Z-axis directions can be exactly the same or different. For the sake of convenience, in the following embodiments, the resolutions in the X-axis, Y-axis, and Z-axis directions are all the same as an example for explanation.

[0039] In one embodiment, step S110 includes creating the bounding space and configuring the preset resolution based on the length, width, height and grid parameters of the bounding box of the implicit expression model.

[0040] The bounding box of the implicit expression model may be defined as the minimum space surrounding the implicit expression model, which may be, for example, a bounding box in the form of an AABB (Axis Aligned Bounding Box) or a bounding box in the form of an OBB (Oriented Bounding Box). The length, width, and height of the bounding box are the dimensions of the bounding box on the X-axis, the Y-axis, and the Z-axis, respectively.

[0041] The grid parameters may be, for example, predefined or pre-stored, or may be determined based on user input. In some examples, the grid parameters include the minimum unit size of the grid, and the minimum unit size may further include the size (length) occupied by the minimum unit on the X-axis, the size (width) occupied on the Y-axis, and the size (height) occupied on the Z-axis. In another example, the grid parameters include the minimum number of units in the length, width, and height directions of the enclosed space.

[0042] In one embodiment, the computer device provides a parameter configuration window for the user to input the grid parameters. Figure 2, which is a schematic diagram of a parameter configuration window in an embodiment of the present application, is shown by taking the grid parameter as the minimum unit size of the grid as an example. The parameter configuration window provides input boxes for the size of the minimum unit of the grid in the X-axis direction, the size of the minimum unit of the grid in the Y-axis direction, and the size of the minimum unit of the grid in the Z-axis direction. The user can enter data in the corresponding input boxes to complete the input of the grid parameters. It should be understood that Figure 2 This is just an example. For example, in an example where the smallest unit of the grid is a cube (that is, the length, width and height of the smallest unit are the same), the parameter configuration window may only provide a side length input box, and the user only needs to enter the size data of the side length. In addition, in an example where the grid parameter configuration is other parameters, those skilled in the art may also make adaptive adjustments to the content and interface layout that can be displayed in the parameter configuration window under the guidance of this application, and this application does not limit this.

[0043] In one embodiment, for example, in an embodiment where the grid parameter is the minimum unit size of the grid, the computer device further creates the enclosing space according to the length, width, and height of the bounding box of the implicit expression model and the grid parameter, and directly uses the minimum unit size as the preset resolution. Specifically, the computer device may determine the length of the minimum unit as the X-axis resolution and may determine the length of the enclosing space according to the length of the minimum unit and the length of the bounding box, the computer device may also determine the width of the minimum unit as the Y-axis resolution and may determine the width of the enclosing space according to the width of the minimum unit and the width of the bounding box, the computer device may also determine the height of the minimum unit as the Z resolution and may determine the height of the enclosing space according to the height of the minimum unit and the height of the bounding box, in this way, the preset resolution is determined and the enclosing space is created.

[0044] Taking determining the length of the enclosing space as an example, how a computer device determines the length, width and height of the enclosing space is explained. Specifically, the computer device can round up the value obtained by dividing the length of the enclosing box by the minimum unit length as the number of minimum units in the length direction, and multiply the number by the minimum unit length to obtain the length of the enclosing space. The width and height of the enclosing space can be determined in the same way. Of course, other ways can also be used to determine the length, width and height of the enclosing space. For example, the length of the enclosing box divided by the minimum unit length is rounded up and then added to a preset number as the number of minimum units in the length direction. The preset number is, for example, any integer from 1 to 10. The corresponding width and height of the enclosing space can be determined in the same way. The present application does not limit the method for determining the length, width and height of the enclosing space. It is only necessary to ensure that the length, width and height of the enclosing space are not less than the length, width and height of the enclosing box. That is, the size of the enclosing space is slightly larger than the size of the enclosing box. This ensures that the created enclosing space can completely enclose the implicit expression model.

[0045] In another embodiment, for example, in an embodiment where the grid parameter is the minimum number of units in the length, width and height directions of the enclosing space, the computer device may directly determine the length, width and height of the enclosing space according to the length, width and height of the enclosing box of the implicit expression model to create the enclosing space, and further configure the preset resolution according to the length, width and height of the enclosing space and the grid parameter. Wherein, for example, the method of determining the length, width and height of the enclosing space may be to increase a certain size on the basis of the length, width and height of the enclosing box to determine the length, width and height of the enclosing space, or to directly determine the length, width and height of the enclosing space according to the length, width and height of the enclosing box. The method of configuring the preset resolution may be that the computer device determines the preset resolution according to the minimum number of units in the length, width and height directions and the length, width and height of the enclosing space. For example, the length, width and height of the enclosing space are L1, L2, and L3 respectively, and the minimum number of units in the length, width and height are a, b, and c respectively, then the preset resolution is configured to include the X-axis resolution L1 / a, the Y-axis resolution L2 / b, and the Z-axis resolution L3 / c.

[0046] In step S120, the computer device performs gridding of the enclosed space step by step, including: recursively determining the value interval of the implicit expression of each sub-grid of the current level to perform next-level gridding on the sub-grids whose value interval includes a threshold interval, until each sub-grid of the current level meets the preset resolution. The implicit expression is the implicit expression of the implicit expression model, which will not be described in detail in the subsequent embodiments.

[0047] In one embodiment, the step of meshing the enclosed space step by step by the computer device further includes meshing the enclosed space for the first time to obtain a plurality of sub-grids meshed for the first time. Specifically, the computer device evenly divides the enclosed space in the length direction, the width direction, and the height direction to obtain a plurality of sub-grids after the first meshing. Figure 3 , which is a schematic diagram of an enclosed space and a first gridding of the enclosed space in an embodiment of the present application. As shown in the figure, the enclosed space V is divided into two equal parts in the length direction, the width direction, and the height direction to obtain 8 subgrids. For the convenience of illustration, Figure 3 The subgrids v1, v2, v3, v4, v5, v6, v7, and v8 are shown in a separate list, but this does not mean that the subgrids will be separated or arranged in the way shown. Figure 3In the illustrated embodiment, the equal division in the length direction, the width direction, and the height direction is performed by dividing into two equal parts, but in other embodiments, it may be divided into three equal parts, four equal parts, or other equal parts, or different equal parts in different directions, or it may be approximately divided into two equal parts. The approximate equal division means that the subgrids after the approximate equal division in the corresponding directions are not much different in the corresponding directions (for example, the difference in the number of minimum units included in the subgrids after the approximate equal division in the corresponding directions is within 50%). For example, when the number of minimum units included in the length, width, and / or height direction of the enclosed space is odd, the corresponding directions may be approximately divided into two equal parts. For example, when the number of minimum units included in the length direction of the enclosed space is 2047, the computer device may perform an approximate equal division in the length direction of the enclosed space. Taking the approximate equal division into two equal parts as an example, after the approximate equal division into two equal parts, the length direction includes two subgrids, the number of minimum units included in the length direction of one subgrid is 1024, and the number of minimum units included in the length direction of the other subgrid is 1023. In the following embodiments, the method of dividing equally in different directions into two equal parts is taken as an example for description.

[0048] The computer device may use the first meshing as the first-level meshing, and recursively execute the multiple sub-grids after the first-level meshing as the multiple sub-grids of the first level to respectively determine the value interval of the implicit expression of each sub-grid of the current level to perform the next-level meshing on the sub-grids whose value interval contains a threshold interval, until each sub-grid of the current level meets the preset resolution. Recursive execution is to select sub-grids with the same selection conditions to continue the next-level subdivision until the termination condition is reached. In this embodiment, the selection condition of each level is that the value interval of the implicit expression of the sub-grid of the level contains the threshold interval, and the termination condition is that the sub-grid of the level meets the preset resolution. Among them, each sub-grid of the current level meets the preset resolution means that each sub-grid of the current level reaches the corresponding resolution in the length, width and height directions.

[0049] Specifically, the recursive execution process described in this embodiment can be expanded as follows: when each sub-grid of the first level does not reach the preset resolution, the computer device will respectively determine the value interval of the implicit expression of each sub-grid of the first level, and perform second-level gridding on the sub-grids whose value interval includes the threshold interval, so as to obtain each sub-grid of the second level. Then, when each sub-grid of the second level does not reach the preset resolution, the computer device will continue to determine the value interval of the implicit expression of each sub-grid of the second level, and continue to perform third-level gridding on the sub-grids whose value interval includes the threshold interval, so as to obtain each sub-grid of the third level. In this way, the next level of gridding is continuously performed until each sub-grid of the current level meets the preset resolution, and then gridding is no longer continued.

[0050] In one embodiment, the step of respectively determining the value interval of the implicit expression of each sub-grid of the current level to perform next-level gridding on the sub-grids whose value intervals include a threshold value interval includes respectively determining the value interval of the implicit expression of each sub-grid of the current level, comparing the threshold value interval with the value interval of each sub-grid, and gridding the corresponding sub-grid to the next level under the condition that the value interval is judged to include the threshold value interval.

[0051] The value interval of the implicit expression of the sub-grid represents the estimated range of the numerical interval of all output values ​​obtained by inputting the implicit expression of the implicit expression model into all points in the sub-grid. The estimated range is wider than (or greater than) the numerical interval formed by the minimum and maximum of all output values. For example, after all points in a sub-grid input the implicit expression, the numerical interval formed by the minimum and maximum of the output values ​​is [i, j]. Then, the lower limit i1 in the value interval [i1, j1] of the implicit expression of the sub-grid is less than or equal to the lower limit i of the numerical interval, and the upper limit j1 is greater than or equal to the upper limit j of the numerical interval.

[0052] In one embodiment, a computer device determines a value interval of a sub-mesh based on the diagonal vertices of the sub-mesh. The diagonal vertices of the sub-mesh are the two endpoints of the body diagonal of the sub-mesh. For example, the diagonal vertices of the sub-mesh are configured to correspond to the point closest to the origin of the coordinate system (the minimum position point) and the point farthest from the origin of the coordinate system (the maximum position point). In one example, for example, the implicit expression is configured as an equation, a function, a combination of functions, or a combination of function equations. The computer device may pre-store a corresponding interval range obtaining algorithm, and the computer device may call the interval range obtaining algorithm based on the determined diagonal vertices of the sub-mesh to output the value interval. In another example, the computer device determines the body diagonal length of the sub-mesh based on the diagonal vertices of the sub-mesh to determine the value interval of the sub-mesh based on the output value of the implicit expression of the body diagonal length and the center point of the sub-mesh. Specifically, the computer device determines the body diagonal length r of the sub-mesh based on the coordinates of any pair of diagonal vertices of the sub-mesh, and the output value p obtained by inputting the coordinates of the center point of the sub-mesh into the implicit expression, and uses the difference between the output value p and half of the body diagonal length r as the lower limit of the value range, and uses the sum of the output value p and half of the body diagonal length r as the upper limit of the value range, thereby obtaining the value range of the sub-mesh as [p-0.5r, p+0.5r]. In this embodiment, the value range of the sub-mesh can be quickly obtained while ensuring that the value range must contain the actual output value range, thereby improving the gridding calculation speed of the implicit expression model.

[0053] In another embodiment, the computer device determines the value interval of the sub-mesh based on the key points of the sub-mesh. Specifically, the key points of the sub-mesh are respectively substituted into the implicit expression to obtain multiple output values, and the interval consisting of the minimum and maximum values ​​of the multiple output values ​​obtained is determined as the value interval of the sub-mesh. In one example, the key points include the vertices of the sub-mesh, the center point of the sub-mesh, the midpoint of the edge of the sub-mesh, the center point of the face of the sub-mesh, or the corner vertex of the sub-mesh, but it is not limited to this. In other examples, those skilled in the art can add other points in the sub-mesh (such as points on the body diagonal) as key points according to the accuracy requirements under the enlightenment of this application.

[0054] It should be noted that the present application does not limit the method for determining the value range of the implicit expression of the sub-grid, as long as the estimated value of the output value range can be quickly obtained.

[0055] According to the method of determining the value interval of the sub-grid described in any of the above embodiments, the value interval of the implicit expression of each sub-grid of the current level can be determined, so as to compare the threshold interval with the value interval of each sub-grid respectively, and then determine whether the value interval of each sub-grid includes the threshold interval. In the following embodiments, the implicit configuration is that the implicit output value corresponding to the point is less than 0, indicating that the point is inside the 3D model, and the implicit output value corresponding to the point is greater than 0, indicating that the point is outside the 3D model.

[0056] In one embodiment, the threshold interval is configured as a boundary value of the implicit expression. The boundary value of the implicit expression represents the output value of the implicit expression of the point on the outer contour of the implicit expression model. Taking the output value of 0 to represent the point on the outer contour as an example, the boundary value is 0, that is, in this embodiment, the threshold interval is configured as a single point interval [0, 0]. In this embodiment, comparing the threshold interval with the value interval of each sub-grid can be, for example, comparing the lower limit value and / or upper limit value of the value interval of the sub-grid with the boundary value. Further, in one example, when the lower limit value of the value interval of the sub-grid is greater than the boundary value, it is determined that the value interval is greater than the threshold interval. At this time, the sub-grid is completely outside the implicit expression model. For example, the value interval of a sub-grid is [1, 2], and the boundary value is 0, then it is determined that the value interval of the sub-grid is greater than the threshold interval. In another example, when the upper limit value of the value interval of a sub-grid is less than the boundary value, it is determined that the value interval is less than the threshold interval. At this time, the sub-grid is completely located inside the implicit expression model. For example, the value interval of a sub-grid is [-2, -1], and the boundary value is 0, then the value interval of the sub-grid is determined to be less than the threshold interval. In yet another example, when the lower limit value of the value interval of a sub-grid is less than or equal to the boundary value and the upper limit value of the value interval is greater than or equal to the boundary value, it is determined that the value interval of the corresponding sub-grid includes the threshold interval. At this time, the sub-grid may be completely located inside the implicit expression model, may be completely located outside the implicit expression model, or may be partially located inside the implicit expression model and partially located outside the implicit expression model. For example, the value interval of a sub-grid is [-1, 1], and the boundary value is 0, then the value interval of the sub-grid is determined to include the threshold interval.

[0057] In another embodiment, the threshold interval is configured as an interval with a first threshold as an upper limit and a second threshold as a lower limit, which includes the boundary value of the implicit expression. In other words, the boundary value of the implicit expression is included in the threshold interval with the first threshold as an upper limit and the second threshold as a lower limit. In one example, the first threshold is a positive number close to 0, and the second threshold is a negative number close to 0. For example, the first threshold can be any positive number between [0-0.5], and the second threshold can be any negative number between [-0.5-0]. In this embodiment, comparing the threshold interval with the value interval of each sub-grid can be, for example, comparing the lower limit value of the value interval of the sub-grid with the upper limit value of the threshold interval and / or comparing the upper limit value of the value interval of the sub-grid with the lower limit value of the threshold interval. Furthermore, in one example, when the lower limit value of the value interval of a sub-grid is greater than the first threshold value, it is determined that the value interval is greater than the threshold interval. At this time, the sub-grid is completely outside the implicit expression model. For example, the threshold interval is configured as [-0.1, 0.1], and the value interval of a sub-grid is [0.2, 0.4], then it is determined that the value interval is greater than the threshold interval. In another example, when the upper limit value of the value interval of a sub-grid is less than the second threshold value, it is determined that the value interval is less than the threshold interval. At this time, the sub-grid is completely inside the implicit expression model. For example, the threshold interval is configured as [-0.1, 0.1], and the value interval of a sub-grid is [-1, -0.3], then it is determined that the value interval is less than the threshold interval. In another example, when the lower limit of the value interval of the sub-grid is less than or equal to the first threshold value and the upper limit of the value interval is greater than or equal to the second threshold value, it is determined that the value interval of the corresponding sub-grid includes the threshold interval. At this time, the sub-grid may be completely inside the implicit expression model, or completely outside the model, or partly inside the model and partly outside the model. For example, if the value interval of a sub-grid is [-1, 0.05] and the threshold interval is [-0.1, 0.1], it is determined that the value interval of the sub-grid includes the threshold interval.

[0058] In other embodiments, when the implicit is configured so that the implicit output value corresponding to the point is less than 0, indicating that the point is outside the 3D model, and the implicit output value corresponding to the point is greater than 0, indicating that the point is inside the 3D model, then under the condition that the value interval is greater than the threshold interval, it is determined that the sub-grid is completely located inside the implicit expression model; under the condition that the value interval is less than the threshold interval, it is determined that the sub-grid is completely located outside the implicit expression model.

[0059] The computer device performs next-level gridding on the corresponding sub-grid under the condition that the value interval contains the threshold interval. In one embodiment, the next-level gridding is configured to traverse the length, width, and height directions of the current-level sub-grid to perform gridding in a manner of averaging the directions in which averaging can be performed. Specifically, when the current-level sub-grid is gridded to the next level, the length, width, and height directions of the current-level sub-grid are traversed, and the directions that do not reach the corresponding resolution are regarded as directions in which averaging can be performed. The directions in which averaging can be performed on the sub-grid of the current level are averaged to achieve the next-level gridding of the sub-grid. Among them, the method of averaging the directions in which averaging can be performed on the sub-grid of the current level is the same or similar to the method of averaging the length direction, width direction, and height direction in the first gridding mentioned above, and will not be repeated here.

[0060] Taking the method of performing equal division in the direction where equal division can be performed as bisection as an example for detailed description, if the length, width and height directions are all directions where equal division can be performed, then after performing the next level of gridding on a sub-grid, the sub-grid can be divided into 8 sub-grids. In this embodiment, the method of dividing the sub-grids is the same as Figure 3 The division method of the first meshing is the same as shown; if only two of the length, width and height directions are directions that can be equally divided, then the sub-mesh can be divided into 4 sub-meshes after the next level of meshing. Figure 4 , shows a schematic diagram of an embodiment of the present application in which a sub-grid is divided equally in its length and width direction. As shown in the figure, four sub-grids (sub-grid v91, sub-grid v92, sub-grid v93, and sub-grid v94) can be obtained by dividing the length and width of a sub-grid v9 equally. If only one of the length, width, and height directions is a direction in which equal division can be performed, the sub-grid can be divided into two sub-grids after the next level of gridding is performed on the sub-grid. Please refer to Figure 5 , which is a schematic diagram showing an embodiment of the present application in which a sub-grid is evenly divided along its length direction as a direction in which even division can be performed. As shown in the figure, two sub-grids (sub-grid v100 and sub-grid v101) can be obtained after evenly dividing a sub-grid v10 along its length direction.

[0061] In a specific embodiment, please continue to refer to Figure 3 and Figure 6 , Figure 6 Displayed for this application Figure 3 The schematic diagram of the next level of gridding of the subgrids whose value interval of the implicit expression in the embodiment shown includes the threshold interval, for example, according to any of the above-mentioned embodiments, Figure 3The subgrids whose implicitly expressed value intervals in the multiple subgrids (subgrid v1, subgrid v2, subgrid v3, subgrid v4, subgrid v5, subgrid v6, subgrid v7, and subgrid v8) after the first level of gridding include subgrids v1, subgrid v2, subgrid v5, and subgrid v6. Then, only subgrid v1, subgrid v2, subgrid v5, and subgrid v6 need to be subdivided at the next level, while the remaining subgrids (i.e., subgrid v3, subgrid v4, subgrid v7, and subgrid v8) do not need to be subdivided further. Taking the next level of gridding of subgrid v6 as an example, the length, width, and height directions of subgrid v6 will be traversed respectively. For example, if the length, width, and height directions of subgrid v6 are all directions that do not reach the corresponding resolution, the length, width, and height directions of subgrid v6 are used as directions that can be averaged. After the three directions are averaged, the second level of gridding of subgrid v6 is achieved, i.e. Figure 6 The subgrid v6 is divided into 8 subgrids. The next level of gridding for subgrid v1, subgrid v2, and subgrid v5 is similar to that for subgrid v6. The length, width, and height directions of subgrid v1, subgrid v2, and subgrid v5 are traversed respectively. For example, if the length, width, and height directions of subgrid v1, subgrid v2, and subgrid v5 are all directions that do not reach the corresponding resolution, then the length, width, and height directions of subgrid v1, subgrid v2, and subgrid v5 are used as directions that can be averaged. After the three directions are averaged, the second level of gridding for subgrid v1, subgrid v2, and subgrid v5 is realized. Figure 6 Subgrid v1, subgrid v2, and subgrid v5 can also be divided into 8 subgrids. Due to viewing angle issues, not all the divided subgrids are displayed.

[0062] In one embodiment, the step of respectively determining the value range of the implicit expression of each sub-grid of the current level to perform next-level gridding on the sub-grids whose value range includes a threshold range also includes step S1200.

[0063] In step S1200, the computer device fills the corresponding subgrid with a value outside the implicit expression model when judging that the value interval is greater than the threshold interval, and fills the corresponding subgrid with a value inside the implicit expression model when judging that the value interval is less than the threshold interval. In this embodiment, the implicit configuration is that the implicit output value corresponding to the point is less than 0, indicating that the point is inside the 3D model, and the implicit output value corresponding to the point is greater than 0, indicating that the point is outside the 3D model.

[0064] In one embodiment, according to the comparison description of the value interval and the threshold interval in the aforementioned embodiment, when the value interval of a sub-grid is greater than the threshold interval, it means that the sub-grid is completely outside the implicit expression model, and the sub-grid can be filled with a numerical value represented outside the implicit expression model. When the value interval of a sub-grid is less than the threshold interval, it means that the sub-grid is completely within the implicit expression model, and the sub-grid can be filled with a numerical value represented within the implicit expression model. Among them, the numerical value represented outside the implicit expression model and the numerical value represented within the implicit expression model can be configured as any different numerical values. For example, the numerical value represented outside the implicit expression model is configured as 0, and the numerical value represented within the implicit expression model is configured as 2.

[0065] Please continue reading Figure 6 Combined with Figure 3 , after comparing subgrid v3, subgrid v4, subgrid v7, and subgrid v8, the comparison results are all that the value interval is greater than the threshold interval, then subgrid v3, subgrid v4, subgrid v7, and subgrid v8 are all filled with values ​​outside the implicit expression model, for example, they are all filled with 0. It should be noted that, when the threshold interval is configured as the boundary value of the implicit expression, or the threshold interval is configured as an interval containing the boundary value of the implicit expression with the first threshold as the upper limit and the second threshold as the lower limit, the method of judging whether the value interval is greater than the threshold interval and the method of judging whether the value interval is less than the threshold interval are the same or similar to those described in the aforementioned embodiments, and are not repeated here.

[0066] In other embodiments, when the implicit is configured so that the implicit output value corresponding to the point is less than 0, indicating that the point is outside the 3D model, and the implicit output value corresponding to the point is greater than 0, indicating that the point is inside the 3D model, the corresponding sub-grid can be filled with a value representing a value within the implicit expression model under the condition that the value interval is greater than the threshold interval, and the corresponding sub-grid can be filled with a value representing a value outside the implicit expression model under the condition that the value interval is less than the threshold interval.

[0067] In one embodiment, when filling a subgrid with a numerical value outside the implicit expression model or a numerical value within the implicit expression model, the numerical value outside the implicit expression model or the numerical value within the implicit expression model can be filled in the position of the center point in the subgrid.

[0068] In one embodiment, in order to reduce the amount of data of the subsequently generated gridded model, subgrids whose value interval is greater than the threshold interval and subgrids whose value interval is less than the threshold interval may not be filled with values.

[0069] It should be noted that when comparing the threshold interval with the value interval of each sub-grid, the value interval of each sub-grid can be compared with the threshold interval respectively after the calculation is completed, or the value interval of each sub-grid can be compared with the threshold interval after the calculation of the value interval of each sub-grid is completed. A similar situation also includes the step of gridding the corresponding sub-grids to the next level. When executing this step, all sub-grids that meet the condition that the value interval includes the threshold interval can be gridded to the next level together, or each sub-grid can be gridded to the next level under the condition that the value interval of each sub-grid is determined to include the threshold interval. A similar situation also includes step S1200.

[0070] Further, according to step S120, when each sub-grid of the current level meets the preset resolution, the next level of gridding will be stopped, otherwise the next level of gridding will be continued for the selected sub-grid according to the above-mentioned embodiments of step S120. Figure 6 If all sub-grids (i.e., 32 sub-grids) after sub-grid v1, sub-grid v2, sub-grid v5, and sub-grid v6 are divided, the length direction reaches the resolution, the width direction reaches the resolution, and the height direction reaches the resolution, it means that the 32 sub-grids after the second-level gridding all meet the preset resolution, and the next-level gridding of sub-grid v1, sub-grid v2, sub-grid v5, and sub-grid v6 is stopped, otherwise, the value intervals will continue to be determined for the 32 sub-grids respectively, and the next-level gridding will continue to be performed for the sub-grids whose value intervals contain a threshold interval, and the sub-grids whose value intervals are greater than the threshold interval are filled with values ​​outside the implicit expression model, and the sub-grids whose value intervals are less than the threshold interval are filled with values ​​within the implicit expression model.

[0071] After the termination condition is reached in step S120, that is, until the divided sub-grids meet the preset resolution, the gridding will be stopped and step S130 will be executed. In step S130, the computer device selects the sub-grid whose implicit expression value interval includes the threshold interval from each sub-grid that meets the preset resolution as the key grid for numerical filling to generate a gridding model. It should be understood that in step S130, the value interval of the implicit expression of each sub-grid that meets the preset resolution will be determined according to the embodiment provided by step S120, so as to make a judgment to select the key grid. Of course, the process of determining the value interval of the implicit expression of each sub-grid that meets the preset resolution can also be performed in step S120, that is, when the sub-grid meets the preset resolution, step S120 will further determine the value interval of the implicit expression of these sub-grids respectively for use by step S130.

[0072] Since the value interval is the estimated range of the output value of the implicit expression of the sub-grid, it contains the threshold interval and can accurately determine that the sub-grid must be on the model (for example, very close to the outer contour of the model), or even if it is on the model, it will cross the outer contour of the model. Therefore, in step S130, the computer device needs to use the sub-grid whose implicit expression value interval contains the threshold interval as the key grid for numerical filling, and then use it to generate a grid model corresponding to the implicit expression model. Please continue to refer to Figure 6 ,like Figure 6 When the 32 sub-grids after the second level gridding all reach the preset resolution and among the 32 sub-grids only the value ranges of sub-grid v11, sub-grid v12, sub-grid v15, sub-grid v16, sub-grid v21, sub-grid v25, sub-grid v51, sub-grid v52, sub-grid v61, and sub-grid v66 include the threshold range, the computer device will use sub-grid v11, sub-grid v12, sub-grid v15, sub-grid v16, sub-grid v21, sub-grid v25, sub-grid v51, sub-grid v52, sub-grid v61, and sub-grid v66 as key grids.

[0073] In one embodiment, the step of performing numerical filling includes selecting at least one representative point in the key grid to obtain the output value of the implicit expression of the at least one representative point, and filling the output value into the corresponding position in the key grid. The representative point may be the center point of the key grid or other position points in the key grid such as the corner points of the key grid. In one example, the step of performing numerical filling includes selecting a representative point in the key grid to obtain the output value of the implicit expression of the representative point, and filling the output value into the position of the representative point in the key grid. For example, if the representative point is the center point of the key grid, the coordinates of the center point of the key grid are input into the implicit expression to obtain the output value of the implicit expression of the center point, and the output value is filled into the corresponding key grid. Please continue to refer to Figure 6, after inputting the coordinates of the center points of subgrid v11, subgrid v12, subgrid v15, subgrid v16, subgrid v21, subgrid v25, subgrid v51, subgrid v52, subgrid v61, and subgrid v66 into the implicit expression, the output values ​​of the implicit expression of the center points of subgrid v11, subgrid v12, subgrid v15, subgrid v16, subgrid v21, subgrid v25, subgrid v51, subgrid v52, subgrid v61, and subgrid v66 can be obtained and the output values ​​can be filled into subgrid v11, subgrid v12, subgrid v15, subgrid v16, subgrid v21, subgrid v25, subgrid v51, subgrid v52, subgrid v61, and subgrid v66 respectively. In this example, the computer device can fill the output value of the implicit expression of the center point of the key grid into the position of the center point in the key grid. Although the above example uses the example of selecting a representative point in the key grid to obtain the output value of the implicit expression of the representative point and filling the output value into the key grid as an example for detailed description, it is not limited to this. In other examples, multiple representative points (two or more) can also be selected in the key grid to obtain the output values ​​of the implicit expression of the multiple representative points, and then fill the output values ​​of the implicit expression of the multiple representative points into the positions of the multiple representative points of the key grid. For example, the 8 corner points in the key grid are used as representative points, and the output values ​​of the implicit expression of the 8 corner points are filled into the positions of the 8 corner points of the key grid respectively.

[0074] It should be noted that the value filled in the key grid can also be any value with the same positive and negative sign as the output value of the implicit expression. For example, if the output value of the implicit expression of the center point of the key grid is -8, then any negative number can be directly filled in the key grid. For example, if the output value of the implicit expression of the center point of the key grid is 8, then any positive number can be directly filled in the key grid.

[0075] In one embodiment, the computer device may further use a preset algorithm to convert the filled key mesh into a triangular mesh to generate a meshed model expressed by a triangular mesh. The preset algorithm may be a MarchingCubes algorithm, a dual contour algorithm, or a surface network algorithm. It should be noted that the present application does not limit the preset algorithm, and those skilled in the art may select other algorithms that can realize triangular mesh conversion based on the above examples of the preset algorithm.

[0076] In another embodiment, the computer device further determines the position of the key grid relative to the outer contour of the implicit expression model, that is, further fills the key grid with a value represented on the implicit expression model, a value represented outside the implicit expression model, or a value represented within the implicit expression model. In this embodiment, the step of performing the value filling includes step S1300 and step S1301.

[0077] In step S1300, the computer device determines the distance between the center point of the key mesh and the implicit expression model to compare the distance with a reference distance, wherein the reference distance is configured as half of the distance between diagonal vertices of the key mesh, that is, the reference distance is configured as half of the body diagonal of the key mesh.

[0078] Since the output value of the implicit expression of the center point of the key grid can only indicate whether the center point is inside or outside the implicit expression model and does not necessarily represent the actual shortest distance between the center point and the model, for example, when the implicit expression model includes an implicit expression of a three-period minimum surface, the output value of the implicit expression of the center point of the key grid does not necessarily represent the shortest distance between the center point and the model. Therefore, the computer device needs to determine the distance between the center point of the key grid and the implicit expression model to compare the distance with a reference distance to determine whether the key grid is on the implicit expression model.

[0079] In one embodiment, the computer device uses a preset distance solving algorithm to calculate the distance between the center point of the key grid and the implicit expression model, which is the shortest distance between the center point of the key grid and the implicit expression model. Examples of the preset distance solving algorithm include gradient descent method, Newton iteration method, etc. It should be noted that the present application does not limit the preset distance solving algorithm, and those skilled in the art can select other algorithms that can achieve the shortest distance based on the above examples of the preset distance solving algorithm.

[0080] Further, the solved distance is compared with the reference distance. When the distance is less than or equal to the majority reference distance, it means that the key grid must be on the implicit expression model. In other words, the key grid must be in contact with the outer contour of the implicit expression model. When the distance is greater than the reference distance, it means that the key grid is inside or outside the implicit expression model. For example, see Figures 7 to 9 , respectively, are schematic diagrams showing the relative positional relationship between the key grid and the implicit expression model in different embodiments of the present application, and Figure 7 and Figure 8 In the embodiment shown, the shortest distance L7 between the center point o of the key grid calculated by the computer device and the implicit expression model M is greater than the reference distance r, then the key grid may be as follows: Figure 7As shown in the figure, outside the implicit expression model M, it is also possible to Figure 8 As shown in the implicit expression model, Fig. 9 As shown, if the shortest distance L7 between the center point o of the key grid and the implicit expression model M is less than the reference distance r, the key grid is in contact with the outer contour of the implicit expression model.

[0081] In step S1301, the computer device fills the key grid with a numerical value represented on the implicit expression model under the condition that the distance is less than or equal to the reference distance, or determines the filling value of the key grid under the condition that the distance is greater than the reference distance.

[0082] The numerical value represented on the implicit expression model is a real number that is different from the numerical value represented outside the implicit expression model and the numerical value represented within the implicit expression model. For example, the numerical value represented outside the implicit expression model is configured as 0, the numerical value represented within the implicit expression model is configured as 2, and the numerical value represented on the implicit expression model is configured as 1.

[0083] For example, Figure 6 In the key grids (i.e., sub-grid v11, sub-grid v12, sub-grid v15, sub-grid v16, sub-grid v21, sub-grid v25, sub-grid v51, sub-grid v52, sub-grid v61, and sub-grid v66), if the distances between the center points of sub-grid v11, sub-grid v12, sub-grid v15, sub-grid v21, sub-grid v25, sub-grid v51, sub-grid v52, and sub-grid v61 and the implicit expression model are all less than or equal to the reference distance, then sub-grid v11, sub-grid v12, sub-grid v15, sub-grid v21, sub-grid v25, sub-grid v51, sub-grid v52, and sub-grid v61 are filled with the numerical values ​​represented on the implicit expression model respectively.

[0084] In one embodiment, under the condition that the distance is greater than the reference distance, it is necessary to determine whether the key grid is outside the implicit expression model or inside the implicit expression model to determine the fill value of the key grid. In a specific embodiment, the step of determining the fill value of the key grid under the condition that the distance is greater than the reference distance includes step S13010 and step S13011. In this embodiment, the implicit configuration is that the implicit output value corresponding to the point is less than 0, indicating that the point is inside the 3D model, and the implicit output value corresponding to the point is greater than 0, indicating that the point is outside the 3D model.

[0085] In step S13010, the computer device determines the output value of the implicit expression of the center point of the key grid to compare the output value with the boundary value of the implicit expression. Specifically, under the condition that the distance is greater than the reference distance, the computer device determines the output value of the implicit expression of the center point of the key grid, and compares the output value with the boundary value of the implicit expression (i.e., 0). When the output value is greater than the boundary value (i.e., 0), it is determined that the key grid is outside the implicit expression model. When the output value is less than the boundary value (i.e., 0), it is determined that the key grid is inside the implicit expression model. For example, Figure 6 The distances between the center points of sub-grid v16 and sub-grid v66 in the key grid and the implicit expression model are both greater than the reference distance, and the output value of the implicit expression of the center point of sub-grid v66 is greater than the boundary value, while the output value of the implicit expression of the center point of sub-grid v16 is less than the boundary value, indicating that sub-grid v66 is located outside the implicit expression model and sub-grid v16 is located inside the implicit expression model.

[0086] In step S13011, the computer device fills the key grid with a value outside the implicit expression model under the condition that the output value is greater than the boundary value; or fills the key grid with a value within the implicit expression model under the condition that the value is less than the boundary value.

[0087] Please continue reading Figure 6 In the above embodiment, it is determined Figure 6 If the output value of the implicit expression of the center point of sub-grid v66 in the key grid is greater than the boundary value, and the output value of the implicit expression of the center point of sub-grid v16 is less than the boundary value, sub-grid v66 is filled with a value outside the implicit expression model, and sub-grid v16 is filled with a value within the implicit expression model.

[0088] In other embodiments, when the implicit is configured so that the implicit output value corresponding to the point is less than 0, indicating that the point is outside the 3D model, and the implicit output value corresponding to the point is greater than 0, indicating that the point is inside the 3D model, the computer device fills the key grid with a numerical value represented within the implicit expression model under the condition that the output value is greater than the boundary value; or, fills the key grid with a numerical value represented outside the implicit expression model under the condition that the numerical value is less than the boundary value.

[0089] In one embodiment, when a numerical value represented on an implicit expression model, a numerical value represented outside the implicit expression model, or a numerical value represented within the implicit expression model is filled in the key grid, the numerical value represented on the implicit expression model, the numerical value represented outside the implicit expression model, or the numerical value represented within the implicit expression model is filled in the position of the center point in the key grid.

[0090] In one embodiment, the computer device can generate the voxel grid model based on the gridded and filled enclosing space by filling the key grid with the value represented on the implicit expression model, the value represented outside the implicit expression model, and the value represented within the implicit expression model. For example, the voxel grid model includes a plurality of subgrids obtained by gridding step by step, and the subgrids serving as the key grids are filled with the value.

[0091] In some embodiments, the present application also proposes a grid system of an implicit expression model, which can be deployed in a computer device, for example, as a software tool or software module that can process data, and it performs data processing with the help of the operating environment provided by the hardware device and / or operating system in the computer device.

[0092] See also Fig.10 , which is a module block diagram of a gridding system for an implicit expression model in an embodiment of the present application. As shown in the figure, the gridding system 1 for the implicit expression model includes an enclosing space creation module 10, a gridding and filling module 11, and a conversion module 12. The enclosing space creation module 10 is used to create an enclosing space with a preset resolution that can completely wrap the implicit expression model; the gridding and filling module 11 is used to grid the enclosing space step by step, and the gridding of the enclosing space step by step includes: recursively executing to determine the value interval of the implicit expression of each sub-grid of the current level respectively to grid the sub-grids whose value interval contains a threshold interval to the next level, until each sub-grid of the current level meets the preset resolution; and is also used to select the sub-grid whose value interval of the implicit expression contains the threshold interval from each sub-grid that meets the preset resolution as the key grid for numerical filling; the conversion module 12 is used to generate a gridding model based on the gridded and filled enclosing space.

[0093] In one embodiment, the mesh model is a mesh model expressed by a triangular mesh, and the conversion module 12 converts the filled key mesh into a triangular mesh using a preset algorithm to generate a mesh model expressed by a triangular mesh. The preset algorithm may be a Marching Cubes algorithm, a dual contour algorithm, or a surface network algorithm. It should be noted that the present application does not limit the preset algorithm, and those skilled in the art may select other algorithms that can realize triangular mesh conversion based on the above examples of the preset algorithm.

[0094] In another embodiment, the generated gridded model is a voxel grid model, and after the conversion module 12 fills the key grid with values, the voxel grid model can be generated based on the gridded and filled enclosing space. For example, the voxel grid model includes multiple sub-grids obtained by gridding step by step, and the sub-grids serving as the key grids are filled with the values.

[0095] In one embodiment, the implicit expression model gridding system 1 includes a bounding space creation module 10, a gridding and filling module 11, and a conversion module 12, which respectively coordinates and executes the implicit expression model gridding method disclosed in any of the aforementioned embodiments of the present application according to the functions described above. Figures 1 to 9 Any embodiments described in related manner will not be described in detail here.

[0096] The enclosed space creation module 10, the gridding and filling module 11, and the conversion module 12 can also be implemented in software run by different types of processors. For example, a module of executable code may include one or more physical or logical blocks of computer instructions, which are organized as objects, programs, or functions. However, the executable files of the modules do not have to be physically located together, but may include different commands stored in different locations, which, when logically connected together, include the modules and achieve the specified goals of the modules.

[0097] Of course, a module of executable code can be one or many instructions, and can even be distributed in several different code segments, distributed in different programs, and distributed in multiple storage devices. Similarly, operational data can be identified and shown in the module, and the operational data can be embodied in any suitable form and organized in any suitable type of data structure. The operational data can be collected as a single data set, or can be distributed in different locations (including different storage devices), and can exist at least partially only as electrical signals in a system or network. When a module or a portion of a module is implemented in software, the software portion is stored on one or more computer-readable media.

[0098] The present application also provides a computer device, including a bus, a processor, a memory, and a communication interface. The processor, the memory, and the communication interface communicate with each other via the bus. The computing device may be a server, a laptop, a desktop computer, an edge device, etc., and the embodiments of the present application do not specifically limit the number of processors and memories in the computing device.

[0099] The bus can be a Peripheral Component interconnect (PCI) bus or an Extended industry Standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one line is used in the figure, but it does not mean that there is only one bus or one type of bus. The bus may include a path for transmitting information between various components of a computing device (for example, memory, processor, communication interface).

[0100] In one embodiment, the computer device is used to implement the gridding method of the implicit expression model described in any of the above embodiments. In one embodiment, the computer device is a device capable of performing digital calculations, logical processing, and information processing on data, including but not limited to: personal computers, industrial computers, tablets, smart phones, servers, server clusters, smart terminals, cloud-based server systems, etc.

[0101] See also Fig.11 , which is a schematic diagram of the structure of a computer device in an embodiment of the present application, wherein the computer device 2 includes a storage device 20 and a processing device 21 connected to the storage device 20. Furthermore, the computer device also includes a communication interface 22.

[0102] In some embodiments, the storage device 20 is used to store at least one program, and the at least one program can be executed by the processing device 21 to coordinate the storage device 20 to implement the gridding method of the implicit expression model described in any of the above embodiments. Here, the storage device 20 includes but is not limited to: read-only memory (ROM), random access memory (RAM), non-volatile RAM (NVRAM). For example, the storage device 20 includes a flash memory device or other non-volatile solid-state storage device. In some embodiments, the storage device 20 may also include a memory away from one or more processing devices 21, such as a network attached memory accessed via an RF circuit or an external port and a communication network, wherein the communication network may be the Internet, one or more intranets, local area networks, wide area networks, storage area networks, etc., or a suitable combination thereof. The memory controller may control access to the memory by other components of the device such as the CPU and peripheral interfaces.

[0103] In some embodiments, the processing device 21 includes one or more processors. The processing device 21 can be operable to perform data read and write operations with the storage device 20. The processing device 21 includes one or more general-purpose microprocessors, one or more application-specific processors (ASICs), one or more digital signal processors (Digital Signal Processors, referred to as DSPs), one or more field programmable gate arrays (Field Programmable Gate Arrays, referred to as FPGAs), or any combination thereof.

[0104] In some embodiments, the communication interface 22 includes at least one interface unit, each of which is used to output a visual interface, receive a human-computer interaction event generated according to the operation of a technician, etc. For example, the communication interface 22 includes but is not limited to: a serial interface such as an HDMI interface or a USB interface, or a parallel interface, etc. In one embodiment, the communication interface 22 also includes a network communication unit, which is a device for data transmission using a wired or wireless network, examples of which include but are not limited to: an integrated circuit including a network card, a local area network module such as a WiFi module or a Bluetooth module, a wide area network module such as a mobile network, etc.

[0105] The present application also provides a computer-readable storage medium storing at least one program, which, when called and executed by a processor of a computer, implements the gridding method of the implicit expression model in any of the above embodiments.

[0106] The present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement the gridding method of the implicit expression model in any of the above-mentioned embodiments.

[0107] If the method is implemented in the form of 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 the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions to enable a computer device equipped with the storage medium to execute all or part of the steps of the method described in each embodiment of the present application.

[0108] In the embodiments provided in the present application, the computer storage medium provided may include a read-only memory, a random access memory, an EEPROM, a CD-ROM or other optical disk storage device, a disk storage device or other magnetic storage device, a flash memory, a USB flash drive, a mobile hard disk, or any other medium that can be used to store a desired program code in the form of an instruction or data structure and can be accessed by a computer. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if the instruction is sent from a website, a server or other remote source using a coaxial cable, an optical fiber cable, a twisted pair, a digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwaves, the coaxial cable, optical fiber cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwaves are included in the definition of the medium. However, it should be understood that computer storage media and data storage media do not include connections, carriers, signals, or other temporary media, but are intended to be non-temporary, tangible storage media. Disk and disc, as used in this application, includes compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk and Blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers.

[0109] In summary, the meshing method and system of the implicit expression model, computer equipment, computer-readable storage medium and computer program product disclosed in the present application, in the process of step-by-step meshing of the enclosing space that can completely enclose the implicit expression model, only performs next-level meshing on the sub-grids whose value intervals include a threshold interval until the sub-grids of the current level meet the preset resolution, and selects the sub-grids whose value intervals of the implicit expression include the threshold interval from the sub-grids that meet the preset resolution as the key grids for numerical filling to generate a meshed model. In this way, the present application can reduce the amount of calculation for converting the implicit expression model (referred to as the implicit model) into a mesh model and improve the calculation speed for converting the implicit expression model into a mesh model. Furthermore, the computer device can accurately determine the key grid on the implicit expression model by comparing the distance between the center point of the key grid and the implicit expression model with the reference distance, and can accurately determine whether the key grid is outside or inside the implicit expression model by comparing the output value of the implicit expression of the center point of the key grid with the boundary value, thereby making the generated voxel grid model more accurate; and reducing the amount of data in the generated grid model by not performing numerical filling in non-key grids.

[0110] The above embodiments are merely illustrative of the inventive essence of the present application and the beneficial effects obtained, and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the principles and scope of the present application. Therefore, all equivalent modifications or changes achieved by a person with ordinary knowledge in the technical field without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. A gridding method for an implicit expression model, characterized in that: The following steps are involved: Creating a bounding space with a preset resolution that can completely enclose the implicit expression model; The enclosed space is meshed step by step, including: recursively determining the value interval of the implicit expression of each sub-grid of the current level to mesh the sub-grids whose value interval includes a threshold value interval, until each sub-grid of the current level meets the preset resolution; wherein the step of respectively determining the value interval of the implicit expression of each sub-grid of the current level to mesh the sub-grids whose value interval includes a threshold value interval includes: respectively determining the value interval of the implicit expression of each sub-grid of the current level to compare the threshold value interval with the value interval of each sub-grid, and meshing the corresponding sub-grids to the next level under the condition that the value interval includes the threshold value interval; Among the sub-grids that meet the preset resolution, the sub-grids whose implicitly expressed value interval includes the threshold interval are selected as key grids for numerical filling to generate a gridded model.

2. The method for meshing an implicit expression model according to claim 1, characterized in that: The step of creating a bounding space with a preset resolution that can completely enclose the implicit expression model includes: creating the bounding space based on the length, width, height and grid parameters of the bounding box of the implicit expression model and configuring the preset resolution.

3. The method for meshing an implicit expression model according to claim 2, characterized in that: Also includes: The step of providing a parameter configuration window for the user to input the grid parameters.

4. The method for meshing an implicit expression model according to claim 2 or 3, characterized in that: The grid parameters include the minimum unit size of the grid or the minimum number of units of the enclosed space in the length, width and height directions.

5. The method for meshing an implicit expression model according to claim 1, characterized in that: The next level of gridding is configured to traverse the length, width, and height directions of the current level of sub-grids to perform gridding in a manner of averaging the directions in which averaging can be performed.

6. The method for meshing an implicit expression model according to claim 1, characterized in that: The step of respectively determining the value range of the implicit expression of each sub-grid of the current level includes: determining the value range of the sub-grid based on the diagonal vertices of the sub-grid.

7. The method for meshing an implicit expression model according to claim 6, characterized in that: The step of determining the value range of the sub-mesh based on the diagonal vertices of the sub-mesh includes: determining the body diagonal length of the sub-mesh based on the diagonal vertices of the sub-mesh, and determining the value range of the sub-mesh based on the output value implicitly expressed by the body diagonal length and the center point of the sub-mesh.

8. The method for meshing an implicit expression model according to claim 1, characterized in that: The step of respectively determining the value interval of the implicit expression of each sub-grid of the current level to grid the sub-grids whose value interval contains a threshold interval to the next level also includes: filling the corresponding sub-grid with a numerical value represented outside the implicit expression model under the condition that the value interval is greater than the threshold interval, and filling the corresponding sub-grid with a numerical value represented within the implicit expression model under the condition that the value interval is less than the threshold interval.

9. The method for meshing an implicit expression model according to claim 1 or 8, characterized in that: The threshold interval is configured as the boundary value of the implicit expression. When the lower limit value of the value interval is greater than the boundary value, it is determined that the value interval is greater than the threshold interval. When the upper limit value of the value interval is less than the boundary value, it is determined that the value interval is less than the threshold interval.

10. The method for meshing an implicit expression model according to claim 1 or 8, characterized in that: The threshold interval is configured as an interval containing implicitly expressed boundary values ​​with a first threshold as an upper limit and a second threshold as a lower limit. When the lower limit value of the value interval is greater than the first threshold, it is determined that the value interval is greater than the threshold interval. When the upper limit value of the value interval is less than the second threshold, it is determined that the value interval is less than the threshold interval.

11. The method for meshing an implicit expression model according to claim 1, characterized in that: The step of meshing the enclosed space step by step also includes meshing the enclosed space for the first time to obtain a plurality of sub-grids of the first meshing.

12. The method for meshing an implicit expression model according to claim 1, characterized in that: The step of performing numerical filling includes: selecting at least one representative point in the key grid to obtain an output value of an implicit expression of the at least one representative point, and filling the output value into a corresponding position in the key grid.

13. The method for meshing an implicit expression model according to claim 12, characterized in that: The representative point is configured as a center point of the key grid.

14. The method for meshing an implicit expression model according to claim 12, characterized in that: The step of generating a meshed model includes converting the filled key mesh into a triangular mesh using a preset algorithm to generate a meshed model expressed by a triangular mesh.

15. The method for meshing an implicit expression model according to claim 1, characterized in that: The steps to fill in the values ​​include: Determine the distance between the center point of the key grid and the implicit expression model to compare the distance with a reference distance; wherein the reference distance is configured as half of the distance between diagonal vertices of the key grid; The key grid is filled with a numerical value represented on an implicit expression model under the condition that the distance is less than or equal to the reference distance; or, the filling value of the key grid is determined under the condition that the distance is greater than the reference distance.

16. The method for meshing an implicit expression model according to claim 15, characterized in that: The step of determining the filling value of the key grid under the condition that the distance is greater than the reference distance comprises: determining an output value of the implicit expression of the center point of the key grid to compare the output value with a boundary value of the implicit expression; The key grid is filled with a value outside the implicit expression model under the condition that the output value is greater than the boundary value; or, the key grid is filled with a value within the implicit expression model under the condition that the value is less than the boundary value.

17. A gridding system for implicit expression model, characterized in that: include: A bounding space creation module, used to create a bounding space with a preset resolution that can completely enclose the implicit expression model; A gridding and filling module, for gridding the enclosed space step by step, wherein the gridding of the enclosed space step by step includes: recursively determining the value interval of the implicit expression of each sub-grid of the current level to grid the sub-grids whose value interval includes a threshold value interval until each sub-grid of the current level meets the preset resolution; and is also used to select the sub-grid whose implicit expression value interval includes the threshold value interval from each sub-grid that meets the preset resolution as the key grid for numerical filling; wherein, respectively determining the value interval of the implicit expression of each sub-grid of the current level to grid the sub-grid whose value interval includes a threshold value interval includes: respectively determining the value interval of the implicit expression of each sub-grid of the current level to compare the threshold value interval with the value interval of each sub-grid, and gridding the corresponding sub-grid to the next level under the condition that the value interval includes the threshold value interval; A conversion module is used to generate a meshed model based on the meshed and filled enclosing space.

18. A computer device, characterized in that: include: A storage device for storing at least one program; A processing device is connected to the storage device, and is used to call the at least one program from the storage device and implement the gridding method of the implicit expression model as described in any one of claims 1 to 16 when executing.

19. A computer-readable storage medium, characterized in that: At least one program is stored, and when the at least one program is called and executed by a processor of a computer, the gridding method of the implicit expression model as described in any one of claims 1 to 16 is implemented.

20. A computer program product, characterized in that When the computer program product is run on a computer, the computer is enabled to execute the meshing method of the implicit expression model according to any one of claims 1 to 16.