CN117473816A - Non-closed curved surface biasing method, electronic equipment and computer readable storage medium - Google Patents

Non-closed curved surface biasing method, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN117473816A
CN117473816A CN202311385195.1A CN202311385195A CN117473816A CN 117473816 A CN117473816 A CN 117473816A CN 202311385195 A CN202311385195 A CN 202311385195A CN 117473816 A CN117473816 A CN 117473816A
Authority
CN
China
Prior art keywords
curved surface
distance
offset
closed curved
sampling
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
CN202311385195.1A
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.)
Wuxi Youtian Wuwei Additive Technology Co ltd
Original Assignee
Wuxi Youtian Wuwei Additive Technology Co ltd
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 Wuxi Youtian Wuwei Additive Technology Co ltd filed Critical Wuxi Youtian Wuwei Additive Technology Co ltd
Priority to CN202311385195.1A priority Critical patent/CN117473816A/en
Publication of CN117473816A publication Critical patent/CN117473816A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2111/00Details relating to CAD techniques
    • G06F2111/04Constraint-based CAD
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T90/00Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Geometry (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Algebra (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Evolutionary Computation (AREA)
  • Pure & Applied Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Image Generation (AREA)

Abstract

The invention relates to a non-closed curved surface biasing method, electronic equipment and a computer readable storage medium, belonging to the technical field of computer aided design, comprising the following steps: s1, biasing an original non-closed curved surface by a preset biasing distance by using a moving cube algorithm to obtain a primary biased non-closed curved surface; s2, obtaining the symbol distance from the primary offset non-closed curved surface to the original non-closed curved surface, screening the area which meets the error requirement of the preset offset distance in the primary offset non-closed curved surface, and removing the redundant area in the primary offset non-closed curved surface to obtain the screened offset curved surface area; s3, screening the independent area with the largest triangular patches from the screened offset curved surface area; and S4, sampling the independent area with the largest triangular surface patches, fitting a radial basis function, and correcting errors to obtain the final offset non-closed curved surface. The final offset non-closed curved surface has smoother surface and higher precision, is not constrained by the offset distance, and does not need additional treatment.

Description

Non-closed curved surface biasing method, electronic equipment and computer readable storage medium
Technical Field
The invention belongs to the technical field of computer aided design, and particularly relates to a non-closed curved surface biasing method, electronic equipment and a computer readable storage medium.
Background
The curved surface bias is widely applied to the technologies of numerical control tool path calculation, layered curved surface calculation, collision detection and the like, and has important application in the fields of rapid manufacturing and the like. Common surface bias methods for triangular mesh models include a Moving Cube (MC) algorithm, a Moving Tetrahedron (MT) algorithm, a surface bias based on a vertex normal vector, and a surface bias based on a patch normal vector. The conventional curved surface bias method mainly aims at a closed model, and for a non-closed curved surface model, the bias difficulty is higher because the boundary bias direction is difficult to determine, so that the bias method for the non-closed curved surface model is less researched.
For the bias of the non-closed curved surface model, the post-treatment is usually required to be added on the basis of a conventional bias method so as to obtain the biased non-closed curved surface model. The MC/MT algorithm is widely applied and strong in robustness, and can be implemented by adding post-processing such as surface patch screening and the like to bias the non-closed curved surface model, but the boundary of the curved surface model after the post-processing is difficult to maintain the boundary characteristics of the original non-closed curved surface model; meanwhile, the surface fineness of the biased curved surface model depends on the number of generated cubes or tetrahedrons, wherein the more the number of generated cubes or tetrahedrons is, the slower the calculation efficiency is, and the larger the memory space is consumed; in addition, for a mesh vertex with a large curvature change, the curved surface in the vicinity of the vertex after offset is not smooth. The method based on vertex normal vector or surface patch normal vector offset can be used for primarily biasing the non-closed curved surface model, and curved surface characteristics including the position with larger curvature change can be ensured after biasing, but the bias distance constraint is larger, the bias distance cannot be excessively large, when the bias distance is larger, the condition that the biased surface patches intersect or have gaps needs to be considered, additional processing is needed, and the processing method is more difficult.
Disclosure of Invention
In view of the shortcomings of the prior art, the present invention aims to provide a non-closed curved surface biasing method, an electronic device and a computer readable storage medium based on a moving cube algorithm and a radial basis function, which are used for solving the defects existing in the prior art.
In order to achieve the above purpose, the invention adopts the following technical scheme:
a method of non-occluded surface biasing comprising:
s1, biasing an original non-closed curved surface by a preset bias distance by using a moving cube algorithm based on a pseudo normal solving symbol distance to obtain a primary biased non-closed curved surface;
s2, obtaining the symbol distance from the primary offset non-closed curved surface to the original non-closed curved surface, screening the area which meets the error requirement of the preset offset distance in the primary offset non-closed curved surface, and removing the redundant area in the primary offset non-closed curved surface to obtain the screened offset curved surface area;
s3, screening the independent area with the largest triangular patches from the screened offset curved surface area;
and S4, sampling the independent area with the largest triangular surface patches, fitting a radial basis function, and correcting errors to obtain the final offset non-closed curved surface.
Preferably, the biasing the original non-closed curved surface by a preset biasing distance by using a moving cube algorithm based on solving a symbol distance by a pseudo normal to obtain a primary biased non-closed curved surface includes:
s11, acquiring a cubic bounding box which encloses the original non-closed curved surface;
s12, filling the cube bounding box in a lattice mode according to the preset lattice quantity to obtain lattices of the preset lattice quantity;
s13, obtaining the distance from the top point of each lattice to the original non-closed curved surface;
s14, according to the distance from the top point of each lattice to the original non-closed curved surface, obtaining triangular patches of each lattice, which are equivalent to the preset offset distance, through linear interpolation, and forming the primary offset non-closed curved surface.
Preferably, the preset offset distance error is equal to the lattice cube side length.
Preferably, the sampling, radial basis function fitting and error correction are performed on the independent area with the largest triangular patches to obtain a final biased non-closed curved surface, which comprises the following steps:
s41, uniformly sampling the independent area with the largest triangular patches according to a preset sampling distance to obtain sampling points and sampling point normals;
s42, positively and negatively biasing the vertexes sampled in the independent area with the maximum number of the triangular patches along the normal vector of the sampling point to respectively obtain the external constraint point of the curved surface and the internal constraint point of the curved surface;
s43, fitting an implicit surface by using a radial basis function according to the information of the sampling points, the external constraint points of the surface and the internal constraint points of the surface;
s44, obtaining projection points of the vertexes of the original non-closed curved surface on the implicit curved surface until the minimum value requirement of the preset allowable distance error is met, and obtaining a fitted offset curved surface;
s45, obtaining the symbol distance from the projection point to the original non-closed curved surface, and performing error correction on the fitted offset curved surface to obtain the final offset non-closed curved surface.
Preferably, the uniformly sampling the independent area with the largest number of triangular patches according to the preset sampling distance to obtain sampling points and sampling point normals, including:
s411, uniformly sampling the independent area with the largest triangular patches according to a preset sampling distance to obtain the sampling points, wherein the sampling formula is as follows:
||v i -v j ||<d s
wherein d s For a preset sampling distance v i (i=0, 1,2 … … n) vertices (i.e. sampling points), v) sampled for the most numerous independent areas of the triangular patches j Sampling and v for the independent area with the largest number of triangular patches i (i=0, 1,2 … … n) adjacent vertices;
s412, calculating the normal vector of the sampling point by using the first-order field area included angle in a weighting way, wherein the specific formula is as follows:
wherein,for the normal vector of the sampling point s j Is the area of the triangular patch j, alpha j Is the included angle of the triangular surface patch j at the vertex i, fn j Is the patch normal vector of triangular patch j, j=0, 1,2 … … n.
Preferably, the positive and negative bias of the vertices sampled along the independent area with the largest number of triangular patches along the normal vector of the sampling point respectively obtains a curved surface external constraint point and a curved surface internal constraint point, which comprises:
s421, forward biasing the vertex sampled by the independent area with the largest triangular patch number along the normal vector of the sampling point by a unit distance to obtain the external constraint point of the curved surface;
s422, the vertex sampled by the independent area with the largest triangular patch number is negatively biased by a unit distance along the normal vector of the sampling point, and the internal constraint point of the curved surface is obtained.
Preferably, the fitting the implicit surface by using a radial basis function according to the information of the sampling point, the external constraint point of the surface and the internal constraint point of the surface includes:
fitting an implicit surface by using the information of the sampling points, the external constraint points of the surface and the internal constraint points of the surface and a radial basis function, wherein the basis function adopts g (x) =x 3 The expression of the implicit surface fitted by the radial basis function is:
wherein C is 0 、C 1 、C 2 、C 3 Is a constant coefficient, w i Is the vertex v i Coefficient of basis function, d ij Is the vertex v i And first order domain vertex v j Is used for the distance of the Europe type (R),i.e. d ij =||v i -v j ||;
Implicit surface formula f (v) of radial basis function with the sampling point (serving as surface constraint point of the surface) i ) =0, radial basis function implicit surface formula with surface external constraint pointsRadial basis function implicit surface formula with inner constraint points of surface +.>Obtaining a matrix form for solving an implicit surface formula of a radial basis function, and obtaining the correlation coefficient value:
wherein g (d) ij ) For sampling vertex v i And sampling vertex v j The radial basis function values, x, y and z are X, Y, Z coordinate components of the sampling vertex,f(v i )、/>implicit curvature values of radial basis functions of the external vertex, the surface vertex, and the internal vertex, respectively.
Preferably, the obtaining the projection point of the vertex of the original non-closed curved surface on the implicit curved surface until the minimum requirement of the preset allowable distance error is met, and obtaining the fitted offset curved surface includes:
continuous guided by radial basis functionsNewton iterative interpolation is carried out, and a projection point v 'of the vertex of the original non-closed curved surface on the implicit curved surface fitted by the radial basis function is obtained' k The specific calculation formula is as follows:
wherein,for the first order partial derivative of the implicit surface formula of the radial basis function on x, y and z coordinate components, the correlation coefficient is the same as the implicit surface expression of the radial basis function, g' x 、g′ y 、g′ z The first-order partial derivatives of the radial basis functions in x, y and z coordinate components are respectively obtained;
solving the vertex on the implicit curved surface through Newton interpolation iteration until the requirement of a preset allowable distance error minimum value e is met, namely a projection point v '' k With the projection point v 'solved in the last iteration' k-1 The Euclidean distance between the two is required to be smaller than a minimum value e, and the formula is I v' k -v′ k-1 ||<And e, obtaining the fitted offset curved surface.
Preferably, the obtaining the symbol distance from the projection point to the original non-closed curved surface, performing error correction on the fitted offset curved surface to obtain a final offset non-closed curved surface, includes:
obtaining the symbol distance from the projection point to the original non-closed curved surface;
error correction is carried out on the fitted offset curved surface according to the preset offset distance and the symbol distance from the projection point to the original non-closed curved surface, and the correction distance d of each vertex of the fitted offset curved surface vi The method comprises the following steps:
wherein d vi To correct the distance d offset For a preset offset distance d sd For the symbol distance from the projection point to the original non-closed curved surface, V offset For the sign distance dependent bias direction, V Fn The symbol is normal to the relevant patch;
the correction distance d vi Is not too large, and needs to meet the constraint of the side length of the lattice cube, namely correcting the distance d vi Smaller than the side length of the lattice cube;
and after error correction, obtaining the final offset non-closed curved surface.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the non-closed curved surface biasing method according to any one of the above when executing the program.
The present invention also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a non-closed surface biasing method as described in any of the above.
Compared with the prior art, the invention has the following beneficial effects:
compared with a curved surface bias method with additional processing of MC/MT, the non-closed curved surface bias method provided by the invention has the following advantages: (1) The invention is suitable for biasing various non-closed curved surface models; (2) The final biased non-closed curved surface obtained by the method can maintain the characteristics of the original non-closed curved surface at the position with larger curvature, and the phenomenon of unsmooth appearance is avoided; (3) And finally, keeping the vertex of the offset non-closed curved surface consistent with the topology information of the surface patch. Compared with a curved surface biasing method based on vertexes or surface patch normal vectors, the non-closed curved surface biasing method provided by the invention has the following advantages: (1) The final offset non-closed curved surface obtained by the method is smoother in surface and higher in precision; (2) The surface smoothness of the final offset non-closed curved surface obtained by the invention is not constrained by the offset distance; (3) The final biased non-closed curved surface obtained by the method does not need additional processing and does not increase the cost.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to these drawings without inventive effort.
Fig. 1 is a flow chart of a non-closed curved surface biasing method according to an embodiment of the invention.
Fig. 2 is a schematic flow chart of S1 in a non-closed curved surface biasing method according to an embodiment of the invention.
Fig. 3 is a schematic diagram of S1 in a non-closed curved surface biasing method according to an embodiment of the present invention.
Fig. 4 is a schematic flow chart of S4 in the non-closed curved surface biasing method according to the third embodiment of the present invention.
Fig. 5 is a schematic view of the structure of the independent area with the largest number of triangular patches.
FIG. 6 is a schematic diagram of the result of positive and negative bias of the most numerous independent areas along the normal vector of the sampling point.
FIG. 7 is a diagram of an original non-closed surface model.
FIG. 8 is a graph of a model of an unsealed surface after MC biasing by 1mm based on a pseudo-normal solution sign distance.
FIG. 9 is a diagram of a model of a primary biased non-occluded surface after removal of excess regions.
FIG. 10 is a diagram of an offset surface model of an original non-closed surface projected onto a radial basis function implicit surface to obtain a fit.
FIG. 11 is a diagram of a final biased non-closed surface model after error correction.
Fig. 12 is a cross-sectional view of an original non-closed curve and a final offset non-closed curve.
FIG. 13 is a cross-sectional view of the original non-closed curve with the final offset non-closed curve at an offset of 3 mm.
FIG. 14 is a cross-sectional view of the original non-occluded curved surface and the final biased non-occluded curved surface at a bias of-0.5 mm.
FIG. 15 is a cross-sectional view of the original non-occluded curved surface and the final biased non-occluded curved surface at a bias of-1.25 mm.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. In order to make the above features and advantages of the present invention more comprehensible, embodiments accompanied with figures are described in detail below.
Embodiment one: as shown in fig. 1, a non-closed curved surface biasing method includes:
s1, biasing an original non-closed curved surface by a preset bias distance by using a moving cube algorithm based on a pseudo normal solving symbol distance to obtain a primary biased non-closed curved surface;
s2, obtaining the symbol distance from the primary offset non-closed curved surface to the original non-closed curved surface, screening the area which meets the error requirement of the preset offset distance in the primary offset non-closed curved surface, and removing the redundant area in the primary offset non-closed curved surface to obtain the screened offset curved surface area;
s3, screening the independent area with the largest triangular patches from the screened offset curved surface area;
and S4, sampling the independent area with the largest triangular surface patches, fitting a radial basis function, and correcting errors to obtain the final offset non-closed curved surface.
In the present embodiment, as shown in fig. 2 and 3, the meaning of the marks in fig. 3 is as follows: 1. original non-closed curved surface, 2, primary bias non-closed curved surface, 3, bias curved surface redundant area, 4, cube bounding box, 5, lattice, 6, lattice side length, d offset Is a preset offset distance; the utilization ofThe moving cube algorithm for solving the symbol distance based on the pseudo normal line biases the original non-closed curved surface by a preset bias distance to obtain a primary biased non-closed curved surface, which comprises the following steps:
s11, acquiring a cubic bounding box which encloses the original non-closed curved surface;
s12, filling the cube bounding box in a lattice mode according to the preset lattice quantity to obtain lattices of the preset lattice quantity;
s13, obtaining the distance from the top point of each lattice to the original non-closed curved surface;
s14, according to the distance from the top point of each lattice to the original non-closed curved surface, obtaining triangular patches which are equivalent to the preset offset distance in each lattice through linear interpolation, and forming the primary offset non-closed curved surface. The primary offset non-closed curved surface obtained at present has redundant areas outside the corresponding boundaries of the original non-closed curved surface, cannot be directly used as a final offset non-closed curved surface, and needs to be processed by S2, S3 and S4.
In this embodiment, the larger the parameter value of the preset lattice number is, the slower the calculation efficiency is, the higher the MC bias precision is, but the smaller the influence on the following overall is, which can be generally set to 100.
In this embodiment, the calculation formula of the bias curved surface area after screening is as follows:
wherein omega is the offset curved surface area after screening, d offset For a preset offset distance d e For a preset offset distance error d Ω For the sign distance from the primary bias non-closed curved surface to the original non-closed curved surface, n Ω N is normal vector from the vertex of the original non-closed curved surface to the nearest point of the offset curved surface area after screening Foffset N is normal vector of the surface patch from the vertex of the original non-closed surface to the closest point of the primary offset non-closed surface Voffset Is the normal vector of the vertex of the original non-closed curved surface, and beta is the error angle. Currently obtained post-screening offset surface areaThe boundary of (2) is a sharp corner non-smooth boundary, and S3 and S4 processes are needed.
Embodiment two: as shown in fig. 1 to 3, a non-closed curved surface bias method is different from the first embodiment in that the preset bias distance error is preferably, but not limited to, equal to the side length of the lattice cube.
Embodiment III: as shown in fig. 1 to 15, the method for biasing an unsealed curved surface is different from the first or second embodiment in that the method for sampling, fitting a radial basis function, and correcting errors on the independent area with the largest number of triangular patches to obtain a final biased unsealed curved surface includes:
s41, uniformly sampling the independent area with the largest triangular patches according to a preset sampling distance to obtain sampling points and sampling point normals;
s42, positively and negatively biasing the vertexes sampled in the independent area with the maximum number of the triangular patches along the normal vector of the sampling point to respectively obtain the external constraint point of the curved surface and the internal constraint point of the curved surface;
s43, fitting an implicit surface by using a radial basis function according to the information of the sampling points, the external constraint points of the surface and the internal constraint points of the surface;
s44, obtaining projection points of the vertexes of the original non-closed curved surface on the implicit curved surface until the minimum value requirement of the preset allowable distance error is met, and obtaining a fitted offset curved surface;
s45, obtaining the symbol distance from the projection point to the original non-closed curved surface, and performing error correction on the fitted offset curved surface to obtain the final offset non-closed curved surface.
In this embodiment, the preset sampling distance d s The larger the parameter value of (2), the faster the calculation efficiency, the lower the fitting accuracy, and can be set to be generally 3.0mm.
In this embodiment, the uniformly sampling the independent area with the largest number of triangular patches according to the preset sampling distance to obtain sampling points and sampling point normals includes:
s411, uniformly sampling the independent area with the largest triangular patches according to a preset sampling distance to obtain the sampling points, wherein the sampling formula is as follows:
||v i -v j ||<d s
wherein d s For a preset sampling distance v i (i=0, 1,2 … … n) vertices (i.e. sampling points), v) sampled for the most numerous independent areas of the triangular patches j Sampling and v for the independent area with the largest number of triangular patches i (i=0, 1,2 … … n) adjacent vertices;
s412, calculating the normal vector of the sampling point by using the first-order field area included angle in a weighting way, wherein the specific formula is as follows:
wherein,for the normal vector of the sampling point s j Is the area of the triangular patch j, alpha j Is the included angle of the triangular surface patch j at the vertex i, fn j Is the patch normal vector of triangular patch j, j=0, 1,2 … … n.
In this embodiment, the positive and negative biasing, along the normal vector of the sampling point, the vertex sampled in the independent area with the largest number of triangular patches to obtain a curved surface external constraint point and a curved surface internal constraint point respectively includes:
s421, sampling the vertexes of the independent areas with the largest quantity of the triangular patches along the normal vector of the sampling pointsForward bias unit distance to obtain the external constraint point of the curved surface +.>
S422, sampling the vertexes of the independent areas with the largest quantity of the triangular patches along the normal vector of the sampling pointsNegative bias unit distance to obtain the inner constraint point +.>
In this embodiment, the fitting the implicit surface with the radial basis function according to the information of the sampling point, the external constraint point of the surface, and the internal constraint point of the surface includes:
fitting an implicit surface by using the information of the sampling points, the external constraint points of the surface and the internal constraint points of the surface and a radial basis function, wherein the basis function adopts g (x) =x 3 The expression of the implicit surface fitted by the radial basis function is:
wherein C is 0 、C 1 、C 2 、C 3 Is a constant coefficient, w i Is the vertex v i Coefficient of basis function, d ij Is the vertex v i And first order domain vertex v j Of (d), i.e. d ij =||v i -v j ||;
Implicit surface formula f (v) of radial basis function with the sampling point (serving as surface constraint point of the surface) i ) =0, radial basis function implicit surface formula with surface external constraint pointsRadial basis function implicit surface formula with inner constraint points of surface +.>Obtaining a matrix form for solving an implicit surface formula of a radial basis function, and obtaining the correlation coefficient value:
wherein g (d) ij ) For sampling verticesv i And sampling vertex v j The radial basis function values, x, y and z are X, Y, Z coordinate components of the sampling vertex,f(v i )、/>implicit curvature values of radial basis functions of the external vertex, the surface vertex, and the internal vertex, respectively.
In this embodiment, the obtaining the projection point of the vertex of the original non-closed curved surface on the implicit curved surface until the minimum requirement of the preset allowable distance error is met, and obtaining the fitted offset curved surface includes:
continuous guided by radial basis functionsNewton iterative interpolation is carried out, and a projection point v 'of the vertex of the original non-closed curved surface on the implicit curved surface fitted by the radial basis function is obtained' k The specific calculation formula is as follows:
wherein,for the first order partial derivative of the implicit surface formula of the radial basis function on x, y and z coordinate components, the correlation coefficient is the same as the implicit surface expression of the radial basis function, g' x 、g′ y 、g′ z Respectively radial basis functions of x,First order partial derivatives of y and z coordinate components;
solving the vertex on the implicit curved surface through Newton interpolation iteration until the requirement of a preset allowable distance error minimum value e is met, namely a projection point v '' k With the projection point v 'solved in the last iteration' k-1 The Euclidean distance between the two is required to be smaller than a minimum value e, and the formula is I v' k -v′ k-1 ||<And e, obtaining the fitted offset curved surface.
In this embodiment, the obtaining the symbol distance from the projection point to the original non-closed curved surface, and performing error correction on the fitted offset curved surface to obtain a final offset non-closed curved surface includes:
obtaining the symbol distance from the projection point to the original non-closed curved surface;
error correction is carried out on the fitted offset curved surface according to the preset offset distance and the symbol distance from the projection point to the original non-closed curved surface, and the correction distance d of each vertex of the fitted offset curved surface vi The method comprises the following steps:
wherein d vi To correct the distance d offset For a preset offset distance d sd For the symbol distance from the projection point to the original non-closed curved surface, V offset For the sign distance dependent bias direction, V Fn The symbol is normal to the relevant patch;
the correction distance d vi Is not too large, and needs to meet the constraint of the side length of the lattice cube, namely correcting the distance d vi Is smaller than the side length of the lattice cube, if the side length of the lattice cube is equal to the predetermined distance error d e Then d vi ||<d e
And after error correction, obtaining the final offset non-closed curved surface.
Fig. 7 to 12 show corresponding effect diagrams when an original non-closed curved surface model is offset by 1mm along a normal positive direction, wherein fig. 7 shows an original non-closed curved surface model, fig. 8 shows a non-closed curved surface model of an original non-closed curved surface after MC of a sign distance is solved by a pseudo normal along the normal positive direction, fig. 9 shows a primary offset non-closed curved surface model after redundant areas are removed, fig. 10 shows an offset curved surface model obtained by projecting the original non-closed curved surface onto a radial basis function implicit curved surface, fig. 11 shows a final offset non-closed curved surface model after error correction of the fitted offset curved surface, and fig. 12 shows a cross-sectional view of the original non-closed curved surface and the final offset non-closed curved surface. Therefore, it can be verified that the final offset non-closed curved surface obtained by adopting the non-closed curved surface offset method can maintain the characteristics of the original non-closed curved surface at the position with larger curvature, the phenomenon of unsmooth can not occur, the vertex and the surface patch topology information are kept consistent, the surface is smoother, the precision is higher, no additional treatment is needed, and the cost is not increased.
Fig. 12 to 15 show corresponding effect diagrams of an original non-closed curved surface model when offset distances are different in size, wherein fig. 12 shows the cross-sectional structures of the original non-closed curved surface and the final offset non-closed curved surface when offset is 1mm, fig. 13 shows the cross-sectional structures of the original non-closed curved surface and the final offset non-closed curved surface when offset is 3mm, fig. 14 shows the cross-sectional structures of the original non-closed curved surface and the final offset non-closed curved surface when offset is-0.5 mm, and fig. 15 shows the cross-sectional structures of the original non-closed curved surface and the final offset non-closed curved surface when offset is-1.25 mm. Therefore, the surface smoothness of the final offset non-closed curved surface obtained by adopting the non-closed curved surface offset method is not limited by the offset distance.
Embodiment four: an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the non-closed surface biasing method of any of the various embodiments described above when the program is executed. The processor and the memory complete communication with each other through the communication bus, and the processor may call logic instructions in the memory to execute the non-closed curved surface biasing method provided in each of the embodiments.
The logic instructions in the memory described above may be implemented in the form of software functional units and stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the storage medium includes: a usb disk, a removable hard disk, a read-only memory (ROM), a random-access memory (RAM), a magnetic disk, or an optical disk, etc.
Fifth embodiment: a computer program product comprising a computer program storable on a computer readable storage medium, the computer program, when executed by a processor, is capable of performing the non-closed surface biasing method provided in the respective embodiments described above.
Example six: a computer readable storage medium having stored thereon a computer program which when executed by a processor implements the non-closed surface biasing method of any of the various embodiments described above.
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 purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A method of non-occluded surface biasing comprising:
s1, biasing an original non-closed curved surface by a preset bias distance by using a moving cube algorithm based on a pseudo normal solving symbol distance to obtain a primary biased non-closed curved surface;
s2, obtaining the symbol distance from the primary offset non-closed curved surface to the original non-closed curved surface, screening the area which meets the error requirement of the preset offset distance in the primary offset non-closed curved surface, and removing the redundant area in the primary offset non-closed curved surface to obtain the screened offset curved surface area;
s3, screening the independent area with the largest triangular patches from the screened offset curved surface area;
and S4, sampling the independent area with the largest triangular surface patches, fitting a radial basis function, and correcting errors to obtain the final offset non-closed curved surface.
2. The method for biasing an unsealed curved surface according to claim 1, wherein the step of biasing an original unsealed curved surface by a predetermined biasing distance by using a moving cube algorithm for solving a sign distance based on a pseudo normal to obtain a primarily biased unsealed curved surface comprises the steps of:
s11, acquiring a cubic bounding box which encloses the original non-closed curved surface;
s12, filling the cube bounding box in a lattice mode according to the preset lattice quantity to obtain lattices of the preset lattice quantity;
s13, obtaining the distance from the top point of each lattice to the original non-closed curved surface;
s14, according to the distance from the top point of each lattice to the original non-closed curved surface, obtaining triangular patches of each lattice, which are equivalent to the preset offset distance, through linear interpolation, and forming the primary offset non-closed curved surface.
3. The method for biasing a non-closed curved surface according to claim 1, wherein the steps of sampling, fitting a radial basis function, and correcting errors on the independent area with the largest number of triangular patches to obtain a final biased non-closed curved surface include:
s41, uniformly sampling the independent area with the largest triangular patches according to a preset sampling distance to obtain sampling points and sampling point normals;
s42, positively and negatively biasing the vertexes sampled in the independent area with the maximum number of the triangular patches along the normal vector of the sampling point to respectively obtain the external constraint point of the curved surface and the internal constraint point of the curved surface;
s43, fitting an implicit surface by using a radial basis function according to the information of the sampling points, the external constraint points of the surface and the internal constraint points of the surface;
s44, obtaining projection points of the vertexes of the original non-closed curved surface on the implicit curved surface until the minimum value requirement of the preset allowable distance error is met, and obtaining a fitted offset curved surface;
s45, obtaining the symbol distance from the projection point to the original non-closed curved surface, and performing error correction on the fitted offset curved surface to obtain the final offset non-closed curved surface.
4. The method for biasing a non-closed curved surface according to claim 3, wherein uniformly sampling the independent area with the largest number of triangular patches according to a preset sampling distance to obtain sampling points and a sampling point normal vector, comprises:
s411, uniformly sampling the independent area with the largest triangular patches according to a preset sampling distance to obtain the sampling points, wherein the sampling formula is as follows:
||v i -v j ||<d s
wherein d s For a preset sampling distance v i (i=0, 1,2 … … n) vertices, i.e. sampling points, v, sampled for the most numerous independent areas of the triangular patches j Sampling and v for the independent area with the largest number of triangular patches i (i=0, 1,2 … … n) adjacent vertices;
s412, calculating the normal vector of the sampling point by using the first-order field area included angle in a weighting way, wherein the specific formula is as follows:
wherein,for the normal vector of the sampling point s j Is the area of the triangular patch j, alpha j Is the included angle of the triangular surface patch j at the vertex i, fn j Is the patch normal vector of triangular patch j, j=0, 1,2 … … n.
5. The method for biasing a non-closed curved surface according to claim 3, wherein said positively and negatively biasing vertices sampled along said independent areas with the greatest number of triangular patches along said sampling points to obtain a curved surface external constraint point and a curved surface internal constraint point, respectively, comprises:
s421, forward biasing the vertex sampled by the independent area with the largest triangular patch number along the normal vector of the sampling point by a unit distance to obtain the external constraint point of the curved surface;
s422, the vertex sampled by the independent area with the largest triangular patch number is negatively biased by a unit distance along the normal vector of the sampling point, and the internal constraint point of the curved surface is obtained.
6. The method of claim 4, wherein said fitting an implicit surface with a radial basis function based on information of the sampling points, the surface external constraint points, and the surface internal constraint points comprises:
fitting an implicit surface by using the information of the sampling points, the external constraint points of the surface and the internal constraint points of the surface and a radial basis function, wherein the basis function adopts g (x) =x 3 The expression of the implicit surface fitted by the radial basis function is:
wherein C is 0 、C 1 、C 2 、C 3 Is a constant coefficient, w i Is the vertex v i Coefficient of basis function, d ij Is the vertex v i And first order domain vertex v j Of (d), i.e. d ij =||v i -v j ||;
Implicit surface formula f (v) of radial basis function with the sampling point (serving as surface constraint point of the surface) i ) =0, radial basis function implicit surface formula with surface external constraint pointsRadial basis function implicit surface formula with inner constraint points of surface +.>Obtaining a matrix form for solving an implicit surface formula of a radial basis function, and obtaining the correlation coefficient value:
wherein g (d) ij ) For sampling vertex v i And sampling vertex v j The radial basis function values, x, y and z are X, Y, Z coordinate components of the sampling vertex,implicit curvature values of radial basis functions of the external vertex, the surface vertex, and the internal vertex, respectively.
7. The method for biasing a non-closed curved surface according to claim 6, wherein the obtaining the projection point of the vertex of the original non-closed curved surface on the implicit curved surface until the minimum requirement of the preset allowable distance error is met, comprises:
continuous guided by radial basis functionsNewton iterative interpolation is carried out, and a projection point v 'of the vertex of the original non-closed curved surface on the implicit curved surface fitted by the radial basis function is obtained' k The specific calculation formula is as follows:
wherein,for the first order partial derivative of the implicit surface formula of the radial basis function on x, y and z coordinate components, the correlation coefficient is the same as the implicit surface expression of the radial basis function, g' x 、g′ y 、g′ z The first-order partial derivatives of the radial basis functions in x, y and z coordinate components are respectively obtained;
solving the vertex on the implicit curved surface through Newton interpolation iteration until the requirement of a preset allowable distance error minimum value e is met, namely a projection point v '' k With the projection point v 'solved in the last iteration' k-1 The Euclidean distance between the two is smaller than the minimum value e, and the formula is I v' k -v′ k-1 ||<And e, obtaining the fitted offset curved surface.
8. The method for biasing a non-closed curved surface according to claim 7, wherein said obtaining the symbol distance from the projection point to the original non-closed curved surface, performing error correction on the fitted biased curved surface, and obtaining a final biased non-closed curved surface, includes:
obtaining the symbol distance from the projection point to the original non-closed curved surface;
error correction is carried out on the fitted offset curved surface according to the preset offset distance and the symbol distance from the projection point to the original non-closed curved surface, and the correction distance d of each vertex of the fitted offset curved surface vi The method comprises the following steps:
wherein d vi To correct the distance d offset For a preset offset distance d sd For the symbol distance from the projection point to the original non-closed curved surface, V offset For the sign distance dependent bias direction, V Fn The symbol is normal to the relevant patch;
the correction distance d vi Meeting the constraint of the side length of the lattice cube, namely correcting the distance d vi Smaller than the side length of the lattice cube;
and after error correction, obtaining the final offset non-closed curved surface.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the non-closed surface biasing method of any of claims 1-8 when the program is executed by the processor.
10. A computer readable storage medium having stored thereon a computer program which when executed by a processor implements the non-closed surface biasing method according to any one of claims 1-8.
CN202311385195.1A 2023-10-24 2023-10-24 Non-closed curved surface biasing method, electronic equipment and computer readable storage medium Pending CN117473816A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311385195.1A CN117473816A (en) 2023-10-24 2023-10-24 Non-closed curved surface biasing method, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311385195.1A CN117473816A (en) 2023-10-24 2023-10-24 Non-closed curved surface biasing method, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN117473816A true CN117473816A (en) 2024-01-30

Family

ID=89634040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311385195.1A Pending CN117473816A (en) 2023-10-24 2023-10-24 Non-closed curved surface biasing method, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN117473816A (en)

Similar Documents

Publication Publication Date Title
US11830143B2 (en) Tessellation method using recursive sub-division of triangles
US10909294B2 (en) Modeling of a design in reticle enhancement technology
Yang et al. Control point adjustment for B-spline curve approximation
CN109584357B (en) Three-dimensional modeling method, device and system based on multiple contour lines and storage medium
CN106780442A (en) A kind of solid matching method and system
US11301610B2 (en) Methods for modeling of a design in reticle enhancement technology
KR101853237B1 (en) 3D geometry denoising method and apparatus using deep learning
CN111540021B (en) Hair data processing method and device and electronic equipment
CN110246095B (en) Image restoration method and device, storage medium and terminal equipment
Chen et al. Fast linearized alternating direction minimization algorithm with adaptive parameter selection for multiplicative noise removal
CN117473816A (en) Non-closed curved surface biasing method, electronic equipment and computer readable storage medium
CN116468632A (en) Grid denoising method and device based on self-adaptive feature preservation
Acton et al. Nonlinear image estimation using piecewise and local image models
JP4964937B2 (en) Motion vector detection device, frame interpolation processing device, and methods thereof
CN114066779B (en) Depth map filtering method and device, electronic equipment and storage medium
CN111667581B (en) Processing method, device, equipment and storage medium of 3D model
CN114332057A (en) Training method of mask pattern correction model and mask pattern correction method
CN115100115A (en) Organ image segmentation method, device, equipment and storage medium
CN113496468B (en) Depth image restoration method, device and storage medium
CN110047046B (en) Image segmentation and offset field correction method, readable storage medium and terminal
CN113362470A (en) Point cloud Poisson surface reconstruction method applying adaptive density estimator
JP2000100692A (en) Method for correcting design pattern
CN114387392B (en) Method for reconstructing three-dimensional human body posture according to human shadow
TWI840340B (en) Method and system for reticle enhancement technology
Deng et al. Efficient non-uniform deblurring based on generalized additive convolution model

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