CN116186912A - Error-bounded low-distortion unstructured T spline surface fitting method and device - Google Patents

Error-bounded low-distortion unstructured T spline surface fitting method and device Download PDF

Info

Publication number
CN116186912A
CN116186912A CN202211544173.0A CN202211544173A CN116186912A CN 116186912 A CN116186912 A CN 116186912A CN 202211544173 A CN202211544173 A CN 202211544173A CN 116186912 A CN116186912 A CN 116186912A
Authority
CN
China
Prior art keywords
distortion
fitting
fitted
low
grid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211544173.0A
Other languages
Chinese (zh)
Inventor
李特
傅孝明
关启超
刘利刚
鲍虎军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202211544173.0A priority Critical patent/CN116186912A/en
Publication of CN116186912A publication Critical patent/CN116186912A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/17Mechanical parametric or variational design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Image Generation (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method and a device for fitting error-bounded low-distortion unstructured T-spline surfaces, wherein the method comprises the following steps: acquiring a grid to be fitted and calculating a multicube parameter domain with the same topology with the grid to be fitted; constructing a first optimization problem according to the multicube parameter domain and solving the first optimization problem to obtain low-distortion parameterization from the grid to be fitted to the parameter domain to be fitted; calculating low-distortion boundary parameterization from the grid to be fitted to the parameter domain to be fitted according to the low-distortion parameterization; constructing an objective function by using minimized interpolation fitting and sheet energy as smooth function items and minimizing control points of the spline surface, thereby obtaining a fitting curved surface; if the maximum fitting error of the fitting curved surface exceeds a preset threshold value, introducing new degrees of freedom into the parameter domain and the surface by adopting self-adaptive subdivision, so that the fitting error is reduced; and simplifying the fitting curved surface on the basis that the maximum fitting error of the fitting curved surface does not exceed the preset threshold value and the low distortion is met, and obtaining the low-distortion unstructured T-spline curved surface.

Description

Error-bounded low-distortion unstructured T spline surface fitting method and device
Technical Field
The invention belongs to the technical field of surface fitting, and particularly relates to a low-distortion unstructured T spline surface fitting method and device with bounded errors.
Background
In recent years, reverse design has been widely used in the fields of product upgrading, product comparison and quality inspection, analysis of physical models, and the like. The inverse process reconstructs the model from the object, converting the model representation unsuitable for editing, manufacturing and analysis into a model representation suitable for these activities. The reverse process is generally divided into three processes, data acquisition, mesh reconstruction and CAD model reconstruction, as shown in FIG. 1, which is a flowchart for producing industrial parts in a computer-aided manufacturing process. Meanwhile, the spline surface has a parameter equation and high-order continuity, and the representation method is more compact, so that the spline surface is more beneficial to the description and analysis of a smooth shape in the modeling design. Therefore, in computer aided design and manufacturing industries and engineering calculations, it is often necessary to use spline surface fitting techniques to convert the resulting mesh model into an easily editable spline surface model.
The spline surface fitting aims at constructing a spline surface, the fitting error of the spline surface and the input discrete data is smaller than a given threshold value, and the distortion of the fitting surface is lower and the number of control points is smaller as much as possible. First, if the fitting error between the spline surface and the input model is smaller, the more the original model details remain. Secondly, the lower the distortion of the fitting result is, the easier the secondary design is performed on the fitting curved surface, the simpler the operation is, and the higher the numerical simulation precision is. Finally, because more control vertices not only occupy more memory space, but also may increase the difficulty of the designer in performing secondary design on the fitted surface, we want to use fewer control vertices to represent the fitted surface.
For this case, solving spline surfaces that meet three objectives is very challenging for the following reasons: first, given a model of an arbitrary complex topology, it is not trivial to generate a suitable spline parameter domain that meets the above requirements. Second, the correspondence between the parametric domain and the input model is a nonlinear relationship between the approximation error and the distortion, and it is difficult to solve for a correspondence suitable for obtaining a low approximation error, low distortion. Third, the number of control vertices is contradictory to low fitting errors and low warping, which require more control vertices.
At present, no related software or related solution method can obtain a spline surface design method meeting the requirements.
Disclosure of Invention
Aiming at the defects of the prior art, the embodiment of the application aims to provide a low-distortion non-structural T spline surface fitting method and device with bounded errors, which can obtain a low-distortion spline surface meeting a fitting error threshold value for an input model with any deficiency and obviously reduce the number of parameter domain control points.
According to a first aspect of embodiments of the present application, there is provided an error-bounded, low-distortion, unstructured T-spline surface fitting method, including:
acquiring a grid to be fitted and calculating a multicube parameter domain which has the same topology with the grid to be fitted;
constructing a first optimization problem according to the multicube parameter domain and solving the first optimization problem to obtain low-distortion parameterization from the grid to be fitted to the parameter domain to be fitted;
calculating low-distortion boundary parameterization from the grid to be fitted to a parameter domain to be fitted according to the low-distortion parameterization;
constructing an objective function by using minimized interpolation fitting and sheet energy as smooth function items, and obtaining control points of a spline surface by minimizing the objective function so as to obtain a fitting surface;
if the maximum fitting error of the fitting curved surface exceeds a preset threshold value, introducing new degrees of freedom into the parameter domain and the surface by adopting self-adaptive subdivision, so that the fitting error is reduced;
and simplifying the fitting curved surface on the basis that the maximum fitting error of the fitting curved surface does not exceed the preset threshold value and the low distortion is met, and obtaining the low-distortion unstructured T-spline curved surface.
Further, constructing a first optimization problem according to the multicube parameter domain and solving to obtain a low-distortion parameterization from the grid to be fitted to the parameter domain to be fitted, including:
constructing the first optimization problem:
Figure SMS_1
s.t.
Figure SMS_2
is double-shot
Figure SMS_3
Wherein E is disV The energy of the three-dimensional distortion is represented,
Figure SMS_4
C-M is low-distortion mapping, C is a three-dimensional grid obtained by tetrahedrng a grid to be fitted, S is the surface of C, P is a multicube parameter domain, and M is an entity of P;
mapping is performed
Figure SMS_5
The boundary result of (2) is limited on the boundary of the multi-cube parameter domain, and the hard constraint condition is converted into the soft constraint condition, so that a second optimization problem is obtained:
Figure SMS_6
s.t.h is bijective
Figure SMS_7
Wherein beta is a non-negative weight, tangential motion constrained energy formula
Figure SMS_8
Solving the second optimization problem to obtain a low-distortion mapping
Figure SMS_9
C-M is the low distortion parameterization.
Further, calculating a low-distortion boundary parameterization of the grid to be fitted to a parameter domain to be fitted according to the low-distortion parameterization, including:
for a sampling point u on a multi-cube parameter domain P, projecting the sampling point u onto an image h (S) of a mapping h by using a nearest point projection method, and obtaining a specific point g (u) on the surface S of the three-dimensional grid through barycentric interpolation coordinates;
if the resulting map is bijective, then using the result as a low warp boundary parameterization;
if the result is not bijective, using the processing method of boundary alignment to align, extracting low distortion mapping
Figure SMS_10
To calculate the inverse mapping g of h, thereby yielding a low distortion boundary parameterization of the grid to be fitted to the parameter domain to be fitted.
Further, the boundary alignment processing method comprises the following steps:
and reconstructing boundary correspondence by using closest point projection, solving a second optimization problem, wherein h (S) is fixed in the optimization process, and the projected vertexes on the sides of the multi-cubes only allow movement along the sides of the multi-cubes and the mapped vertexes on the sides of the multi-cubes only allow movement in the sides.
Further, the objective function is
E=E dist +σE fair
Wherein E is dist To fit error terms E fair For smooth energy terms, σ is a trade-off constant;
Figure SMS_11
wherein the first term is the interpolation error, h (v i ) For sampling points v in the grid to be fitted i A mapped image; the second term is the sample fitting error, u i Is in the parameter domainSampling points, f () and g () represent mapping h and mapping g, respectively;
Figure SMS_12
wherein f ss Representing the second derivative in the s-direction in the local parameter coordinate system.
Further, if the maximum fitting error of the fitted surface exceeds a predetermined threshold, introducing a new degree of freedom into the surface of the parameter domain using adaptive subdivision, including:
calculating the maximum fitting error L of the fitting curved surface
Figure SMS_13
Wherein m is the number of grid sampling points to be fitted, and n is the number of parameter domain sampling points;
if the maximum fitting error exceeds a predetermined threshold, consider a rectangular domain R containing sampling points exceeding the threshold, if there is an original grid point v mapped in R j Violating constraint or having sampling point u in R j And if the constraint is violated, subdividing R.
Further, simplifying the fitted surface to obtain a low-distortion non-structural T-spline surface on the basis that the maximum fitting error of the fitted surface does not exceed the predetermined threshold and the low distortion is satisfied, including:
step (6.1): each node on the T grid obtained by adaptive subdivision is taken as a sampling point u i Calculate the fitting error f (u) i )-g(u i )|| 2 Sequencing to obtain a priority queue Q from small to large;
step (6.2): sequentially judging whether the node corresponding to the element Q (i) in the priority queue can be deleted, if so, deleting the node, recalculating a fitting equation and updating control points, and returning to the step (6.1) until all the elements in the priority queue are traversed;
the criterion for judging whether the node can be deleted is as follows:
if the node is a singular point, not deleting the node;
if the T grid obtained after deleting the node violates the rule of the T grid, the node is not deleted;
calculating new basis functions of the T grid obtained after deleting the node, recalculating a fitting equation and updating control vertexes, and recalculating the maximum values L of interpolation errors and sampling fitting errors And the average warp ave_new of the spline surface is used for judging whether the error constraint and the low warp constraint are violated after deleting the node, and if yes, the node is not deleted.
According to a second aspect of embodiments of the present application, there is provided an error-bounded, low-distortion, unstructured T-spline surface fitting apparatus, comprising:
the acquisition module is used for acquiring a grid to be fitted and calculating a multicube parameter domain which is topological with the grid to be fitted;
the solving module is used for constructing a first optimization problem according to the multi-cube parameter domain and solving the first optimization problem to obtain low-distortion parameterization from the grid to be fitted to the parameter domain to be fitted;
the calculation module is used for calculating low-distortion boundary parameterization from the grid to be fitted to the parameter domain to be fitted according to the low-distortion parameterization;
the minimization module is used for constructing an objective function by using the minimized interpolation fitting and the sheet energy as smooth function items, and obtaining control points of the spline surface by minimizing the objective function so as to obtain a fitting surface;
the adaptive subdivision module is used for introducing new degrees of freedom into the parameter domain and the surface by adopting adaptive subdivision if the maximum fitting error of the fitting curved surface exceeds a preset threshold value, so that the fitting error is reduced;
and the simplifying module is used for simplifying the fitting curved surface on the basis that the maximum fitting error of the fitting curved surface does not exceed the preset threshold value and the low distortion is met, and obtaining the low-distortion non-structural T spline curved surface.
According to a third aspect of embodiments of the present application, there is provided an electronic device, including:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of the first aspect.
According to a fourth aspect of embodiments of the present application, there is provided a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method according to the first aspect.
The technical scheme provided by the embodiment of the application can comprise the following beneficial effects:
according to the embodiment, the low-distortion non-structural T spline surface fitting design method which is designed by using a step-by-step solving strategy and meets the fitting error threshold can obtain the low-distortion fitting surface for the input model of any complex topology. The invention can realize lower parameterized distortion by using fewer control vertexes without considering the complexity of an input model, thereby improving the description precision and reducing the difficulty of secondary design while obtaining the description of a smooth shape in the computer aided design, manufacturing industry and engineering calculation.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow chart of a reverse process for reconstructing a CAD model in the background.
FIG. 2 is a flowchart illustrating a method of error-bounded, low-distortion unstructured T-spline surface fitting, according to an exemplary embodiment.
FIG. 3 is a schematic diagram of a process for producing a complete fitting surface by the present error bounded low-distortion non-structural T-spline surface fitting method according to an exemplary embodiment, wherein (a) is an input mesh to be fitted, (b) is a schematic diagram of a multi-cube parameter domain, (c) is a result of parameterizing the input mesh to be fitted into the multi-cube parameter domain, (d) is a schematic diagram of the fitting surface obtained in step (4), (e) is a schematic diagram of a low-distortion spline surface satisfying a fitting error threshold value, and (f) is a schematic diagram of the low-distortion non-structural T-spline surface obtained in step (6);
fig. 4 is a schematic diagram of a T-grid shown in accordance with an exemplary embodiment.
FIG. 5 is a block diagram illustrating an error-bounded, low-distortion, unstructured T-spline surface fitting apparatus according to an exemplary embodiment.
Fig. 6 is a schematic diagram of an electronic device, according to an example embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
FIG. 2 is a flowchart illustrating an error-bounded, low-distortion unstructured T-spline surface fitting method, as shown in FIG. 2, which may include the steps of:
step (1): acquiring a grid to be fitted and calculating a multicube parameter domain which has the same topology with the grid to be fitted;
step (2): constructing a first optimization problem according to the multicube parameter domain and solving the first optimization problem to obtain low-distortion parameterization from the grid to be fitted to the parameter domain to be fitted;
step (3): calculating low-distortion boundary parameterization from the grid to be fitted to a parameter domain to be fitted according to the low-distortion parameterization;
step (4): constructing an objective function by using minimized interpolation fitting and sheet energy as smooth function items, and obtaining control points of a spline surface by minimizing the objective function so as to obtain a fitting surface;
step (5): if the maximum fitting error of the fitting curved surface exceeds a preset threshold value, introducing new degrees of freedom into the surface of the parameter domain by adopting self-adaptive subdivision, so that the fitting error is reduced;
step (6): and simplifying the fitting curved surface on the basis that the maximum fitting error of the fitting curved surface does not exceed the preset threshold value and the low distortion is met, and obtaining the low-distortion unstructured T-spline curved surface.
According to the embodiment, the low-distortion non-structural T spline surface fitting design method which is designed by using a step-by-step solving strategy and meets the fitting error threshold can obtain the low-distortion fitting surface for the input model of any complex topology. Without considering the complexity of the input model, lower parameterized distortion can be achieved with the present invention using fewer control vertices.
In the application, in order to avoid the increase of the number of control points caused by the segmentation and the splicing of complex topological shapes and obtain global unified spline expression, a multicube is used as a parameter domain for realizing spline fitting curved surfaces. The multicubes provide a rectangular structure which can correctly represent the topology of any geometric shape, and the singular points only appear at the corner points, which is very beneficial for subsequent calculation and analysis. The present method is explained below with reference to examples.
In the specific implementation of the step (1), a grid to be fitted is obtained, and a multicube parameter domain which is topological with the grid to be fitted is calculated;
specifically, a grid to be fitted comprising 18925 vertices as shown in fig. 3 (a) is obtained, which is a grid model of the industrial part in one embodiment. For a given grid to be fitted, an approximate axis alignment shape is obtained through a deformation method based on rotation driving, and then an approximate error between the approximate axis alignment shape and a multi-cube structure is utilized to calculate a multi-cube parameter domain which has the same topology as the grid to be fitted, as shown in (b) of fig. 3, wherein the number of top points of the multi-cube parameter domain is 1580.
In the implementation of the step (2), constructing a first optimization problem according to the multicube parameter domain and solving the first optimization problem to obtain a low-distortion parameterization from the grid to be fitted to the parameter domain to be fitted;
in particular, this step may comprise the sub-steps of:
constructing the first optimization problem:
Figure SMS_14
s.t.
Figure SMS_15
is double-shot
Figure SMS_16
Wherein E is disV Representing a three-dimensional distortion energy, the energy constraint being the boundary distortion energy at the boundary,
Figure SMS_17
C-M is low-distortion mapping, C is a three-bit grid obtained by tetrahedrng a grid to be fitted, S is the surface of C, P is a multicube parameter domain, and M is an entity of P;
mapping is performed
Figure SMS_18
The boundary result of (2) is limited on the boundary of the multi-cube parameter domain, and the hard constraint condition is converted into the soft constraint condition, so that a second optimization problem is obtained:
Figure SMS_19
s.t.h is bijective
Figure SMS_20
Wherein beta is a non-negative weight, tangential motion constrained energy formula
Figure SMS_21
Solving the second optimization problem to obtain a low-distortion mapping
Figure SMS_22
C-M is the low distortion parameterization.
In the implementation of the step (3), calculating a low-distortion boundary parameterization from the grid to be fitted to a parameter domain to be fitted according to the low-distortion parameterization;
specifically, extract
Figure SMS_23
Boundary map h of (c): S→P, where h is the bijection between one discrete grid. After solving, h (S) and P are not exactly the same. In order to make them identical, the boundary correspondence needs to be reprocessed and the energy re-optimized. Since h (S) and P are very close, boundary correspondence can be reconstructed using closest point projections. And then another oneSub-optimizing the same distortion energy as before, where h (S) is fixed during the optimization, the vertices on the sides of the multicube after mapping are allowed to move only along the sides of the multicube, and the vertices on the faces of the multicube after mapping are allowed to move only in the faces, but this approach may result in greater distortion near the flare.
Considering the characteristics of unstructured T-splines, edges on multicube features are not substantially different from edges at other locations. We can directly extract the surface map h, instead of computing the concrete expression of the inverse map g of the map h, we compute the sampled expression of g: for a sampling point u on a multi-cube parameter domain P, projecting the sampling point u onto an image h (S) of a mapping h by using a nearest point projection method, and obtaining a specific point g (u) on a surface S of a grid tetrahedron to be fitted through barycentric interpolation coordinates;
specifically, for the case where each sampling point g (u) is bijective, this map g is bijective.
If the resulting map is bijective, then using the result as a low warp boundary parameterization;
if the result is not bijective, aligning by using a boundary alignment processing method, extracting a surface mapping h of the low-distortion mapping h to calculate an inverse mapping g of h, and obtaining the low-distortion boundary parameterization from the grid to be fitted to the parameter domain to be fitted. The result of the calculation is shown in fig. 3 (c), in which the black spots represent areas that do not satisfy the fitting error threshold.
The boundary alignment processing method comprises the following steps:
and reconstructing boundary correspondence by using closest point projection, solving a second optimization problem, wherein h (S) is fixed in the optimization process, and the projected vertexes on the sides of the multi-cubes only allow movement along the sides of the multi-cubes and the mapped vertexes on the sides of the multi-cubes only allow movement in the sides.
The average distortion of the initialized volume parameterization is 3.39, and through the optimization step, a parameterized model with the average distortion of 1.28 is obtained, and the parameterized result with low distortion is beneficial to solving a fitting curved surface model with low distortion. Meanwhile, the easier the fitting curved surface model is designed secondarily, the simpler the operation is, and the higher the numerical simulation precision is.
In the implementation of the step (4), an objective function is constructed by using minimized interpolation fitting and sheet energy as smooth function items, and control points of a spline surface are obtained by minimizing the objective function, so that a fitting surface is obtained;
specifically, a minimized interpolation fitting and sheet energy are used as smooth function items, an optimization problem is constructed, and control points of spline surfaces are obtained through solving, so that a fitting curved surface is obtained. At this time, the optimization problem becomes to minimize the following objective function:
E=E dist +σE fair
wherein E is dist To fit error terms E fair For smooth energy terms, σ is a trade-off constant that balances the accuracy and smoothness of the approximation. The larger the σ, the smoother the surface;
the invention obtains the bi-directional mapping h and g between S and P, so that the fitting is performed by using a bi-directional energy, i.e. the sampling errors on two curved surfaces are considered simultaneously:
Figure SMS_24
wherein the first term is the interpolation error, h (v i ) For sampling points v in the grid to be fitted i A mapped image; the second term is the sample fitting error, u i Is a sampling point in the parameter domain, f () and g () represent the mapping h and g, respectively, in the present invention, the sampling point is a gaussian node in each parameter domain plane;
the second smoothing energy term is specifically expressed as:
Figure SMS_25
the parameter coordinate system has two directions s and t, where f ss Representing the second derivative in s-direction, f, in a local parameter coordinate system st And f tt And the same is true.
The derivative of the T grid spline is a linear combination of node function derivatives, and because the basis function is fixed in the fitting process, both energies can be expressed as a quadratic function of unknown control points, and a solution can be obtained by solving a linear equation set.
The resulting low-distortion unstructured T-spline fit, i.e., the fitted surface, is shown in fig. 3 (d). At this point we have obtained a fitted surface model with an average distortion of 1.31.
In the implementation of the step (5), if the maximum fitting error of the fitted curved surface exceeds a preset threshold value, introducing a new degree of freedom into the parameter domain and the surface by adopting adaptive subdivision, so as to reduce the fitting error;
specifically, since the T-spline has the self-adaptive local subdivision capability, fine fitting can be performed in a region with unsatisfactory fitting results, so that the calculated amount can be remarkably reduced, and the calculation cost can be reduced. In the present invention, we control the accuracy of the fit by the maximum fit error, so this step may include the sub-steps of:
calculating the maximum fitting error L of the fitting curved surface
Figure SMS_26
Wherein m is the number of grid sampling points to be fitted, and n is the number of parameter domain sampling points;
if the maximum fitting error exceeds a predetermined threshold, consider a rectangular domain R containing sampling points exceeding the threshold, if there is an original grid point v mapped in R j Violating constraint or having sampling point u in R j And if the constraint is violated, subdividing R. In particular, if the maximum fitting error satisfies
Figure SMS_27
One rectangle is split into four, called 1-4 subdivisions, otherwise the matrix is split into two rectangles along the longest side.
After the adaptive refinement, the fit equation needs to be recalculated and the control points updated. The present invention repeatedly performs the adaptive refinement process until the fitting error is satisfied. The resulting low-distortion spline surface that meets the fitting error threshold is shown in fig. 3 (e).
We default the fit error threshold to be 0.0025 of the AABB bounding box diagonal length. The maximum fitting error of the fitted surface model obtained in the step (4) is 0.00519, the average fitting error is 0.000411, the maximum fitting error of the fitted surface model obtained after the self-adaptive refinement step is 0.00226, and the average fitting error is 0.000168. Under the condition of small fitting error, the detail characteristics of the original model can be well reserved. The number of vertices of the multicube parameter domain at this point is 4201.
In the implementation of the step (6), on the basis that the maximum fitting error of the fitted curved surface does not exceed the preset threshold value and the low distortion is met, the fitted curved surface is simplified, and the low-distortion unstructured T-spline curved surface is obtained.
In particular, this step may comprise the sub-steps of:
step (6.1): each node on the T grid obtained by adaptive subdivision is taken as a sampling point u i Calculate the fitting error f (u) i )-g(u i )|| 2 Sequencing to obtain a priority queue Q from small to large;
specifically, the number of nodes in the multicube parameter domain (i.e., the number of nodes in the T-grid) is recorded as N, and i=0 is taken. Each node on the T grid is used as a sampling point, and fitting error f (u) is calculated i )-g(u i )|| 2 And ordered as a priority queue Q such that Q (0) is at a minimum.
Step (6.2): sequentially judging whether the node corresponding to the element Q (i) in the priority queue can be deleted, if so, deleting the node, recalculating a fitting equation and updating control points, and returning to the step (6.1) until all the elements in the priority queue are traversed;
the criterion for judging whether the node can be deleted is as follows:
if the node is a singular point, not deleting the node;
if the T grid obtained after deleting the node violates the rule of the T grid, the node is not deleted;
calculating new basis functions of the T grid obtained after deleting the node, recalculating a fitting equation and updating control vertexes, and recalculating the maximum values L of interpolation errors and sampling fitting errors And the average warp ave_new of the spline surface is used for judging whether the error constraint and the low warp constraint are violated after deleting the node, and if yes, the node is not deleted.
Specifically, the average distortion of the spline surface is ave_old, the upper bound ave=1.1×ave_old of the average distortion is taken to be i=0, and whether the node corresponding to Q (i) can be deleted is judged. In the first case, if the node is a singular point, the node is not deleted, i++1, judging whether i=n, if equal, stopping simplification; in the second case, if the T grid obtained after deleting the node violates the rule of the T grid, the node is not deleted, i is equal to i+1, whether i=n is judged, and if the i=n is equal to i=n, simplification is stopped; third, calculating new basis functions of the T grid obtained after deleting the node, recalculating a fitting equation and updating control vertexes, and then recalculating the maximum values L of interpolation errors and sampling fitting errors And the average warp ave_new of the spline surface, judging whether the error constraint and the low warp constraint are violated after deleting the node: if ave_new is less than or equal to ave and L Less than or equal to xi, deleting the node, recalculating a fitting equation and updating a control point; otherwise, the node is not deleted, i is equal to i+1, whether i=N is judged, and if the i=N is equal to the i=N, simplification is stopped;
wherein, while deleting a node, we need to delete part of the edges connected to it at the same time, the obtained unstructured T-grid does not necessarily meet the rule of the unstructured T-grid (i.e. the second case described above). At this time, it is required to determine which edges can be deleted, and the edges are classified according to the degree of deleting nodes:
first, for a node with a degree of 4, four edges cannot be directly deleted when deleting the node, and the rule of the unstructured T-grid is violated. Only the opposite sides can be deleted at this time.
Second, for a T node, if three edges are deleted simultaneously, the rules of the unstructured T-grid would be violated. Rules are violated if two opposite edges are deleted. If an edge containing opposite edges is deleted, the T node becomes an L-shaped inflection point, as in the AD edge of the node D in FIG. 4, the edge cannot be deleted; AT this time, there is only one rule that does not violate the unstructured T-grid after deletion, i.e., delete an edge without opposite edges, such as the AT edge for node T in fig. 4.
The simplified spline surface obtained by this embodiment is shown in fig. 3 (f).
At this time, the average distortion of the fitted surface model obtained by the method is 1.38, the maximum fitting error is 0.00249, and the number of top points of the multicube parameter domain is 2867. Based on low fitting error and low distortion, the redundant control vertexes of the multi-cube parameter domain are deleted, and the simplification rate is 31.75%. The occupation of the memory of the computer is reduced, and the difficulty of the designer in carrying out secondary design on the fitting curved surface model is reduced.
Corresponding to the embodiments of the error-bounded low-distortion non-structural T-spline surface fitting method described above, embodiments of the error-bounded low-distortion non-structural T-spline surface fitting apparatus are also provided.
FIG. 5 is a block diagram illustrating an error-bounded, low-distortion unstructured T-spline surface fitting apparatus according to an exemplary embodiment. Referring to fig. 5, the apparatus may include:
an obtaining module 21, configured to obtain a grid to be fitted and calculate a multicube parameter domain that is topological to the grid to be fitted;
a solving module 22, configured to construct a first optimization problem according to the multicube parameter domain and solve the first optimization problem, so as to obtain a low-distortion parameterization from the grid to be fitted to the parameter domain to be fitted;
a calculating module 23, configured to calculate a low-distortion boundary parameterization from the grid to be fitted to a parameter domain to be fitted according to the low-distortion parameterization;
a minimizing module 24, configured to construct an objective function by using the minimized interpolation fit and the sheet energy as smooth function terms, and obtain a control point of the spline surface by minimizing the objective function, thereby obtaining a fitted surface;
an adaptive subdivision module 25, configured to introduce a new degree of freedom into the parameter domain and the surface by adopting adaptive subdivision if the maximum fitting error of the fitted curved surface exceeds a predetermined threshold, thereby reducing the fitting error;
and a simplifying module 26, configured to simplify the fitted surface to obtain a low-distortion unstructured T-spline surface on the basis that the maximum fitting error of the fitted surface does not exceed the predetermined threshold and the low distortion is satisfied.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the present application. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Correspondingly, the application also provides electronic equipment, which comprises: one or more processors; a memory for storing one or more programs; the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the error-bounded, low-distortion unstructured T-spline surface fitting method as described above. As shown in fig. 6, a hardware structure diagram of an apparatus with any data processing capability, where the error-bounded low-distortion non-structural T-spline surface fitting method is located, is provided in the embodiment of the present invention, and besides the processor, the memory and the network interface shown in fig. 6, any apparatus with any data processing capability in the embodiment is generally according to the actual function of the apparatus with any data processing capability, and may further include other hardware, which is not described herein.
Accordingly, the present application also provides a computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the error-bounded, low-distortion unstructured T-spline surface fitting method described above. The computer readable storage medium may be an internal storage unit, such as a hard disk or a memory, of any of the data processing enabled devices described in any of the previous embodiments. The computer readable storage medium may also be an external storage device, such as a plug-in hard disk, a Smart Media Card (SMC), an SD Card, a Flash memory Card (Flash Card), or the like, provided on the device. Further, the computer readable storage medium may include both internal storage units and external storage devices of any device having data processing capabilities. The computer readable storage medium is used for storing the computer program and other programs and data required by the arbitrary data processing apparatus, and may also be used for temporarily storing data that has been output or is to be output.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof.

Claims (10)

1. An error-bounded, low-distortion, unstructured T-spline surface fitting method, comprising:
acquiring a grid to be fitted and calculating a multicube parameter domain which has the same topology with the grid to be fitted;
constructing a first optimization problem according to the multicube parameter domain and solving the first optimization problem to obtain low-distortion parameterization from the grid to be fitted to the parameter domain to be fitted;
calculating low-distortion boundary parameterization from the grid to be fitted to a parameter domain to be fitted according to the low-distortion parameterization;
constructing an objective function by using minimized interpolation fitting and sheet energy as smooth function items, and obtaining control points of a spline surface by minimizing the objective function so as to obtain a fitting surface;
if the maximum fitting error of the fitting curved surface exceeds a preset threshold value, introducing new degrees of freedom into the parameter domain and the surface by adopting self-adaptive subdivision, so that the fitting error is reduced;
and simplifying the fitting curved surface on the basis that the maximum fitting error of the fitting curved surface does not exceed the preset threshold value and the low distortion is met, and obtaining the low-distortion unstructured T-spline curved surface.
2. The method of claim l, wherein constructing a first optimization problem from the multi-cube parameter domain and solving for a low-distortion parameterization of the grid to be fitted to the parameter domain to be fitted comprises:
constructing the first optimization problem:
Figure QLYQS_1
s.t.
Figure QLYQS_2
is double-shot
Figure QLYQS_3
Wherein E is disV The energy of the three-dimensional distortion is represented,
Figure QLYQS_4
C-M is low-distortion mapping, C is grid tetrahedron to be fittedThe three-dimensional grid is obtained by chemical conversion, S is the surface of C, P is a multicube parameter domain, and M is the entity of P;
mapping is performed
Figure QLYQS_5
The boundary result of (2) is limited on the boundary of the multi-cube parameter domain, and the hard constraint condition is converted into the soft constraint condition, so that a second optimization problem is obtained:
Figure QLYQS_6
s.t.h is bijective
Figure QLYQS_7
Wherein beta is a non-negative weight, tangential motion constrained energy formula
Figure QLYQS_8
Solving the second optimization problem to obtain a low-distortion mapping
Figure QLYQS_9
C-M is the low distortion parameterization.
3. The method of claim 2, wherein calculating a low-distortion boundary parameterization of the grid to be fitted to a parameter domain to be fitted from the low-distortion body parameterization comprises:
for a sampling point u on a multi-cube parameter domain P, projecting the sampling point u onto an image h (S) of a mapping h by using a nearest point projection method, and obtaining a specific point g (u) on the surface S of the three-dimensional grid through barycentric interpolation coordinates;
if the resulting map is bijective, then using the result as a low warp boundary parameterization;
if the result is not bijective, using the processing method of boundary alignment to perform alignment, extracting lowWarp mapping
Figure QLYQS_10
To calculate the inverse mapping g of h, thereby yielding a low distortion boundary parameterization of the grid to be fitted to the parameter domain to be fitted.
4. A method according to claim 3, wherein the boundary alignment is performed by:
and reconstructing boundary correspondence by using closest point projection, solving a second optimization problem, wherein h (S) is fixed in the optimization process, and the projected vertexes on the sides of the multi-cubes only allow movement along the sides of the multi-cubes and the mapped vertexes on the sides of the multi-cubes only allow movement in the sides.
5. The method of claim 1, wherein the objective function is
E=E dist +σE fair
Wherein E is dist To fit error terms E fair For smooth energy terms, σ is a trade-off constant;
Figure QLYQS_11
wherein the first term is the interpolation error, h (v i ) For sampling points v in the grid to be fitted i A mapped image; the second term is the sample fitting error, u i Is a sampling point in the parameter domain, f () and g () represent map h and map g, respectively;
Figure QLYQS_12
wherein f ss Representing the second derivative in the s-direction in the local parameter coordinate system.
6. The method of claim 1, wherein introducing new degrees of freedom in the surface of the parameter domain using adaptive subdivision if the maximum fitting error of the fitted surface exceeds a predetermined threshold, comprises:
calculating the maximum fitting error L of the fitting curved surface
Figure QLYQS_13
Wherein m is the number of grid sampling points to be fitted, and n is the number of parameter domain sampling points;
if the maximum fitting error exceeds a predetermined threshold, consider a rectangular domain R containing sampling points exceeding the threshold, if there is an original grid point v mapped in R j Violating constraint or having sampling point u in R j And if the constraint is violated, subdividing R.
7. The method of claim 1, wherein simplifying the fitted surface to obtain a low-distortion non-structural T-spline surface based on satisfying the maximum fitting error of the fitted surface not exceeding the predetermined threshold and low distortion, comprises:
step (6.1): each node on the T grid obtained by adaptive subdivision is taken as a sampling point u i Calculate the fitting error f (u) i )-g(u i )|| 2 Sequencing to obtain a priority queue Q from small to large;
step (6.2): sequentially judging whether the node corresponding to the element Q (i) in the priority queue can be deleted, if so, deleting the node, recalculating a fitting equation and updating control points, and returning to the step (6.1) until all the elements in the priority queue are traversed;
the criterion for judging whether the node can be deleted is as follows:
if the node is a singular point, not deleting the node;
if the T grid obtained after deleting the node violates the rule of the T grid, the node is not deleted;
new T grid obtained after deleting the nodeIs used to recalculate the fitting equation and update the control vertices, and then recalculate the interpolation error and the maximum value of the sampled fitting error, L And the average warp ave_new of the spline surface is used for judging whether the error constraint and the low warp constraint are violated after deleting the node, and if yes, the node is not deleted.
8. An error-bounded, low-distortion, unstructured T-spline surface fitting apparatus, comprising:
the acquisition module is used for acquiring a grid to be fitted and calculating a multicube parameter domain which is topological with the grid to be fitted;
the solving module is used for constructing a first optimization problem according to the multi-cube parameter domain and solving the first optimization problem to obtain low-distortion parameterization from the grid to be fitted to the parameter domain to be fitted;
the calculation module is used for calculating low-distortion boundary parameterization from the grid to be fitted to the parameter domain to be fitted according to the low-distortion parameterization;
the minimization module is used for constructing an objective function by using the minimized interpolation fitting and the sheet energy as smooth function items, and obtaining control points of the spline surface by minimizing the objective function so as to obtain a fitting surface;
the adaptive subdivision module is used for introducing new degrees of freedom into the parameter domain and the surface by adopting adaptive subdivision if the maximum fitting error of the fitting curved surface exceeds a preset threshold value, so that the fitting error is reduced;
and the simplifying module is used for simplifying the fitting curved surface on the basis that the maximum fitting error of the fitting curved surface does not exceed the preset threshold value and the low distortion is met, and obtaining the low-distortion non-structural T spline curved surface.
9. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method of any of claims 1-7.
CN202211544173.0A 2022-11-28 2022-11-28 Error-bounded low-distortion unstructured T spline surface fitting method and device Pending CN116186912A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211544173.0A CN116186912A (en) 2022-11-28 2022-11-28 Error-bounded low-distortion unstructured T spline surface fitting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211544173.0A CN116186912A (en) 2022-11-28 2022-11-28 Error-bounded low-distortion unstructured T spline surface fitting method and device

Publications (1)

Publication Number Publication Date
CN116186912A true CN116186912A (en) 2023-05-30

Family

ID=86431547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211544173.0A Pending CN116186912A (en) 2022-11-28 2022-11-28 Error-bounded low-distortion unstructured T spline surface fitting method and device

Country Status (1)

Country Link
CN (1) CN116186912A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117197397A (en) * 2023-11-06 2023-12-08 广州中望龙腾软件股份有限公司 Curved surface self-adaptive sampling method and device, storage medium and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117197397A (en) * 2023-11-06 2023-12-08 广州中望龙腾软件股份有限公司 Curved surface self-adaptive sampling method and device, storage medium and computer equipment
CN117197397B (en) * 2023-11-06 2024-03-01 广州中望龙腾软件股份有限公司 Curved surface self-adaptive sampling method and device, storage medium and computer equipment

Similar Documents

Publication Publication Date Title
RU2519331C2 (en) Method of calculating physical value, numerical analysis method, programme for calculating physical value, numerical analysis programme, device for calculating physical value and numerical analysis device
CN111310278B (en) Ship automatic modeling method based on simulation
CN113297650B (en) BIM technology-based unit type glass curtain wall construction method and system
RU2294560C2 (en) Automated design system and automated design program
WO2000002165A1 (en) Method for generating polygon data and image display using the same
CN113724401B (en) Three-dimensional model cutting method and device, computer equipment and storage medium
CN112734887B (en) Face mixing-deformation generation method and device based on deep learning
US7348976B2 (en) Three-dimensional shape display program, three-dimensional shape display method, and three-dimensional shape display apparatus
Yu et al. HexGen and Hex2Spline: polycube-based hexahedral mesh generation and spline modeling for isogeometric analysis applications in LS-DYNA
CN116186912A (en) Error-bounded low-distortion unstructured T spline surface fitting method and device
Wang et al. Distortion-free intelligent sampling of sparse surfaces via locally refined T-spline metamodelling
CN117709210B (en) Constraint inference model training, constraint inference method, constraint inference component, constraint inference terminal and constraint inference medium
CN115222879A (en) Model surface reduction processing method and device, electronic equipment and storage medium
CN116227209A (en) Multi-dimensional linear difference method for point cloud data, terminal equipment and storage medium
JP2002279005A (en) Method, device and program for generating three- dimensional analytic model and its recording medium
US8786599B2 (en) Segmentation of free-form shapes into chains of circular elements in computer graphics applications
Schroeder et al. Methods and framework for visualizing higher-order finite elements
Shang et al. Effective re-parameterization and GA based knot structure optimization for high quality T-spline surface fitting
Yu et al. HexGen and Hex2Spline: polycube-based hexahedral mesh generation and unstructured spline construction for isogeometric analysis framework in LS-DYNA
JP6087242B2 (en) Model conversion method and model conversion apparatus
CN110837707B (en) Finite element analysis system, method, computer equipment and storage medium
US8031957B1 (en) Rewritable lossy compression of graphical data
Vetsch et al. Neuralmeshing: Differentiable meshing of implicit neural representations
Brakhage Analytical investigations for the design of fast approximation methods for fitting curves and surfaces to scattered data
CN117808987B (en) Indoor scene three-dimensional reconstruction method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination