Meshing method and system for implicit representation model, computer device, computer-readable storage medium, and computer program product
By using a method of progressive meshing and numerical filling of the enclosing space, the problem of slow computation speed in converting implicit models to mesh models is solved, achieving a more efficient conversion process.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHANGHAI VOXELDANCE TECHNOLOGY CO LTD
- Filing Date
- 2025-04-23
- Publication Date
- 2026-07-30
AI Technical Summary
In existing technologies, the computational speed for converting implicit models into mesh models is slow, which cannot meet the needs of 3D printing and computer-aided design.
By creating a bounding space with a preset resolution and meshing it step by step, only the subgrids whose value ranges include the threshold range are meshed at the next level until all subgrids at the current level meet the preset resolution. Then, among the subgrids that meet the preset resolution, the subgrids whose implicitly expressed value ranges include the threshold range are selected for numerical filling, thus generating a meshed model.
It significantly improves the computational speed of converting implicit models to mesh models, reduces the amount of computation, and improves conversion efficiency.
Smart Images

Figure CN2025090605_30072026_PF_FP_ABST
Abstract
Description
Mesh generation methods and systems for implicit representation models, computer equipment, computer-readable storage media, and computer program products. Technical Field
[0001] This application relates to the field of 3D printing technology, specifically to a meshing method and system for implicit representation models, computer equipment, computer-readable storage media, and computer program products. Background Technology
[0002] Implicit modeling is widely used in fields such as 3D printing and computer-aided design (CAD). Implicit models have many advantages, such as smooth surfaces and complex structures, easy Boolean operations, and resolution-independent model accuracy.
[0003] However, when implicit modeling is applied to 3D printing, due to limitations imposed by most current 3D printing software (such as CAE software and 3D printing preprocessing software) on the format of the input model and the format of the input model to be rendered, implicit models often cannot be directly input. They need to be converted into suitable mesh models. For example, for CAE software, the implicit model needs to be converted into a voxel mesh model required by CAE software. Similarly, for preprocessing software, the implicit model needs to be converted into a triangular mesh model. However, the current process of converting implicit models to mesh models involves a large amount of computation, resulting in slow computation speed.
[0004] Therefore, improving the computational speed of converting implicit models into mesh models is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] In view of the shortcomings of the above-mentioned related technologies, the purpose of this application is to provide a meshing method and system for implicit representation models, a computer device, a computer-readable storage medium and a computer program product, so as to overcome the technical problem of how to improve the computational speed of converting implicit models into mesh models in the above-mentioned related technologies.
[0006] To achieve the above and other related objectives, the first aspect of this application discloses a meshing method for an implicit expression model, comprising the following steps: creating a bounding space with a preset resolution that can completely enclose the implicit expression model; performing stepwise meshing of the bounding space, including: recursively determining the value range of the implicit expression for each sub-mesh of the current level, and performing next-level meshing on sub-mesh where the value range includes a threshold range, until each sub-mesh of the current level satisfies the preset resolution; selecting sub-mesh where the value range of the implicit expression includes the threshold range from the sub-mesh that satisfies the preset resolution as key meshes for numerical filling, thereby generating a meshed model.
[0007] The second aspect of this application discloses a meshing system for an implicit representation model, comprising: a bounding space creation module for creating a bounding space with a preset resolution that can completely enclose the implicit representation model; a meshing and filling module for performing step-by-step meshing of the bounding space, wherein the step-by-step meshing of the bounding space includes: recursively executing the determination of the value range of the implicit representation of each sub-mesh of the current level, and performing the next level meshing on the sub-mesh in which the value range includes a threshold range, until each sub-mesh of the current level satisfies the preset resolution; further comprising selecting, among the sub-mesh in which the value range of the implicit representation includes the threshold range, as key meshes for numerical filling; and a conversion module for generating a meshed model based on the meshed and filled bounding space.
[0008] A third aspect of this application discloses a computer device, comprising: a storage device for storing at least one program; and a processing device connected to the storage device for calling and executing the at least one program from the storage device to implement the meshing method of the implicit representation model as described in the first aspect of this application.
[0009] The fourth aspect of this application discloses a computer-readable storage medium storing at least one program that, when called and executed by a computer's processor, implements the meshing method for the implicit representation model as described in the first aspect of this application.
[0010] The fifth aspect of this application discloses a computer program product that, when run on a computer, causes the computer to perform a meshing method for an implicit representation model as described in the first aspect of this application.
[0011] In summary, the meshing method and system, computer device, computer-readable storage medium, and computer program product of the implicit expression model disclosed in this application, in the process of progressively meshing the bounding space that can completely enclose the implicit expression model, only meshes the sub-grids whose value ranges include a threshold range until all sub-grids at the current level meet the preset resolution. Among the sub-grids that meet the preset resolution, the sub-grids whose implicit expression value ranges include the threshold range are selected as key grids for numerical filling to generate the meshed model. In this way, this application can reduce the computational cost of converting the implicit expression model (also called the implicit model or the model based on the implicit expression) into a meshed model and improve the computational speed of converting the implicit expression model into a meshed model. Attached Figure Description
[0012] The features and advantages of the invention described in detail below, along with the accompanying drawings, will provide a better understanding of the specific embodiments and their accompanying drawings. A brief description of the drawings is as follows:
[0013] Figure 1 shows a flowchart of the meshing method for the implicit representation model in one embodiment of this application.
[0014] Figure 2 shows a schematic diagram of the parameter configuration window in one embodiment of this application.
[0015] Figure 3 shows a schematic diagram of the enclosing space and the enclosing space after initial meshing in one embodiment of this application.
[0016] Figure 4 shows a schematic diagram of the subgrid after it is divided into equal parts in one embodiment of this application, with the length and width directions of the subgrid as the directions in which equal division can be performed.
[0017] Figure 5 shows a schematic diagram of the subgrid after it is divided into equal parts in one embodiment of this application, with the length direction of the subgrid as the direction in which the equal parts can be divided.
[0018] Figure 6 shows a schematic diagram of the subgrids in the embodiment shown in Figure 3, where the value range of the implicit expression includes the threshold range, after the application performs the next level of meshing.
[0019] Figures 7 to 9 show schematic diagrams illustrating the relative positional relationship between the key grid and the implicit representation model in different embodiments of this application.
[0020] Figure 10 shows a block diagram of a gridded system for an implicit representation model according to one embodiment of this application.
[0021] Figure 11 shows a schematic diagram of the structure of a computer device according to one embodiment of the present application. Detailed Implementation
[0022] The following specific embodiments illustrate the implementation of this application. Those skilled in the art can easily understand the advantages and technical effects of this application from the content disclosed in this specification. In the following description, some embodiments may refer to the accompanying drawings. It should be understood that other embodiments not shown in the drawings may also be used, and specific steps, modules or units, electrical and operational changes may be made without departing from the spirit and scope of this application. The detailed description below should not be considered limiting, and the scope of the embodiments of this application is limited only by the claims published in this application. The terminology used herein is for describing particular embodiments only and is not intended to limit this application.
[0023] While the terms first, second, or third, etc., are used in some instances herein to describe various elements or parameters, these elements or parameters should not be limited by these terms. These terms are used only to distinguish one object or parameter from another, and not to define the order, timing, priority, or importance of multiple objects. For example, a first threshold may be referred to as a second threshold, and similarly, a second threshold may be referred to as a first threshold, without departing from the scope of the various described embodiments. Both the first threshold and the second threshold describe a threshold, but they are not the same threshold unless the context explicitly indicates otherwise.
[0024] Furthermore, as used herein, the singular forms “a,” “an,” and “the” are intended to include the plural forms as well, unless the context indicates otherwise. It should be further understood that the terms “comprising,” “including,” and “including” indicate the presence of the stated features, steps, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence, or addition of one or more other features, steps, operations, elements, components, items, kinds, and / or groups. For example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or devices. Additionally, the term “and / or,” which may be used hereinafter, describes the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, the character “ / ”, unless otherwise specified, generally indicates that the preceding and following related objects have an “and / or” relationship. Additionally, in the description of embodiments of this application, “multiple” refers to two or more.
[0025] The following explanations of some terms and nouns used in the various embodiments of this application are also part of the invention content. Those skilled in the art will understand that, unless otherwise defined, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0026] The computer three-dimensional space described in this application is a computer space with three dimensions (X-axis, Y-axis, and Z-axis) used for constructing 3D models. In the following embodiments, the direction corresponding to the X-axis in the enclosing space and grid is referred to as the length direction, the direction corresponding to the Y-axis in the enclosing space and grid is referred to as the width direction, and the direction corresponding to the Z-axis in the enclosing space and grid is referred to as 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 be used to print 3D objects in actual physical space using a 3D printer. The 3D objects can be any 3D objects such as aerospace parts, automotive parts, industrial equipment parts, handicrafts, and medical devices.
[0027] The implicit representation model (also called an implicit model or an implicit representation-based model) described in the embodiments of this application implicitly represents the geometry of a 3D model. The implicit input is the 3D coordinates of a point in computer 3D space, and the output is a numerical value indicating the relative position of that point to the surface of the 3D model; in some embodiments, this is also called the output value. Specifically, the 3D coordinates of each point in computer 3D space are input into the implicit model. The set of points with an output value of 0 defines the outer contour shape of the 3D model. These points can be considered as being on the 3D model. An implicit output value less than 0 indicates that the point is inside the 3D model, and an implicit output value greater than 0 indicates that the point is outside the 3D model. Of course, in other embodiments, depending on the specific implicit model, an implicit output value less than 0 can also indicate that the point is outside the 3D model, and an implicit output value greater than 0 can indicate that the point is inside the 3D model.
[0028] The implicit expression (or simply implicit) described in the embodiments of this 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 geometry of the 3D model is expressed by an equation. In this example, taking a 3D model of a sphere with a radius of 1 as an example, its corresponding implicit expression is an implicit equation: Here, f(x,y,z) is the output value of the implicit equation, and (x,y,z) is the input of the implicit equation. In another example, the implicit expression is configured to represent the geometry of the 3D model through functions or combinations of functions. Examples of functions include the maximum value function max(), the minimum value function min(), the length function length(), and combinations thereof. In yet another example, the implicit expression is configured to represent the geometry of the 3D model through transformation relations or specified algorithms, for example, the transformation of a triangular mesh into an implicit transformation relation. The above examples are merely illustrative. In other examples, the implicit expression can also be configured as a combination of any of the above examples. This application does not limit the type or method of the implicit expression, as long as it can represent the geometry of the 3D model in the manner defined above.
[0029] The meshed model described in the embodiments of this application refers to a model formed by expressing, constructing, or splicing basic mesh units. Examples of basic mesh units include cube units or facet units. A cube unit can be a cubic or cuboid unit, and a facet unit can be a two-dimensional planar structure with basic geometric shapes (e.g., triangles, quadrilaterals, etc.). Taking a cube unit as the basic mesh unit as an example, the corresponding meshed model is a model formed by cube units, sometimes also referred to as a voxel mesh model. Taking a triangular facet unit as the basic mesh unit as an example, the corresponding meshed model is a meshed model expressed by triangular facets, sometimes also referred to as a triangular mesh model or a triangular facet model.
[0030] In view of the technical problem of how to improve the computational speed of converting implicit models into mesh models as described in the background art, this application discloses a meshing method and system for implicit representation models, a computer device, a computer-readable storage medium, and a computer program product. The meshing method, in the process of progressively meshing the bounding space that completely encloses the implicit representation model, only meshes sub-mesh whose value ranges include a threshold interval until all sub-mesh at the current level meet a preset resolution. Then, among the sub-mesh that meet the preset resolution, sub-mesh whose implicit representation value range includes the threshold interval is selected as key meshes for numerical filling to generate a meshed model. Thus, this application can reduce the computational load of converting implicit representation models (also referred to as implicit models in some embodiments) into mesh models and improve the computational speed of converting implicit representation models into mesh models.
[0031] The present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. The technical solutions in the embodiments of the present application are clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, not all of them. Based on the embodiments in the present application, all other embodiments and technical effects obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application. The terms "an embodiment," "implementation," or similar wording used throughout this specification mean that a specific feature, structure, or characteristic described together with an embodiment is included in at least one embodiment of the present application. Therefore, the appearance of the phrases "in an embodiment," "in an embodiment," and similar wording throughout this specification may (but does not necessarily) refer to the same embodiment.
[0032] This application provides a meshing method for implicit representation models in some embodiments. The meshing method for implicit representation models can be executed by a computer device configured with a meshing system for implicit representation models. The meshing system for implicit representation models is a software tool or software module that can process data. It executes the meshing method for implicit representation models with the help of the hardware devices and / or the operating environment provided by the operating system in the computer device.
[0033] In one embodiment, the computer device may be configured as an electronic device, that is, the electronic device executes the meshing method of the implicit representation model. For example, the electronic device includes a desktop computer, a laptop computer, a tablet computer, a smart TV, a smartphone, a tablet, an industrial control computer, etc. The electronic device may also be an electronic device consisting of a host with multiple virtual machines and human-computer interaction devices (such as touch screen, keyboard and mouse) corresponding to each virtual machine.
[0034] In one embodiment, the computer device may be configured as a server, that is, the server executes the meshing method of the implicit representation model. The server can be deployed on one or more physical servers based on factors such as functionality and load. In some examples, the server may be a cloud-based server, referring to a cloud computing platform provided by a cloud computing provider, which can provide services such as IaaS (Infrastructure-as-a-Service), PaaS (Platform-as-a-Service), and SaaS (Software-as-a-Service). The cloud computing platform includes public cloud, private cloud, and hybrid cloud. In some examples, the server may consist of a distributed or centralized server cluster. For example, the server cluster consists of at least one physical server. Each physical server is configured with multiple virtual servers, each virtual server runs at least one functional module of the system, and the virtual servers communicate with each other via a network.
[0035] Please refer to Figure 1, which shows a flowchart of a meshing method for an implicit representation model according to one embodiment of this application. As shown in the figure, the meshing method for the implicit representation model includes steps S110, S120, and S130. The following description uses the execution of the meshing method for the implicit representation model by a computer device as an example to illustrate various embodiments.
[0036] In step S110, the computer device creates a bounding space with a preset resolution that completely encloses the implicit representation model. It should be noted that "bounding space with preset resolution" means that the bounding space has a preset resolution; subsequent partitioning operations on the bounding space cannot be performed indefinitely, and it does not imply whether the bounding space in step S110 has already been partitioned according to the preset resolution. Furthermore, the creation of the bounding space described in the relevant embodiments of this step can be understood as predefining a bounding space, and it does not necessarily need to be presented in a visual manner on the computer device's display interface.
[0037] The preset resolution represents the granularity at which the bounding space can be meshed. It can be predefined, pre-stored, or determined based on user input. In one embodiment, the preset resolution is configured as the size (or unit size) of the smallest unit into which the bounding space can be divided.
[0038] Furthermore, the preset resolution includes the resolution along the X-axis (also known as the resolution along the length or X-axis resolution), the resolution along the Y-axis (also known as the resolution along the width or Y-axis resolution), and the resolution along the Z-axis (also known as the resolution along the height or Z-axis resolution). Taking the preset resolution configured as the size of the aforementioned minimum unit as an example, the resolution along the X-axis refers to the size of the minimum unit along the X-axis, which can be understood as the length of the minimum unit; the resolution along the Y-axis refers to the size of the minimum unit along the Y-axis, which can be understood as the width of the minimum unit; and the resolution along the Z-axis refers to the size of the minimum unit along the Z-axis, which can be understood as the height of the minimum unit. The resolutions along the X, Y, and Z axes can be exactly the same or different. For ease of explanation, the following embodiments will use the example where the resolutions along the X, Y, and Z axes are all the same.
[0039] In one embodiment, step S110 includes creating the bounding space based on the length, width, height and grid parameters of the bounding box of the implicit representation model and configuring the preset resolution.
[0040] The bounding box of the implicit representation model can be defined as the minimum space that encloses the implicit representation model. It can be, for example, an AABB (Axis Aligned Bounding Box) or an OBB (Oriented Bounding Box). The length, width, and height of the bounding box are the dimensions occupied by the bounding box on the X-axis, Y-axis, and Z-axis, respectively.
[0041] The grid parameters may be predefined or pre-stored, or determined based on user input. In some examples, the grid parameters include the minimum cell size of the grid, which may further include the size (length) occupied by the minimum cell 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 number of minimum cells in the length, width, and height directions of the enclosing space.
[0042] In one embodiment, the computer device provides a parameter configuration window for the user to input the grid parameters. Referring to Figure 2, which shows a schematic diagram of the parameter configuration window in one embodiment of this application, it illustrates an example where the grid parameter is the smallest unit size of the grid. The parameter configuration window provides input boxes for the dimensions of the smallest unit of the grid in the X-axis direction, the Y-axis direction, and the Z-axis direction. The user can input data in the corresponding input boxes to complete the input of the grid parameters. It should be understood that Figure 2 is only an example. In an example where the smallest unit of the grid is a cube (i.e., the smallest unit has the same length, width, and height), the parameter configuration window may only provide an input box for one side length, and the user only needs to input the dimension data of one side length. Furthermore, in examples where the grid parameters are configured as other parameters, those skilled in the art can also make adaptive adjustments to the content and interface layout of the parameter configuration window under the guidance of this application, and this application does not impose any limitations on this.
[0043] In one embodiment, for example, where the mesh parameter is the minimum cell size of the mesh, the computer device further creates the bounding space based on the length, width, and height of the bounding box of the implicit representation model and the mesh parameters, and directly uses the minimum cell size as the preset resolution. Specifically, the computer device can determine the length of the minimum cell as the X-axis resolution and determine the length of the bounding space based on the length of the minimum cell and the length of the bounding box; the computer device can also determine the width of the minimum cell as the Y-axis resolution and determine the width of the bounding space based on the width of the minimum cell and the width of the bounding box; and the computer device can also determine the height of the minimum cell as the Z-resolution and determine the height of the bounding space based on the height of the minimum cell and the height of the bounding box. In this way, the preset resolution is determined and the bounding space is created.
[0044] To illustrate how a computer device determines the length, width, and height of the bounding space, let's take determining the length of the bounding box as an example. Specifically, the computer device can take the bounding box length divided by the minimum unit length, round up, and use this as the number of minimum units in the length direction. Multiplying this number by the minimum unit length gives the length of the bounding space. The width and height of the bounding space can be determined in the same way. Of course, other methods can also be used. For example, the bounding box length divided by the minimum unit length can be rounded up and then added to a preset number, which can be used as the number of minimum units in the length direction. The preset number is, for example, any integer from 1 to 10. The width and height of the corresponding bounding space can be determined in the same way. This application does not limit the method of determining the length, width, and height of the bounding space; it only needs to ensure that the length, width, and height of the bounding space are not less than the length, width, and height of the bounding box. That is, the size of the bounding space should be slightly larger than the size of the bounding box, so as to ensure that the created bounding space can completely enclose the implicit representation model.
[0045] In another embodiment, for example, where the mesh parameters are the minimum number of units in the length, width, and height directions of the bounding space, the computer device can directly determine the length, width, and height of the bounding space based on the length, width, and height of the bounding box of the implicit representation model to create the bounding space, and further configure a preset resolution based on the length, width, and height of the bounding space and the mesh parameters. For example, determining the length, width, and height of the bounding space can be done by adding a certain dimension to the length, width, and height of the bounding box, or by directly using the length, width, and height of the bounding box to determine the length, width, and height of the bounding space. Configuring the preset resolution can be done by the computer device determining the preset resolution based on the minimum number of units in the length, width, and height directions and the length, width, and height of the bounding space. For example, if the bounding space has length, width, and height of L1, L2, and L3, and the minimum number of units in the length, width, and height directions are a, b, and c, then the preset resolution is configured to include an X-axis resolution of L1 / a, a Y-axis resolution of L2 / b, and a Z-axis resolution of L3 / c.
[0046] In step S120, the computer device performs hierarchical meshing of the enclosing space, including: recursively determining the value range of the implicit expression of each sub-mesh at the current level, and then performing next-level meshing on sub-mesh whose value range includes a threshold range, until each sub-mesh at the current level meets the preset resolution. Here, the implicit expression is the implicit expression of the implicit expression model, which will not be described further in subsequent embodiments.
[0047] In one embodiment, the step of the computer device performing hierarchical meshing of the enclosing space further includes performing an initial meshing of the enclosing space to obtain multiple sub-meshes. Specifically, the computer device divides the enclosing space equally in the length, width, and height directions to obtain multiple sub-meshes after the initial meshing. Please refer to Figure 3, which shows a schematic diagram of the enclosing space and the enclosing space after the initial meshing in one embodiment of this application. As shown in the figure, after the enclosing space V is bisected in the length, width, and height directions, eight sub-meshes are obtained. For ease of illustration, Figure 3 illustrates the divided sub-mesh v1, sub-mesh v2, sub-mesh v3, sub-mesh v4, sub-mesh v5, sub-mesh v6, sub-mesh v7, and sub-mesh v8 separately, and does not indicate that the sub-meshes will be separated or arranged in the manner shown in the figure. It should be noted that although the method of dividing the length, width, and height directions in the embodiment shown in Figure 3 is bisection, other embodiments may use division into thirds, fourths, or other numbers of equal parts. Different numbers of equal parts may also be divided in different directions, or it may be an approximate division. An approximate division means that the sub-grids after approximate division in the corresponding direction have little difference in that direction (e.g., the difference in the number of minimum units contained in the sub-grids after approximate division in the corresponding direction is within 50%). For example, when the number of minimum units contained in the enclosing space in the length, width, and / or height directions is odd, the corresponding directions can be approximately divided. For example, when the number of minimum units included in the length direction of the enclosing space is 2047, the computer device can approximately divide the space in the length direction. Taking approximate bisection as an example, after approximate bisection, the length direction includes two sub-grids. One sub-grid contains 1024 minimum units in the length direction, and the other sub-grid contains 1023 minimum units in the length direction. In the following embodiments, the method of dividing equally in different directions is used as an example of dividing into two equal parts.
[0048] The computer device can use the initial meshing as the first level of meshing, and recursively execute the process using multiple sub-meshes resulting from the first level of meshing as multiple sub-meshes of the first level. It then determines the value range of the implicit expression for each sub-mesh of the current level, and performs the next level of meshing on sub-meshes whose value range includes a threshold range, until all sub-meshes of the current level meet the preset resolution. Recursive execution means selecting sub-meshes using the same selection criteria to continue subdividing to the next level until a termination condition is met. In this embodiment, the selection criteria for each level are that the value range of the implicit expression of the sub-mesh at that level includes a threshold range, and the termination condition is that the sub-mesh at that level meets the preset resolution. Here, "each sub-mesh of the current level meets the preset resolution" means that each sub-mesh of the current level reaches the corresponding resolution in both the length, width, and height directions.
[0049] Specifically, the recursive execution process described in this embodiment can be expanded as follows: When none of the sub-grids in the first level reach the preset resolution, the computer device determines the implicit value range of each sub-grid in the first level, and performs second-level meshing on the sub-grids whose value ranges include the threshold range, thus obtaining the sub-grids in the second level. Then, when none of the sub-grids in the second level reach the preset resolution, the computer device continues to determine the implicit value range of each sub-grid in the second level, and performs third-level meshing on the sub-grids whose value ranges include the threshold range, thus obtaining the sub-grids in the third level. This process of performing meshing at the next level continues until all sub-grids in the current level meet the preset resolution, at which point meshing stops.
[0050] In one embodiment, the step of determining the implicit expression value range of each sub-grid at the current level to perform next-level meshing on sub-grids whose value range includes a threshold range includes determining the implicit expression value range of each sub-grid at the current level, comparing the threshold range with the value range of each sub-grid, and performing next-level meshing on the corresponding sub-grid if it is determined that the value range includes the threshold range.
[0051] The implicit expression range of the subgrid represents an estimated range of the numerical intervals of all output values obtained by inputting the implicit expression of the implicit expression model into all points in the subgrid. This estimated range is wider (or greater) than the numerical interval formed by the minimum and maximum values among all output values. For example, if the numerical interval formed by the minimum and maximum values among all points in a subgrid is [i, j], then the lower limit i1 of the implicit expression range [i1, j1] of the subgrid 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, the computer device determines the value range of a sub-mesh based on its diagonal vertices. The diagonal vertices of the sub-mesh are the two endpoints of its body diagonal. For example, the diagonal vertices are configured to correspond to the point closest to the origin (minimum position point) and the point furthest from the origin (maximum position point), respectively. In one example, the implicit expression is configured as an equation, function, combination of functions, or combination of function equations. The computer device may pre-store corresponding interval range calculation algorithms, and can call these algorithms based on the determined diagonal vertices of the sub-mesh to output the value range. In another example, the computer device determines the length of the body diagonal of the sub-mesh based on its diagonal vertices, and then determines the value range 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 inputs the coordinates of the center point of the sub-mesh into the implicit representation to obtain the output value *p*. The difference between the output value *p* and half the body diagonal length *r* is used as the lower limit of the value range, and the sum of the output value *p* and half the body diagonal length *r* is used as the upper limit of the value range. Thus, the value range of the sub-mesh can be obtained as [p-0.5r, p+0.5r]. In this embodiment, the value range of the sub-mesh can be obtained quickly while ensuring that the value range includes the actual output value range, thereby improving the computational speed of the meshing of the implicit representation model.
[0053] In another embodiment, the computer device determines the value range of a sub-mesh based on its key points. Specifically, each key point of the sub-mesh is substituted into an implicit expression to obtain multiple output values, and the interval formed by the minimum and maximum values among these multiple output values is determined as the value range of the sub-mesh. In one example, the key points include vertices of the sub-mesh, the center point of the sub-mesh, the midpoint of an edge of the sub-mesh, the center point of a face of the sub-mesh, or a corner vertex of the sub-mesh, but are not limited thereto. In other examples, those skilled in the art can add other points in the sub-mesh (e.g., points on the body diagonal) as key points according to accuracy requirements, based on the guidance of this application.
[0054] It should be noted that this application does not limit the method for determining the value range of the implicit expression of the subgrid, as long as the estimated value of the output value range can be obtained quickly.
[0055] The implicit value range of each sub-mesh at the current level can be determined by the method of determining the value range of the sub-mesh as described in any of the above embodiments. A threshold range is then compared with the value range of each sub-mesh to determine whether the value range of each sub-mesh includes the threshold range. In the following embodiments, the implicit configuration is illustrated by setting the implicit output value of a point to less than 0 to indicate that the point is inside the 3D model, and the implicit output value of a point to greater than 0 to indicate that the point is outside the 3D model.
[0056] In one embodiment, the threshold interval is configured as the boundary value of the implicit expression. The boundary value of the implicit expression represents the output value of the implicit expression of a point on the outer contour of the implicit expression model. Taking the output value of 0 as representing a 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 and / or upper limit of the value interval of the sub-grid with the boundary value. Further, in one example, when the lower limit 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, if 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, if the upper limit of a subgrid's value range is less than the boundary value, it is determined that the value range is less than the threshold range. In this case, the subgrid is completely inside the implicit representation model. For example, if a subgrid's value range is [-2, -1] and the boundary value is 0, then the subgrid's value range is determined to be less than the threshold range. In yet another example, if the lower limit of a subgrid's value range is less than or equal to the boundary value and the upper limit of the value range is greater than or equal to the boundary value, then the corresponding subgrid's value range is determined to include the threshold range. In this case, the subgrid may be completely inside the implicit representation model, completely outside the implicit representation model, or partially inside and partially outside the implicit representation model. For example, if a subgrid's value range is [-1, 1] and the boundary value is 0, then the subgrid's value range is determined to include the threshold range.
[0057] In another embodiment, the threshold interval is configured as an interval containing the boundary values of the implicit expression, with a first threshold as the upper limit and a second threshold as the lower limit. In other words, the boundary values of the implicit expression are contained within the threshold interval with the first threshold as the upper limit and the second threshold as the 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 subgrid can, for example, be comparing the lower limit of the value interval of the subgrid with the upper limit of the threshold interval and / or comparing the upper limit of the value interval of the subgrid with the lower limit of the threshold interval. Further, in one example, when the lower limit of the value range of a sub-grid is greater than the first threshold, it is determined that the value range is greater than the threshold range. In this case, the sub-grid is completely outside the implicit representation model. For example, if the threshold range is configured as [-0.1, 0.1] and the value range of a sub-grid is [0.2, 0.4], then the value range is determined to be greater than the threshold range. In another example, when the upper limit of the value range of a sub-grid is less than the second threshold, it is determined that the value range is less than the threshold range. In this case, the sub-grid is completely inside the implicit representation model. For example, if the threshold range is configured as [-0.1, 0.1] and the value range of a sub-grid is [-1, -0.3], then the value range is determined to be less than the threshold range. In another example, when the lower limit of the value range of a sub-grid is less than or equal to a first threshold and the upper limit of the value range is greater than or equal to a second threshold, it is determined that the value range of the corresponding sub-grid includes the threshold range. In this case, the sub-grid may be completely located inside the implicit expression model, completely located outside the model, or partially located inside and partially outside the model. For example, if the value range of a sub-grid is [-1, 0.05] and the threshold range is [-0.1, 0.1], then it is determined that the value range of the sub-grid includes the threshold range.
[0058] In other embodiments, when the implicit is configured such that the implicit output value corresponding to a point is less than 0 indicating that the point is outside the 3D model, and the implicit output value corresponding to a point is greater than 0 indicating that the point is inside the 3D model, then under the condition that the value range is greater than the threshold range, it is determined that the sub-mesh is completely inside the implicit representation model, and under the condition that the value range is less than the threshold range, it is determined that the sub-mesh is completely outside the implicit representation model.
[0059] The computer device performs next-level meshing on the corresponding sub-mesh when the value range includes the threshold range. In one embodiment, the next-level meshing is configured to traverse the length, width, and height directions of the current-level sub-mesh and perform meshing on directions where even division is possible. Specifically, when performing next-level meshing on the current-level sub-mesh, the length, width, and height directions of the current-level sub-mesh are traversed, and directions that do not reach the corresponding resolution are considered directions where even division is possible. After even division on the directions where even division is possible for the current-level sub-mesh, the next-level meshing of the sub-mesh is achieved. The method of even division on the directions where even division is possible for the current-level sub-mesh is the same as or similar to the method of even division on the length, width, and height directions during the initial meshing, and will not be repeated here.
[0060] Taking bisection as an example, where equal division is performed in the directions where it is feasible, a detailed explanation is provided. If the length, width, and height directions are all directions where equal division is feasible, then after performing a next-level meshing, a sub-mesh can be divided into 8 sub-meshes. In this embodiment, the method of dividing the sub-mesh is the same as the initial meshing method shown in Figure 3. If only two of the length, width, and height directions are directions where equal division is feasible, then after performing a next-level meshing, a sub-mesh can be divided into 4 sub-meshes. Please refer to Figure 4, which shows a schematic diagram of the sub-mesh after equal division in one embodiment of this application, where the length and width directions of a sub-mesh are directions where equal division is feasible. As shown in the figure, after equal division in the length and width directions of a sub-mesh v9, 4 sub-meshes (sub-mesh v91, sub-mesh v92, sub-mesh v93, and sub-mesh v94) can be obtained. If only one of the length, width, and height directions is a direction where equal division is feasible, then after performing a next-level meshing, a sub-mesh can be divided into 2 sub-meshes. Please refer to Figure 5, which shows a schematic diagram of the sub-mesh after it is divided into two sub-meshes (sub-mesh v100 and sub-mesh v101) in one embodiment of this application. As shown in the figure, after dividing the length direction of a sub-mesh v10 into two sub-meshes (sub-mesh v100 and sub-mesh v101), two sub-meshes can be obtained.
[0061] In one specific embodiment, please continue to refer to Figures 3 and 6. Figure 6 shows a schematic diagram of the sub-grids in the embodiment shown in Figure 3 after the implicitly expressed value range containing the threshold range are further meshed. For example, according to any of the embodiments described above, if the sub-grids in the multiple sub-grids (sub-grid v1, sub-grid v2, sub-grid v3, sub-grid v4, sub-grid v5, sub-grid v6, sub-grid v7, sub-grid v8) after the first-level meshing in Figure 3 contain sub-grid v1, sub-grid v2, sub-grid v5, and sub-grid v6, then only the sub-grids need to be meshed. Sub-mesh v1, sub-mesh v2, sub-mesh v5, and sub-mesh v6 are subdivided into the next level, while the remaining sub-mesh (i.e., sub-mesh v3, sub-mesh v4, sub-mesh v7, and sub-mesh v8) do not need to be subdivided further. Taking the sub-mesh v6 as an example, the length, width, and height directions of sub-mesh v6 are traversed. For example, if the length, width, and height directions of sub-mesh v6 do not reach the corresponding resolution, then the length, width, and height directions of sub-mesh v6 are taken as the directions for equal division. After equal division in the three directions, the second level of meshing of sub-mesh v6 is achieved, that is, sub-mesh v6 is divided into 8 sub-mesh in Figure 6. Similar to sub-mesh v6, the next level of meshing for sub-mesh v1, sub-mesh v2, and sub-mesh v5 involves traversing the length, width, and height directions of sub-mesh v1, sub-mesh v2, and sub-mesh v5. For example, if the length, width, and height directions of sub-mesh v1, sub-mesh v2, and sub-mesh v5 do not reach the corresponding resolution, then the length, width, and height directions of sub-mesh v1, sub-mesh v2, and sub-mesh v5 are used as directions for even division. After even division in the three directions, the second level of meshing for sub-mesh v1, sub-mesh v2, and sub-mesh v5 is achieved. In Figure 6, sub-mesh v1, sub-mesh v2, and sub-mesh v5 can also be divided into 8 sub-mesh. Due to the viewing angle, not all the divided sub-mesh can be shown.
[0062] In one embodiment, the step of determining the value range of the implicit expression of each sub-grid at the current level for further meshing of the sub-grids whose value range includes a threshold range further includes step S1200.
[0063] In step S1200, when the computer device determines that the value range is greater than the threshold range, it fills the corresponding sub-mesh with values representing values outside the implicit representation model; and when it determines that the value range is less than the threshold range, it fills the corresponding sub-mesh with values representing values inside the implicit representation model. In this embodiment, the implicit configuration is that an implicit output value less than 0 for a point indicates that the point is inside the 3D model, and an implicit output value greater than 0 for a point indicates that the point is outside the 3D model.
[0064] In one embodiment, based on the comparison of value ranges and threshold ranges in the foregoing embodiments, when the value range of a sub-grid is greater than the threshold range, it indicates that the sub-grid is completely outside the implicit representation model, and thus the sub-grid can be filled with values representing values outside the implicit representation model. When the value range of a sub-grid is less than the threshold range, it indicates that the sub-grid is completely within the implicit representation model, and thus the sub-grid can be filled with values representing values within the implicit representation model. The values representing values outside the implicit representation model and the values representing values within the implicit representation model can be configured to be arbitrarily different values. For example, the value representing values outside the implicit representation model can be configured as 0, and the value representing values within the implicit representation model can be configured as 2.
[0065] Please refer to Figure 6 and Figure 3. If the comparison results of sub-grids v3, v4, v7, and v8 all show values greater than the threshold interval, then sub-grids v3, v4, v7, and v8 will be filled with values representing values outside the implicit expression model, for example, all filled with 0. It should be noted that when the threshold interval is configured as the boundary value of the implicit expression, or when the threshold interval is configured as an interval containing the boundary value of the implicit expression with a first threshold as the upper limit and a second threshold as the lower limit, the methods for determining whether the value interval is greater than the threshold interval and the methods for determining whether the value interval is less than the threshold interval are the same as or similar to those described in the previous embodiments, and will not be repeated here.
[0066] In other embodiments, when the implicit is configured such that the implicit output value corresponding to a point is less than 0 indicating that the point is outside the 3D model, and the implicit output value corresponding to a point is greater than 0 indicating that the point is inside the 3D model, the corresponding sub-mesh can be filled with a value representing the implicit representation model when the value range is greater than the threshold range, and the corresponding sub-mesh can be filled with a value representing the implicit representation model when the value range is less than the threshold range.
[0067] In one embodiment, when filling a subgrid with a value representing a value outside or inside the implicit expression model, the value representing a value outside or inside the implicit expression model can be filled at the location of the center point in the subgrid.
[0068] In one embodiment, in order to reduce the amount of data in the subsequently generated gridded model, subgrids with value ranges greater than the threshold range and subgrids with value ranges less than the threshold range may also be left unfilled with values.
[0069] It should be noted that when comparing the threshold interval with the value interval of each sub-grid, the comparison can be made separately after the value interval of each sub-grid is fully calculated, or the value interval of each sub-grid can be compared with the threshold interval after the value interval of each sub-grid is calculated. A similar case includes the step of performing the next level of meshing on the corresponding sub-grid. When performing this step, all sub-grids that meet the condition that the value interval includes the threshold interval can be meshed together at the next level, or the sub-grid can be meshed at the next level after determining that the value interval of each sub-grid includes the threshold interval. A similar case includes step S1200.
[0070] Furthermore, according to step S120, when each sub-mesh of the current level meets the preset resolution, the next level of meshing will be stopped; otherwise, the selected sub-mesh will continue to be meshed at the next level according to the aforementioned embodiments of step S120. Please refer to Figure 6. If all the sub-mesh (i.e., the 32 sub-mesh) after sub-mesh v1, sub-mesh v2, sub-mesh v5, and sub-mesh v6 are divided, and the resolution in the length direction, width direction, and height direction is achieved, then it means that the 32 sub-mesh after the second-level meshing all meet the preset resolution. In this case, the next level of meshing for sub-mesh v1, sub-mesh v2, sub-mesh v5, and sub-mesh v6 is stopped. Otherwise, the value ranges for the 32 sub-mesh will be determined separately, and the next level of meshing will be performed on the sub-mesh whose value range includes a threshold range. The sub-mesh with value ranges greater than the threshold range will be filled with values representing values outside the implicit expression model, and the sub-mesh with value ranges less than the threshold range will be filled with values representing values within the implicit expression model.
[0071] After the termination condition is met in step S120, that is, until the divided sub-mesh meets the preset resolution, the meshing will stop and step S130 will be executed. In step S130, the computer device selects sub-mesh whose implicitly expressed value range includes the threshold range from each sub-mesh that meets the preset resolution as key meshes for numerical filling to generate a meshed model. It should be understood that in step S130, the implicitly expressed value range of each sub-mesh that meets the preset resolution will be determined according to the embodiment provided in step S120, and then a judgment will be made to select key meshes. Of course, the process of determining the implicitly expressed value range of each sub-mesh that meets the preset resolution can also be executed in step S120. That is, when the sub-mesh meets the preset resolution, step S120 will further determine the implicitly expressed value range of these sub-meshes for use in step S130.
[0072] Given that the value range is the estimated range of the output value of the implicit expression of the sub-mesh, and that it includes the threshold range, it is not necessarily accurate to determine that the sub-mesh is necessarily on the model (e.g., 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 fill the sub-mesh whose value range of the implicit expression includes the threshold range as the key mesh with numerical values, and then use it to generate the meshed model corresponding to the implicit expression model. Please refer to Figure 6. As shown in Figure 6, after the second-level meshing, all 32 sub-grids reach the preset resolution, and only the value ranges of sub-grids v11, v12, v15, v16, v21, v25, v51, v52, v61, and v66 among the 32 sub-grids include the threshold range. In this case, the computer device will use sub-grids v11, v12, v15, v16, v21, v25, v51, v52, v61, and v66 as key grids.
[0073] In one embodiment, the step of numerical filling includes selecting at least one representative point in the key grid to obtain the implicit expression output value of the at least one representative point, and filling the output value into the corresponding position in the key grid. The representative point can be the center point of the key grid, a corner point, or other location points in the key grid. In one example, the step of numerical filling includes selecting a representative point in the key grid to obtain the implicit expression output value of the representative point, and filling the output value into the position of the representative point in the key grid. Taking the representative point as the center point of the key grid as an example, inputting the coordinates of the center point of the key grid into the implicit expression yields the implicit expression output value of the center point, which is then filled into the corresponding key grid. Please continue referring to Figure 6. After inputting the coordinates of the center points of sub-mesh v11, sub-mesh v12, sub-mesh v15, sub-mesh v16, sub-mesh v21, sub-mesh v25, sub-mesh v51, sub-mesh v52, sub-mesh v61, and sub-mesh v66 into the implicit expression, the output values of the implicit expression of the center points of each sub-mesh v11, sub-mesh v12, sub-mesh v15, sub-mesh v16, sub-mesh v21, sub-mesh v25, sub-mesh v51, sub-mesh v52, sub-mesh v61, and sub-mesh v66 can be obtained. These output values are then filled into the corresponding locations of the center points of each sub-mesh v11, sub-mesh v12, sub-mesh v15, sub-mesh v16, sub-mesh v21, sub-mesh v25, sub-mesh v51, sub-mesh v52, sub-mesh v61, and sub-mesh v66. In this example, the computer device can fill the output values of the implicit expression of the center points of the key mesh into the locations of the center points in the key mesh. While the above example details the process of selecting a representative point in the key grid to obtain the implicit expression output value of that representative point and filling that output value into the key grid, it is not limited to this. In other examples, multiple representative points (two or more) can be selected in the key grid to obtain the implicit expression output values of the multiple representative points, and then the implicit expression output values of the multiple representative points can be filled into the positions of the multiple representative points in the key grid. For example, the eight corner points in the key grid can be used as representative points, and the implicit expression output values of the eight corner points can be filled into the positions of the eight corner points of the key grid respectively.
[0074] It should be noted that the values filled in the key grid can also be any values with the same sign as the output value of the implicit expression. For example, if the implicit output value of the center point of the key grid is -8, then any negative number can be directly filled in the key grid. Conversely, if the implicit output value 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 utilize a preset algorithm to perform triangular mesh transformation on the filled key mesh to generate a meshed model expressed in triangular mesh. The preset algorithm may be a Marching Cubes algorithm, a dual contour algorithm, or a surface network algorithm, etc. It should be noted that this application does not limit the preset algorithm; those skilled in the art can select other algorithms capable of triangular mesh transformation based on the above examples of preset algorithms.
[0076] In another embodiment, the computer device further determines the position of the key mesh relative to the outer contour of the implicit representation model, that is, it further fills the key mesh with values representing values on the implicit representation model, values representing values outside the implicit representation model, or values representing values inside the implicit representation model. In this embodiment, the step of filling in the values includes steps S1300 and S1301.
[0077] In step S1300, the computer device determines the distance between the center point of the key mesh and the implicit representation model, and compares the distance with a reference distance. The reference distance is configured as half the distance between the diagonal vertices of the key mesh, i.e., the reference distance is configured as half the volume diagonal of the key mesh.
[0078] Since the output value of the implicit representation of the center point of the critical mesh only indicates whether the center point is inside or outside the implicit representation model, it does not necessarily represent the actual shortest distance between the center point and the model. For example, when the implicit representation model includes the implicit representation of a three-period minimum surface, the output value of the implicit representation of the center point of the critical mesh may not 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 critical mesh and the implicit representation model, and compare the distance with a reference distance to determine whether the critical mesh is on the implicit representation model.
[0079] In one embodiment, the computer device uses a preset distance calculation algorithm to calculate the distance between the center point of the critical grid and the implicit representation model, which is the shortest distance between the center point of the critical grid and the implicit representation model. Examples of the preset distance calculation algorithm include gradient descent and Newton's iteration method. It should be noted that this application does not limit the preset distance calculation algorithm; those skilled in the art can select other algorithms capable of finding the shortest distance based on the examples of preset distance calculation algorithms described above.
[0080] Furthermore, the solved distance is compared with the reference distance. When the distance is less than or equal to a majority of the reference distances, it indicates that the critical mesh is definitely on the implicit representation model; in other words, the critical mesh is definitely in contact with the outer contour of the implicit representation model. When the distance is greater than the reference distance, it indicates that the critical mesh is inside or outside the implicit representation model. For example, please refer to Figures 7 to 9, which respectively show schematic diagrams of the relative positional relationship between the critical mesh and the implicit representation model in different embodiments of this application. In the embodiments shown in Figures 7 and 8, the shortest distance L7 between the center point o of the critical mesh calculated by the computer device and the implicit representation model M is greater than the reference distance r. Therefore, the critical mesh may be outside the implicit representation model M as shown in Figure 7, or it may be inside the implicit representation model as shown in Figure 8. As shown in Figure 9, the shortest distance L7 between the center point o of the critical mesh and the implicit representation model M is less than the reference distance r, so the critical mesh is in contact with the outer contour of the implicit representation model.
[0081] In step S1301, the computer device fills the key grid with a value representing an implicit representation model when the distance is less than or equal to the reference distance, or determines the fill value of the key grid when the distance is greater than the reference distance.
[0082] Here, the values represented on the implicit expression model are real numbers that are different from the values represented outside the implicit expression model and the values represented inside the implicit expression model. For example, the value represented outside the implicit expression model is configured as 0, the value represented inside the implicit expression model is configured as 2, and the value represented on the implicit expression model is configured as 1.
[0083] For example, in the key grids of Figure 6 (i.e., subgrids v11, v12, v15, v16, v21, v25, v51, v52, v61, and v61), the distances between the center points of subgrids v11, v12, v15, v21, v25, v51, v52, and v61 and the implicit representation model are all less than or equal to the reference distance. Therefore, subgrids v11, v12, v15, v21, v25, v51, v52, and v61 are filled with values represented in the implicit representation model.
[0084] In one embodiment, when the distance is greater than the reference distance, it is necessary to determine whether the key mesh is outside or inside the implicit representation model to determine the fill value of the key mesh. In a specific embodiment, the step of determining the fill value of the key mesh when the distance is greater than the reference distance includes steps S13010 and S13011. In this embodiment, the implicit configuration is such that an implicit output value less than 0 for a point indicates that the point is inside the 3D model, and an implicit output value greater than 0 for a point indicates that the point is outside the 3D model.
[0085] In step S13010, the computer device determines the output value of the implicit representation of the center point of the key mesh, and compares the output value with the boundary value of the implicit representation. Specifically, when the distance is greater than the reference distance, the computer device determines the output value of the implicit representation of the center point of the key mesh and compares the output value with the boundary value (i.e., 0) of the implicit representation. When the output value is greater than the boundary value (i.e., 0), it is determined that the key mesh is outside the implicit representation model; when the output value is less than the boundary value (i.e., 0), it is determined that the key mesh is inside the implicit representation model. For example, in the key mesh of Figure 6, the distances between the center points of sub-mesh v16 and sub-mesh v66 and the implicit representation model are both greater than the reference distance, and the output value of the implicit representation of the center point of sub-mesh v66 is greater than the boundary value, while the output value of the implicit representation of the center point of sub-mesh v16 is less than the boundary value. This indicates that sub-mesh v66 is outside the implicit representation model, and sub-mesh v16 is inside the implicit representation model.
[0086] In step S13011, the computer device fills the key grid with values representing values outside the implicit representation model when the output value is greater than the boundary value; or, when the value is less than the boundary value, it fills the key grid with values representing values within the implicit representation model.
[0087] Please continue to refer to Figure 6. In the above embodiment, it is determined that the output value of the implicit expression of the center point of sub-mesh v66 in the key mesh of Figure 6 is greater than the boundary value, and the output value of the implicit expression of the center point of sub-mesh v16 is less than the boundary value. Sub-mesh v66 is filled with values representing values outside the implicit expression model, and sub-mesh v16 is filled with values representing values inside the implicit expression model.
[0088] In other embodiments, when the implicit is configured such that an implicit output value less than 0 indicates that the point is outside the 3D model, and an implicit output value greater than 0 indicates that the point is inside the 3D model, the computer device fills the key mesh with values representing values inside the implicit representation model when the output value is greater than the boundary value; or, when the value is less than the boundary value, fills the key mesh with values representing values outside the implicit representation model.
[0089] In one embodiment, when filling the key grid with values representing values on the implicit representation model, values outside the implicit representation model, or values inside the implicit representation model, the values representing values on the implicit representation model, values outside the implicit representation model, or values inside the implicit representation model are filled into the location of the center point in the key grid.
[0090] In one embodiment, a computer device generates the voxel mesh model based on the meshed and filled bounding space by filling key meshes with values representing values on the implicit representation model, values representing values outside the implicit representation model, and values representing values inside the implicit representation model. For example, the voxel mesh model includes multiple sub-meshes obtained through hierarchical meshing, and the sub-mesh that serves as the key mesh is filled with the values.
[0091] In some embodiments, this application also proposes a gridded system for an implicit representation model, which can be deployed, for example, in a computer device as a software tool or software module capable of processing data, performing data processing with the help of the hardware devices and / or the operating environment provided by the operating system in the computer device.
[0092] Please refer to Figure 10, which shows a block diagram of a meshing system for an implicit representation model according to an embodiment of this application. As shown in the figure, the meshing system 1 for the implicit representation model includes a bounding space creation module 10, a meshing and filling module 11, and a transformation module 12. The bounding space creation module 10 is used to create a bounding space with a preset resolution that can completely enclose the implicit representation model. The meshing and filling module 11 is used to perform step-by-step meshing of the bounding space. Step-by-step meshing of the bounding space includes: recursively executing the determination of the value range of the implicit representation of each sub-mesh of the current level, and performing the next level meshing on the sub-mesh whose value range includes a threshold range, until each sub-mesh of the current level meets the preset resolution; it is also used to select the sub-mesh whose value range of the implicit representation includes the threshold range as the key mesh for numerical filling among the sub-mesh that meet the preset resolution; the transformation module 12 is used to generate a meshed model based on the bounding space after meshing and filling.
[0093] In one embodiment, the meshing model is a mesh model expressed as a triangular mesh. The conversion module 12 uses a preset algorithm to convert the filled key mesh into a triangular mesh to generate a meshed model expressed as a triangular mesh. The preset algorithm can be a Marching Cubes algorithm, a dual contour algorithm, or a surface network algorithm, etc. It should be noted that this application does not limit the preset algorithm; those skilled in the art can select other algorithms capable of triangular mesh conversion based on the above examples of preset algorithms.
[0094] In another embodiment, the generated meshed model is a voxel mesh model. After the conversion module 12 fills the key meshes with values, the voxel mesh model can be generated based on the meshed and filled bounding space. For example, the voxel mesh model includes multiple sub-meshes obtained by hierarchical meshing, and the sub-meshes that serve as key meshes are filled with the values.
[0095] In one embodiment, the meshing system 1 for the implicit representation model includes a bounding space creation module 10, a meshing and filling module 11, and a transformation module 12, which coordinately execute the meshing method for the implicit representation model disclosed in any of the foregoing embodiments of this application according to the functions described above. Please refer to any embodiment described with respect to Figures 1 to 9 and their related descriptions, which will not be repeated here.
[0096] The bounding space creation module 10, the meshing and filling module 11, and the transformation module 12 can also be implemented in software running on different types of processors. For example, a module of executable code may include one or more physical or logical blocks of computer instructions organized as objects, programs, or functions. However, the executable files of the modules do not necessarily have to be physically located together, but may include different commands stored in different locations, which, when logically connected together, encompass the module and implement the module's specified objectives.
[0097] Of course, the executable code module can be one or more instructions, and can even be distributed across several different code segments, different programs, and multiple storage devices. Similarly, computational data can be identified and represented within the module, and can be embodied in any suitable form and organized in any suitable data structure. The computational data can be collected as a single dataset, or can be distributed across different locations (including different storage devices), and can exist at least partially as electrical signals within a system or network. When the module or a portion thereof is implemented in software, the software portion is stored on one or more computer-readable media.
[0098] This application also provides a computer device, including a bus, a processor, a memory, and a communication interface. The processor, memory, and 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 this application does not specifically limit the embodiments thereto, nor does it limit the number of processors and memories in the computing device.
[0099] A bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one line is used in the diagram, but this does not imply that there is only one bus or one type of bus. A bus can include pathways for transmitting information between various components of a computing device (e.g., memory, processor, communication interfaces).
[0100] In one embodiment, the computer device is used to implement the meshing method of the implicit representation 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 control computers, tablets, smartphones, servers, server clusters, smart terminals, cloud-based server systems, etc.
[0101] Please refer to Figure 11, which shows a schematic diagram of the structure of a computer device 2 according to one embodiment of this application. 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 that can be executed by the processing device 21 to coordinate the storage device 20 in implementing the meshing method of the implicit representation 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), and nonvolatile RAM (NVRAM). For example, the storage device 20 includes flash memory or other nonvolatile solid-state storage devices. In some embodiments, the storage device 20 may also include memory located remotely from one or more processing devices 21, such as network-attached memory accessed via RF circuitry or external ports and communication networks, wherein the communication network may be the Internet, one or more intranets, local area networks, wide area networks, storage area networks, etc., or suitable combinations thereof. A memory controller can control access to 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 is operatively configured 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 integrated circuits (ASICs), one or more digital signal processors (DSPs), one or more field-programmable gate arrays (FPGAs), or any combination thereof.
[0104] In some embodiments, the communication interface 22 includes at least one interface unit, each interface unit being used to output a visual interface, receive human-computer interaction events generated according to the operation of a technician, etc. For example, the communication interface 22 includes, but is not limited to, serial interfaces such as HDMI interfaces or USB interfaces, or parallel interfaces, etc. In one embodiment, the communication interface 22 further includes a network communication unit, which is a device for data transmission using wired or wireless networks, examples of which include, but are not limited to, integrated circuits including network cards, local area network modules such as WiFi modules or Bluetooth modules, and wide area network modules such as mobile networks, etc.
[0105] This application also provides a computer-readable storage medium storing at least one program that, when invoked and executed by a computer's processor, implements the meshing method for the implicit representation model as described in any of the above embodiments.
[0106] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the meshing method for the implicit representation model in any of the above embodiments.
[0107] If the method is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device with the storage medium installed to execute all or part of the steps of the methods described in the various embodiments of this application.
[0108] In the embodiments provided in this application, the provided computer storage medium may include read-only memory, random access memory, EEPROM, CD-ROM or other optical disc storage devices, disk storage devices or other magnetic storage devices, flash memory, USB flash drive, portable hard drive, or any other medium capable of storing desired program code in the form of instructions or data structures and accessible by a computer. Additionally, any connection may be appropriately referred to as a computer-readable medium. For example, if instructions are transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of the medium. However, it should be understood that computer storage medium and data storage medium do not include connections, carrier waves, signals, or other transient media, but are intended for non-transient, tangible storage media. The disks and optical discs used in the application include compact discs (CDs), laser discs, optical discs, digital multifunction discs (DVDs), floppy disks, and Blu-ray discs, where disks typically copy data magnetically, while optical discs use lasers to copy data optically.
[0109] In summary, the meshing method and system, computer device, computer-readable storage medium, and computer program product of the implicit representation model disclosed in this application, in the process of progressively meshing the bounding space that can completely enclose the implicit representation model, only meshes the sub-grids whose value ranges include a threshold range until all sub-grids at the current level meet the preset resolution. Among the sub-grids that meet the preset resolution, the sub-grids whose implicit representation value ranges include the threshold range are selected as key grids for numerical filling to generate the meshed model. In this way, this application can reduce the computational cost of converting the implicit representation model (hereinafter referred to as the implicit model) into a meshed model and improve the computational speed of converting the implicit representation model into a meshed model. Furthermore, the computer device can accurately determine the key grids on the implicit representation model by comparing the distance between the center point of the key grid and the implicit representation model with the reference distance, and can accurately determine whether the key grids are outside or inside the implicit representation model by comparing the output value of the implicit representation of the center point of the key grid with the boundary value, thereby making the generated voxel mesh model more accurate; and by not filling non-key grids with numerical values, the amount of data in the generated mesh model is reduced.
[0110] The above embodiments are merely illustrative of the inventive essence and beneficial effects of this application, and are not intended to limit this application. Any person skilled in the art can modify or alter the above embodiments without departing from the principles and scope of this application. Therefore, all equivalent modifications or alterations achieved by those skilled in the art without departing from the spirit and technical concept disclosed in this application should still be covered by the claims of this application.
Claims
1. A gridding method for an implicit representation model, characterized in that, Includes the following steps: Create a bounding space with a preset resolution that can completely enclose the implicit representation model; The enclosing space is meshed level by level, including: recursively executing the determination of the value range of the implicit expression of each sub-grid of the current level, so as to perform the next level meshing on the sub-grid where the value range includes a threshold range, until each sub-grid of the current level meets the preset resolution; In each sub-grid that meets the preset resolution, the sub-grid whose implicitly expressed value range includes the threshold range is selected as the key grid for numerical filling to generate a gridded model.
2. The meshing method for the implicit representation model according to claim 1, characterized in that, The steps of creating a bounding space with a preset resolution that can completely enclose the implicit representation model include: creating the bounding space based on the length, width, height and grid parameters of the bounding box of the implicit representation model and configuring the preset resolution.
3. The meshing method for the implicit representation model according to claim 2, characterized in that, Also includes: The steps include providing a parameter configuration window for the user to input the mesh parameters.
4. The meshing method for the implicit representation model according to claim 2 or 3, characterized in that, The grid parameters include the minimum cell size of the grid or the minimum number of cells in the enclosing space in the length, width, and height directions.
5. The meshing method for the implicit representation model according to claim 1, characterized in that, The next level of meshing is configured to traverse the length, width, and height of the current level submesh and perform meshing by dividing it into equal parts along the directions in which equal division is possible.
6. The meshing method for the implicit representation model according to claim 1, characterized in that, The step of determining the value range of the implicit expression of each sub-grid at the current level and performing next-level meshing on sub-grids whose value range includes a threshold range includes: determining the value range of the implicit expression of each sub-grid at the current level, comparing the threshold range with the value range of each sub-grid, and performing next-level meshing on the corresponding sub-grid if the value range includes the threshold range.
7. The meshing method for the implicit representation model according to claim 6, characterized in that, The steps for determining the value range of the implicit expression of each sub-grid at the current level include: determining the value range of the sub-grid based on the diagonal vertices of the sub-grid.
8. The meshing method for the implicit representation model according to claim 7, 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.
9. The meshing method for the implicit representation model according to claim 6, characterized in that, The step of determining the value range of the implicit expression of each subgrid at the current level and performing next-level meshing on the subgrid whose value range includes a threshold range further includes: filling the corresponding subgrid with values represented outside the implicit expression model when the value range is greater than the threshold range, and filling the corresponding subgrid with values represented within the implicit expression model when the value range is less than the threshold range.
10. The meshing method for the implicit representation model according to claim 6 or 9, characterized in that, The threshold interval is configured as the boundary value of the implicit expression. When the lower limit 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 of the value interval is less than the boundary value, it is determined that the value interval is less than the threshold interval.
11. The meshing method for the implicit representation model according to claim 6 or 9, characterized in that, The threshold interval is configured as an interval containing implicitly expressed boundary values with a first threshold as the upper limit and a second threshold as the lower limit. When the lower limit 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 of the value interval is less than the second threshold, it is determined that the value interval is less than the threshold interval.
12. The meshing method for the implicit representation model according to claim 1, characterized in that, The step of progressively meshing the enclosing space further includes performing an initial meshing of the enclosing space to obtain multiple sub-meshes of the initial meshing.
13. The meshing method for the implicit representation model according to claim 1, characterized in that, The steps for numerical filling include: 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.
14. The meshing method for the implicit representation model according to claim 13, characterized in that, The representative point is configured as the center point of the key grid.
15. The meshing method for the implicit representation model according to claim 13, characterized in that, The steps to generate a meshed model include using a preset algorithm to convert the filled key mesh into a triangular mesh to generate a meshed model expressed in triangular mesh.
16. The meshing method for the implicit representation model according to claim 1, characterized in that, The steps for filling in numerical values include: The distance between the center point of the key grid and the implicit representation model is determined, and the distance is compared with a reference distance; wherein the reference distance is configured as half the distance between the diagonal vertices of the key grid; The key grid is filled with values represented in the implicit representation model when the distance is less than or equal to the reference distance; or, the key grid is filled with values when the distance is greater than the reference distance.
17. The meshing method for the implicit representation model according to claim 16, characterized in that, The step of determining the fill value of the critical mesh under the condition that the distance is greater than the reference distance includes: Determine the output value of the implicit representation of the center point of the key grid, and compare the output value with the boundary value of the implicit representation; The key grid is filled with values representing values outside the implicit representation model when the output value is greater than the boundary value; or, the key grid is filled with values representing values within the implicit representation model when the output value is less than the boundary value.
18. A gridded system for an implicit representation model, characterized in that, include: The bounding space creation module is used to create a bounding space with a preset resolution that can completely enclose the implicit representation model; The meshing and filling module is used to perform hierarchical meshing of the enclosing space. Hierarchical meshing of the enclosing space includes: recursively executing the determination of the implicit expression value range of each sub-mesh at the current level, and performing next-level meshing on sub-mesh whose value range includes a threshold range, until each sub-mesh at the current level satisfies the preset resolution; and further used to select sub-mesh whose implicit expression value range includes the threshold range from the sub-mesh that satisfies the preset resolution as key meshes for numerical filling. The transformation module is used to generate a meshed model based on the meshed and filled bounding space.
19. A computer device, characterized in that, include: Storage device for storing at least one program; A processing device, connected to the storage device, is configured to implement the meshing method of the implicit representation model as described in any one of claims 1 to 17 when the at least one program is invoked and executed from the storage device.
20. A computer-readable storage medium, characterized in that, The system stores at least one program that, when invoked and executed by a computer's processor, implements the meshing method for the implicit representation model as described in any one of claims 1 to 17.
21. A computer program product, characterized in that, When the computer program product is run on a computer, the computer performs a meshing method for the implicit representation model as described in any one of claims 1 to 17.