Edge and corner feature restoration method and system, computer device, storage medium, and product

WO2026165992A1PCT designated stage Publication Date: 2026-08-13SHANGHAI VOXELDANCE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2026-08-13

Smart Images

  • Figure CN2025086085_13082026_PF_FP_ABST
    Figure CN2025086085_13082026_PF_FP_ABST
Patent Text Reader

Abstract

An edge and corner feature restoration method and system applied to model meshing in 3D printing, a computer device, a computer-readable storage medium, and a computer program product. The edge and corner feature restoration method comprises the following steps: converting an implicit expression model into a triangular mesh model (S110), wherein edge and corner features of the implicit expression model are converted into smooth features; traversing all triangular facets in the triangular mesh model to determine, on the basis of the implicit expression model, an expected normal vector corresponding to each triangular facet (S120); and optimizing the position of each triangular facet on the basis of the expected normal vector corresponding to each triangular facet, so that an actual normal vector of each optimized triangular facet is aligned with the expected normal vector, thereby restoring the smooth features on the triangular mesh model to the edge and corner features (S130).
Need to check novelty before this filing date? Find Prior Art

Description

Edge and corner feature recovery methods and systems, computer equipment, storage media and products Technical Field

[0001] This application relates to the field of 3D printing technology, specifically to a method and system for restoring the corner features of a model mesh in 3D printing, a computer device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] Implicit modeling is widely used in fields such as 3D printing and computer-aided design (CAD). Implicit models of 3D objects (i.e., 3D parts) built through implicit modeling can have smooth surfaces and complex structures, can easily perform Boolean operations, and their model accuracy is independent of resolution.

[0003] In the application of implicit modeling in 3D printing, it is typically necessary to convert the implicit model into a triangular mesh model composed of triangular facets. This triangular mesh model serves as input for pre-processing software such as 3D printing software and is used for model rendering. In applications requiring high precision, such as industrial applications, it is generally desirable for the converted triangular mesh model to retain edge and corner features. However, current algorithms rely on methods such as distance field-based or isosurface extraction to ensure the preservation of edge and corner features. While these methods can capture the edges and corners of geometric surfaces, they are computationally intensive and consume a large amount of memory. Furthermore, they may fail to accurately describe other features, leading to distortion in certain areas of the model.

[0004] Therefore, how to convert implicit models into triangular mesh models that preserve edge and corner features while reducing computation and memory usage and improving conversion quality 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 method and system for restoring the edge and corner features of model meshing in 3D printing, a computer device, a computer-readable storage medium and a computer program product, so as to overcome the technical problems in the above-mentioned related technologies of how to convert implicit models into triangular mesh models that retain edge and corner features while reducing computation and memory consumption and improving conversion quality.

[0006] To achieve the above and other related objectives, the first aspect of this application discloses a method for recovering corner features of a model mesh in 3D printing, comprising the following steps: converting an implicit representation model into a triangular mesh model, wherein the corner features of the implicit representation model are converted into rounded features; traversing all triangular faces in the triangular mesh model to determine the expected normal vector corresponding to each triangular face based on the implicit representation model; optimizing the position of each triangular face based on the expected normal vector corresponding to each triangular face so that the actual normal vector of each optimized triangular face is aligned with the expected normal vector, so that the rounded features on the triangular mesh model are recovered as corner features.

[0007] The second aspect of this application discloses a corner feature recovery system for model meshing in 3D printing, comprising: an implicit to triangular mesh conversion module for converting an implicit representation model into a triangular mesh model, wherein the corner features of the implicit representation model are converted into rounded features; a normal vector determination module for traversing all triangular faces in the triangular mesh model to determine the expected normal vector corresponding to each triangular face based on the implicit representation model; and a feature recovery module for optimizing the position of each triangular face based on the expected normal vector corresponding to each triangular face so that the actual normal vector of each optimized triangular face is aligned with the expected normal vector, so that the rounded features on the triangular mesh model are recovered as corner features.

[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 corner feature recovery method for model meshing in 3D printing 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, which, when called and executed by a computer processor, implements the corner feature recovery method for model meshing in 3D printing 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 the corner feature recovery method for model meshing in 3D printing as described in the first aspect of this application.

[0011] In summary, the corner feature recovery method, system, computer device, computer-readable storage medium, and computer program product disclosed in this application for model meshing in 3D printing firstly do not consider the preservation of corner features when converting the implicit representation model into a triangular mesh model, thereby greatly reducing the computational and memory requirements of model conversion and ensuring good quality of the converted triangular mesh model. Then, by aligning the actual normal vectors of each triangular facet in the triangular mesh model with the expected normal vectors, the positions of all triangular facets are optimized, so that the smooth features formed in the triangular mesh model during the conversion are restored to corner features. In this way, it is possible to convert the implicit representation model into a triangular mesh model that preserves corner features, while reducing computational and memory requirements and improving the quality of the triangular mesh 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 a corner feature recovery method for model meshing in 3D printing according to one embodiment of this application.

[0014] Figure 2 shows a schematic diagram of the implicit expression model in one embodiment of this application.

[0015] Figure 3 shows a schematic diagram of the structure of the triangular mesh model converted from the implicit expression model of the embodiment shown in Figure 2 in this application.

[0016] Figure 4 shows a schematic diagram of the parameter configuration window in one embodiment of this application.

[0017] Figure 5 shows a schematic diagram of the enclosing space and the enclosing space after initial meshing in one embodiment of this application.

[0018] Figure 6 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.

[0019] Figure 7 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.

[0020] Figure 8 shows a schematic diagram of the subgrids in the embodiment shown in Figure 5, where the value range of the implicit expression includes the threshold range, after the application performs the next level of meshing.

[0021] Figure 9 shows a schematic diagram of the actual normal vector of a triangular facet in one embodiment of this application.

[0022] Figure 10 shows a schematic diagram of the optimized triangular mesh model obtained by optimizing the positions of each triangular facet in the triangular mesh model shown in Figure 3 according to this application.

[0023] Figure 11 shows a block diagram of a corner feature recovery system for model meshing in 3D printing according to one embodiment of this application.

[0024] Figure 12 shows a schematic diagram of the structure of a computer device according to one embodiment of the present application. Detailed Implementation

[0025] 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.

[0026] 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.

[0027] 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.

[0028] 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.

[0029] 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.

[0030] 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.

[0031] 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.

[0032] The triangular mesh model described in the embodiments of this application is a model formed by expressing, constructing, or splicing triangular facet units as basic units.

[0033] In view of the technical problem described in the background art of how to convert implicit models into triangular mesh models that preserve corner features while reducing computation and memory usage and improving conversion quality, this application discloses a method and system for corner feature recovery in model meshing for 3D printing, a computer device, a computer-readable storage medium, and a computer program product. The corner feature recovery method first disregards the preservation of corner features when converting the implicit representation model into a triangular mesh model, thus significantly reducing the computation and memory usage of the model conversion while ensuring good quality of the converted triangular mesh model. Then, by aligning the actual normal vectors of each triangular facet in the triangular mesh model with the expected normal vectors, the positions of all triangular facets are optimized, restoring the smooth features formed in the triangular mesh model during the conversion to corner features. Thus, it achieves the conversion of implicit representation models into triangular mesh models that preserve corner features while simultaneously reducing computation and memory usage and improving the quality of the triangular mesh model.

[0034] 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.

[0035] This application provides a method for restoring corner features of a model mesh in 3D printing in some embodiments. The method can be executed by a computer device configured with a corner feature restoration system for model mesh in 3D printing. The corner feature restoration system is a software tool or software module that can process data and executes the corner feature restoration method for model mesh in 3D printing with the help of the hardware devices and / or the operating environment provided by the operating system in the computer device.

[0036] In one embodiment, the computer device may be configured as an electronic device, that is, the electronic device executes the corner feature recovery method applied to model meshing in 3D printing. 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.

[0037] In one embodiment, the computer device may be configured as a server, that is, the server executes the edge feature recovery method applied to model meshing in 3D printing. The server can be deployed on one or more physical servers depending 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.

[0038] Please refer to Figure 1, which shows a flowchart of a method for restoring corner features of a model mesh in 3D printing according to one embodiment of this application. As shown in the figure, the method for restoring corner features of a model mesh in 3D printing includes steps S110, S120, and S130. The following description uses the example of the method for restoring corner features of a model mesh in 3D printing being executed by a computer device to illustrate various embodiments.

[0039] In step S110, the computer device converts the implicit representation model into a triangular mesh model, wherein the corner features of the implicit representation model are converted into rounded features.

[0040] The implicit representation model is an implicit representation model with edge and corner features. These edge and corner features (also called angular features) refer to the sharp parts (or non-smooth or sharp parts) in the model's outline shape, such as edges, corners, and connecting edges. For example, Figure 2 shows a schematic diagram of the implicit representation model in one embodiment of this application. In Figure 2, the implicit representation model is a cube, whose edge and corner features include the cube's 12 edges and 8 corners.

[0041] To adapt to certain design requirements, manufacturing processes, or analytical needs, some embodiments require offsetting the model's contour to obtain a lightweight hollow model. To facilitate faster and more convenient offsetting, in some examples, this contour offsetting operation can be based on an implicit representation model. Therefore, in one embodiment, the corner feature recovery method further includes a step of offsetting the contour based on an initial implicit representation model to obtain the implicit representation model. That is, the implicit representation model in step S110 is obtained after offsetting the contour based on the base model (initial implicit representation model).

[0042] The initial implicit representation model can be obtained by directly implicitly modeling a 3D object, or it can be obtained by converting other formats of models formed by 3D objects. In one example, the initial implicit representation model is obtained by converting an initial triangular mesh model. In this example, the calculation speed for contour offset after converting the initial triangular mesh model to the initial implicit representation model is faster than the calculation speed for contour offset directly based on the initial triangular mesh model.

[0043] The contour offset includes inward offset to shrink the contour or outward offset to expand the contour. Taking an inward offset with a first dimension as an example, the computer device generates a first equidistant surface by offsetting inward with the first dimension based on the contour of the initial implicit representation model. This first equidistant surface serves as the inner contour of the implicit representation model, and the initial implicit representation model's contour serves as its outer contour, generating a hollow implicit representation model with a wall thickness equal to the first dimension. Taking an outward offset with a second dimension as an example, the computer device generates a second equidistant surface by offsetting outward with the second dimension based on the contour of the initial implicit representation model. This second equidistant surface serves as the outer contour of the implicit representation model, and the initial implicit representation model's contour serves as its inner contour, generating a hollow implicit representation model with a wall thickness equal to the second dimension.

[0044] In one embodiment, the implicit representation model has the corner features. After the computer converts the implicit representation model into a triangular mesh model, the parts corresponding to the corner features in the implicit representation model are converted into rounded features. In other words, the parts in the triangular mesh model corresponding to the corner features in the implicit representation model are rounded features. That is, the sharp parts in the outline shape of the model become rounded. For example, edges or connecting edges become rounded edges, and corner points become rounded corners. Please refer to Figures 2 and 3. Figure 3 shows a schematic diagram of the structure of the triangular mesh model converted from the implicit representation model of the embodiment shown in Figure 2. The 12 edges in the corner features of the implicit representation model shown in Figure 2 are converted into rounded edges as shown in Figure 3 after conversion into the triangular mesh model. The 8 corner points in the corner features of the implicit representation model shown in Figure 2 are converted into rounded corners as shown in Figure 3. Thus, the parts that should have been corner features become rounded in the triangular mesh model.

[0045] It should be noted that converting the implicit representation model into a triangular mesh model with smooth features is not only faster in computation and uses less memory, but also produces a better quality model. For example, the Marching Cubes algorithm can be used to convert the implicit representation model into a triangular mesh model with smooth features. However, for some 3D objects that require edge and corner features, if the model of the 3D object does not have edge and corner features, it will have a serious impact on the printed 3D object. For example, when the 3D object is a mold or a device that needs to cooperate with other objects, and other 3D objects with strict requirements for edge and corner features, turning the edge and corner features of the 3D object model into smooth features will make the printed 3D object unusable.

[0046] In one embodiment, to accelerate the conversion of the implicit representation model into a triangular mesh model, a computer device performs a meshing operation on the implicit representation model to generate the triangular mesh model. The meshing operation refers to the process of converting the implicit representation model into a model formed by expressing, constructing, or piecing together a cubic mesh as the basic unit.

[0047] In one embodiment, the step of the computer device performing a meshing operation on the implicit representation model to generate the triangular mesh model includes steps S1100, S1101, and S1102.

[0048] In step S1100, 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 S1100 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.

[0049] 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.

[0050] 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.

[0051] In one embodiment, step S1100 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.

[0052] The bounding box of the implicit representation model is the smallest 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.

[0053] 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.

[0054] In one embodiment, the computer device provides a parameter configuration window for the user to input the grid parameters. Referring to Figure 4, 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.

[0055] 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.

[0056] 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.

[0057] 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.

[0058] In step S1101, 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.

[0059] 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 5, 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 5 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 5 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, for ease of explanation, the method of dividing equally in different directions is used as an example of dividing into two equal parts.

[0060] 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.

[0061] 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.

[0062] 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.

[0063] 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.

[0064] 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.

[0065] 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.

[0066] 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.

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] 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.

[0072] 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 sub-mesh division method is the same as the initial meshing method shown in Figure 5. 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 6, 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 7, 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.

[0073] In one specific embodiment, please continue to refer to Figures 5 and 8. Figure 8 shows a schematic diagram of the sub-grids in the embodiment shown in Figure 5 after performing a next-level meshing on the sub-grids whose implicitly expressed value range includes the threshold range. 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 5 contain sub-grid v1, sub-grid v2, sub-grid v5, and sub-grid v6 whose implicitly expressed value range includes the threshold range, then only the sub-grids need to be meshed. Sub-grids v1, v2, v5, and v6 are subdivided into the next level, while the remaining sub-grids (i.e., sub-grids v3, v4, v7, and v8) do not need to be subdivided further. Taking the sub-grid v6 as an example, the length, width, and height directions of sub-grid v6 are traversed. For example, if the length, width, and height directions of sub-grid v6 do not reach the corresponding resolution, then the length, width, and height directions of sub-grid v6 are taken as the directions for equal division. After equal division in the three directions, the second level of sub-grid v6 is achieved, that is, sub-grid v6 is divided into 8 sub-grids in Figure 8. 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 respectively. 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 8, 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.

[0074] 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 S11010.

[0075] In step S11010, 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.

[0076] 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.

[0077] Please refer to Figure 8 and Figure 5. 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, such as 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.

[0078] 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.

[0079] 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.

[0080] 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.

[0081] It should be noted that when comparing the threshold interval with the value interval of each subgrid, the comparison can be made separately after the value interval of each subgrid has been fully calculated, or the value interval of each subgrid can be compared with the threshold interval after the value interval of each subgrid has been calculated. A similar case includes the step of performing the next level of meshing on the corresponding subgrid. When performing this step, all subgrids that meet the condition that the value interval includes the threshold interval can be performed together for the next level of meshing, or the subgrid can be performed for the condition that the value interval of each subgrid includes the threshold interval. A similar case includes step S11010.

[0082] Furthermore, according to step S1101, 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 S1101. Please refer to Figure 8. 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.

[0083] After the termination condition is met in step S1101, that is, until the divided sub-mesh meets the preset resolution, the meshing will stop and step S1102 will be executed. In step S1102, the computer device selects the sub-mesh whose implicitly expressed value range includes the threshold range from each sub-mesh that meets the preset resolution as the key mesh for numerical filling to generate the meshed model. It should be understood that in step S1102, the implicitly expressed value range of each sub-mesh that meets the preset resolution will be determined according to the embodiment provided in step S1101, so as to make a judgment to select the key mesh. 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 S1101. That is, when the sub-mesh meets the preset resolution, step S1101 will further determine the implicitly expressed value range of these sub-mesh separately for use in step S1102.

[0084] 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 S1102, 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 8. As shown in Figure 8, 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.

[0085] 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 refer to Figure 8. After inputting the coordinates of the center points of sub-mesh v11, v12, v15, v16, v21, v25, v51, v52, v61, and v66 into the implicit expression, the output values ​​of the implicit expression of the center points of each sub-mesh v11, v12, v15, v16, v21, v25, v51, v52, v61, and v66 can be obtained. These output values ​​are then filled into the corresponding locations of the center points of each sub-mesh v11, v12, v15, v16, v21, v25, v51, v52, v61, and 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.

[0086] 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.

[0087] In one embodiment, the computer device can further utilize a preset algorithm to perform triangular mesh transformation on the filled key mesh to generate a triangular mesh model. The preset algorithm can be a Marching Cubes algorithm, a dual contour algorithm, or a surface mesh 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 examples of preset algorithms described above. In this embodiment, although the portions of the triangular mesh model transformed using the preset algorithm that correspond to the corner features in the implicit representation model are converted into rounded features, the transformation speed is fast and the quality of non-corner areas is high.

[0088] In step S120, the computer device traverses all triangular faces in the triangular mesh model to determine the expected normal vector corresponding to each triangular face based on the implicit representation model. It should be noted that the computer device can determine the expected normal vector corresponding to each triangular face while traversing each triangular face in the triangular mesh model, or it can determine the expected normal vector corresponding to each triangular face separately after traversing all triangular faces in the triangular mesh model. This application does not limit the timing of determining the expected normal vector of the triangular face.

[0089] In one embodiment, during the process of traversing all the triangular faces in the triangular mesh model, the computer device can determine the coordinates of any point within a triangular face. For example, during the traversal of all the triangular faces in the triangular mesh model, the coordinates of the vertices in each triangular face can be determined to determine the coordinates of the center point, which will be described later. Specifically, the X-axis coordinate of the center point of a triangular face is one-third of the sum of the X-axis coordinates of the three vertices of the face; the Y-axis coordinate of the center point of a triangular face is one-third of the sum of the Y-axis coordinates of the three vertices of the face; and the Z-axis coordinate of the center point of a triangular face is one-third of the sum of the Z-axis coordinates of the three vertices of the face.

[0090] In one embodiment, the step of determining the expected normal vector corresponding to each triangular facet based on the implicit expression model includes determining the gradient of the implicit expression corresponding to the implicit expression model at a representative point of each triangular facet, thereby determining the expected normal vector corresponding to each triangular facet. Here, the gradient of the implicit expression at a representative point of a triangular facet is a vector. The gradient at the representative point is obtained by substituting the representative point into the gradient of the implicit expression. The gradient of the implicit expression indicates the rate of change and the direction of the fastest change of the implicit expression. The gradient of the implicit expression is a three-dimensional vector, and the three directional components of the gradient of the implicit expression are the rate of change of the implicit expression in the X-axis direction, the rate of change of the implicit expression in the Y-axis direction, and the rate of change of the implicit expression in the Z-axis direction, respectively. Taking the representative point configured as the center point of the triangular facet and the implicit expression configured as the implicit equation f as an example, the calculation of the gradient of the implicit expression at the center point of each triangular facet is explained in detail. The gradient of the implicit expression f at the center point of each triangular facet is obtained by substituting the coordinates (x, y, z) of the center point of each triangular facet into the gradient of the implicit expression. The gradients obtained can be used directly as the expected normal vectors of the center points of each triangular facet, or the gradients at the center points of each triangular facet can be normalized and then used as the expected normal vectors of the triangular facets. Although this embodiment uses the center point of the triangular facet as the representative point and the implicit expression as the implicit equation f as an example, in other embodiments, the representative point can be configured as other points within the triangular facet, and the implicit expression can be configured in other forms.

[0091] In step S130, the computer device optimizes the position of each triangular facet based on the expected normal vector corresponding to each triangular facet so that the actual normal vector of each optimized triangular facet is aligned with the expected normal vector, so that the smooth features on the triangular mesh model are restored to edge and corner features.

[0092] Before optimizing the position of each triangular facet, the corner feature recovery method further includes the step of determining the actual normal vector of each triangular facet before optimization. The actual normal vector is a vector perpendicular to the triangular facet, determined according to the counter-clockwise order of the three vertices of the triangular facet and conforming to the right-hand rule. For example, please refer to Figure 9, which shows a schematic diagram of the actual normal vector of a triangular facet in one embodiment of this application. In Figure 9, triangular facet S1 is composed of vertices A, B, and C arranged counter-clockwise. Based on the right-hand rule, the direction of the actual normal vector of triangular facet S1 is the direction indicated by the dashed arrow.

[0093] In one embodiment, the computer device uses a preset normal vector solving algorithm to determine the actual normal vectors of each triangular facet before optimization. Taking the cross product algorithm as an example, the calculation of the actual normal vectors of the triangular facet before optimization will be explained in detail. Specifically, please refer to Figure 9. In a triangular facet S1 before optimization, vertices A, B, and C are arranged counterclockwise. The coordinates of vertex A are (x1, y1, z1), the coordinates of vertex B are (x2, y2, z2), and the coordinates of vertex C are (x3, y3, z3). The vectors... sum vector The vector after cross product Alternatively, the vector obtained by normalizing the cross product can be used as the actual normal vector of the triangular facet. The computer device can then use the cross product algorithm to obtain the actual normal vectors of each triangular facet before optimization. Although the above embodiment uses the cross product algorithm as an example to illustrate the solution of the actual normal vector of a triangular facet, it is not limited to this. In other embodiments, the preset normal vector solution algorithm can also be other methods that can solve for the actual normal vectors of triangular facets, such as principal component analysis.

[0094] The alignment of the actual normal vector with the expected normal vector means that the actual normal vector and the expected normal vector are exactly the same or similar. "Exactly the same" means that the magnitude and direction of the two vectors are exactly the same. "Similar" means that the magnitude and direction are similar. In the embodiments of this application, a standard for the similarity between the actual and expected normal vectors can be preset. Alternatively, the actual normal vector at the time of the subsequent iteration calculation can be considered similar to the expected normal vector. The preset standard for the similarity between the actual and expected normal vectors can be that the magnitude difference is within a preset proportion and the directional angle is within a preset angle. For example, the preset angle is 0.1° to 5°, and the preset proportion is 0.1% to 5%. The above-mentioned preset angle and preset proportion range are merely examples and are not limited in this application. Those skilled in the art can make adaptive adjustments to the preset proportion and preset angle under the guidance of this application.

[0095] In one embodiment, the computer device optimizes the position of each triangle based on an iterative algorithm and the actual normal vectors of each triangle before optimization, so that the actual normal vectors of each triangle after optimization are aligned with the desired normal vector.

[0096] The optimization variables of the iterative algorithm include the positions of the triangular facets. The initial values ​​of the iterative algorithm include the actual normal vectors of the triangular facets before optimization and their original positions. The optimization objective is to align the actual normal vectors of the triangular facets with the expected normal vectors. Thus, the optimized positions of each triangular facet can be obtained through the preset iterative algorithm, and the optimized positions of each triangular facet satisfy the optimization objective, that is, the optimized actual normal vectors of each triangular facet are aligned with the expected normal vectors. In some embodiments, the iterative algorithm is exemplified by the Gauss-Seidel Iteration method, the global optimization method, etc., but it is not limited to these. In other embodiments, the iterative algorithm can also be other local iterative algorithms or global optimization methods that can optimize the positions of the triangular facets.

[0097] When the actual normal vectors of each triangular facet are aligned with the expected normal vectors after optimization, the smooth features on the triangular mesh model are restored to edge and corner features. That is, the regions corresponding to the smooth features on the triangular mesh model before optimization are represented as edge and corner features on the optimized triangular mesh model. For example, please refer to Figure 10 in conjunction with Figures 2 and 3. Figure 10 shows a schematic diagram of the optimized triangular mesh model obtained after optimizing the position of each triangular facet in the triangular mesh model shown in Figure 3. As shown in the figure, the implicit expression model in Figure 2 has edge and corner features (i.e., 12 edges and 8 corner points in Figure 2). After converting the implicit expression model in Figure 2 into the triangular mesh model shown in Figure 3, the edge and corner features in the implicit expression model are converted into rounded features in the triangular mesh model (i.e., 12 rounded edges and 8 rounded corners in Figure 3). By optimizing the position of each triangular facet in the triangular mesh model in Figure 3, the optimized triangular mesh model shown in Figure 10 is obtained. Thus, the rounded features in Figure 3 are represented as edge and corner features (i.e., 12 edges and 8 corner points in Figure 10) in the optimized triangular mesh model shown in Figure 10.

[0098] In some embodiments, this application also proposes a corner feature recovery system for model meshing in 3D printing, 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 operating system provided by the computer device.

[0099] Please refer to Figure 11, which shows a block diagram of a corner feature recovery system for model meshing in 3D printing according to an embodiment of this application. As shown in the figure, the corner feature recovery system 1 for model meshing in 3D printing includes an implicit to triangular mesh conversion module 10, a normal vector determination module 11, and a feature recovery module 12. The implicit to triangular mesh conversion module 10 is used to convert the implicit representation model into a triangular mesh model, wherein the corner features of the implicit representation model are converted into smooth features. The normal vector determination module 11 is used to traverse all triangular faces in the triangular mesh model to determine the expected normal vector corresponding to each triangular face based on the implicit representation model. The feature recovery module 12 is used to optimize the position of each triangular face based on the expected normal vector corresponding to each triangular face so that the actual normal vector of each optimized triangular face is aligned with the expected normal vector, so that the smooth features on the triangular mesh model are restored to corner features.

[0100] In one embodiment, the corner feature recovery system 1 for model meshing in 3D printing includes an implicit triangular mesh conversion module 10, a normal vector determination module 11, and a feature recovery module 12, which respectively coordinate and execute the corner feature recovery method for model meshing in 3D printing disclosed in any of the foregoing embodiments of this application according to the functions described above. Please refer to any embodiment with respect to Figures 1 to 10 and their related descriptions, which will not be repeated here.

[0101] The implicit triangulation module 10, normal vector determination module 11, and feature recovery module 12 can also be implemented in software running on different types of processors. For example, an executable code module 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. When these commands are logically connected, the commands include the module and implement the specified objectives of the module.

[0102] 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.

[0103] 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.

[0104] 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).

[0105] In one embodiment, the computer device is used to implement the corner feature recovery method for model meshing in 3D printing as 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.

[0106] Please refer to Figure 12, 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.

[0107] 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 corner feature recovery method for model meshing in 3D printing as 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 the memory by other components of the device, such as the CPU and peripheral interfaces.

[0108] 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.

[0109] 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.

[0110] This application also provides a computer-readable storage medium storing at least one program that, when called and executed by a computer's processor, implements the corner feature recovery method for model meshing in 3D printing as described in any of the above embodiments.

[0111] 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 corner feature recovery method for model meshing in 3D printing as described in any of the above embodiments.

[0112] 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.

[0113] 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.

[0114] In summary, the corner feature recovery method and system, computer device, computer-readable storage medium, and computer program product disclosed in this application for model meshing in 3D printing, wherein the corner feature recovery method first does not consider the preservation of corner features when converting the implicit representation model into a triangular mesh model, thereby greatly reducing the computational and memory requirements of model conversion and ensuring good quality of the converted triangular mesh model. Then, by aligning the actual normal vectors of each triangular facet in the triangular mesh model with the expected normal vectors, the position of all triangular facets is optimized, so that the smooth features formed in the triangular mesh model during the conversion are restored to corner features. In this way, it can both convert the implicit representation model into a triangular mesh model that preserves corner features and reduce computational and memory requirements, while improving the quality of the triangular mesh model.

[0115] 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 method for recovering corner features in model meshing applied in 3D printing, characterized in that, Includes the following steps: The implicit representation model is converted into a triangular mesh model, wherein the corner features of the implicit representation model are converted into rounded features; Traverse all triangular faces in the triangular mesh model to determine the expected normal vector corresponding to each triangular face based on the implicit representation model; The position of each triangular facet is optimized based on the expected normal vector corresponding to each triangular facet so that the actual normal vector of each optimized triangular facet is aligned with the expected normal vector, so that the smooth features on the triangular mesh model are restored to edge and corner features.

2. The corner feature recovery method according to claim 1, characterized in that, Also includes: The step of performing contour offset based on an initial implicit representation model to obtain the implicit representation model.

3. The corner feature recovery method according to claim 2, characterized in that, The initial implicit representation model is obtained by transforming an initial triangular mesh model.

4. The corner feature recovery method according to any one of claims 1 to 3, characterized in that, The step of converting the implicit representation model into a triangular mesh model includes: performing a meshing operation on the implicit representation model to generate the triangular mesh model.

5. The corner feature recovery method according to claim 4, characterized in that, The step of performing a meshing operation on the implicit representation model to generate the triangular mesh model 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 the triangular mesh model.

6. The corner feature recovery method according to claim 5, 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.

7. The corner feature recovery method according to claim 5, 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.

8. The corner feature recovery method according to claim 7, 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.

9. The corner feature recovery method according to claim 8, 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.

10. The corner feature recovery method according to claim 7, 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 subgrids whose value range includes a threshold range further includes: filling the corresponding subgrid with values ​​representing values ​​outside the implicit expression model when the value range is greater than the threshold range, and filling the corresponding subgrid with values ​​representing values ​​within the implicit expression model when the value range is less than the threshold range.

11. The corner feature recovery method according to claim 10, 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 corner feature recovery method according to claim 10, 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.

13. The corner feature recovery method according to claim 5, 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 corner feature recovery method according to claim 13, characterized in that, The representative point is configured as the center point of the key grid.

15. The corner feature recovery method according to claim 1, characterized in that, The steps for determining the expected normal vector corresponding to each triangular facet based on the implicit representation model include: determining the gradient of the implicit representation corresponding to the implicit representation model at the representative point of each triangular facet, so as to determine the expected normal vector corresponding to each triangular facet.

16. The corner feature recovery method according to claim 15, characterized in that, The representative point is configured as the center point of the triangular facet.

17. The corner feature recovery method according to claim 1, characterized in that, Also includes: The steps to determine the actual normal vectors of each triangular facet before optimization.

18. The corner feature recovery method according to claim 17, characterized in that, The steps for optimizing the position of each triangular facet based on the expected normal vector of each triangular facet to align the actual normal vector of each optimized triangular facet with the expected normal vector include: optimizing the position of each triangular facet based on an iterative algorithm and the actual normal vector of each triangular facet before optimization, so that the actual normal vector of each optimized triangular facet is aligned with the expected normal vector.

19. A corner feature recovery system for model meshing in 3D printing, characterized in that, include: The implicit to triangular mesh module is used to convert the implicit representation model into a triangular mesh model, wherein the corner features of the implicit representation model are converted into rounded features; The normal vector determination module is used to traverse all triangular faces in the triangular mesh model to determine the expected normal vector corresponding to each triangular face based on the implicit expression model. The feature recovery module is used to optimize the position of each triangular facet based on the expected normal vector corresponding to each triangular facet so that the actual normal vector of each optimized triangular facet is aligned with the expected normal vector, so that the smooth features on the triangular mesh model are restored to edge and corner features.

20. 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, when executing, the corner feature recovery method for model meshing in 3D printing as described in any one of claims 1 to 18.

21. A computer-readable storage medium, characterized in that, The system stores at least one program that, when called and executed by a computer's processor, implements the corner feature recovery method for model meshing in 3D printing as described in any one of claims 1 to 18.

22. A computer program product, characterized in that, When the computer program product is run on a computer, the computer performs the corner feature recovery method for model meshing in 3D printing as described in any one of claims 1 to 18.