CN118037991A - Cylindrical side surface triangular mesh generation method based on mesh stretching - Google Patents
Cylindrical side surface triangular mesh generation method based on mesh stretching Download PDFInfo
- Publication number
- CN118037991A CN118037991A CN202410127946.8A CN202410127946A CN118037991A CN 118037991 A CN118037991 A CN 118037991A CN 202410127946 A CN202410127946 A CN 202410127946A CN 118037991 A CN118037991 A CN 118037991A
- Authority
- CN
- China
- Prior art keywords
- stretching
- cylindrical side
- line
- mesh
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000004044 response Effects 0.000 claims description 12
- 238000003491 array Methods 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000004088 simulation Methods 0.000 abstract description 32
- 238000010586 diagram Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 230000006872 improvement Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000009966 trimming Methods 0.000 description 1
Landscapes
- Image Generation (AREA)
Abstract
The invention provides a method for generating a triangular mesh on a cylindrical side surface based on mesh stretching, which comprises the following steps: obtaining a cylindrical model to be treated, and obtaining a cylindrical side surface according to the cylindrical model to be treated; judging whether the cylindrical side surface is a stretchable side surface, and when the cylindrical side surface is the stretchable side surface, performing initial parameter setting on the stretchable side surface to determine a starting circular arc line, a stopping circular arc line and any stretching line; generating a zeroth grid according to the stretching lines, and determining a plurality of stretching points to obtain the number of stretching layers; generating a first grid according to the stretching points, and determining a plurality of stretching line segments; and generating a second grid according to the stretching line segments, and determining the triangular grid on the side surface of the cylinder. The invention can utilize the grid stretching to generate the grids on the side surface of the cylinder into a longer right triangle, which not only can well describe the side surface of the cylinder, but also greatly reduces the number of the grids, thereby improving the simulation precision and the speed of solving.
Description
Technical Field
The invention relates to the technical field of graphic simulation, in particular to a cylindrical side surface triangle grid generation method based on grid stretching.
Background
With the continuous development of computer technology and numerical computing methods, simulation technology has become an indispensable part of the modern engineering field, and is a technology for testing by simulating real objects or real situations in real situations and generating virtual objects or situations.
Today's simulation techniques have greatly improved the accuracy and precision of real world simulation, but in the process of graphic simulation, when a longer and thinner cylinder appears, if the mesh size of the cylinder is consistent with the global mesh size, the generated mesh will describe the geometry as a prismatic geometry, sometimes even if the mesh on the side of the cylinder is directly attached together. Meanwhile, the grids of the whole cylinder are close to the characteristic of a regular triangle by a plurality of mainstream grid generation algorithms, so that the number of the grids of the whole cylinder accounts for a large part of the number of the whole grids, but the improvement of solving results is not large due to excessive grids on a cylindrical surface in simulation, and the solving time is greatly increased due to excessive grids.
Disclosure of Invention
In view of the above, it is necessary to provide a method for generating a triangular mesh on a cylindrical side surface based on mesh stretching.
A method for generating a triangular mesh on a cylindrical side surface based on mesh stretching comprises the following steps:
acquiring a cylindrical model to be processed, and obtaining a cylindrical side surface according to the cylindrical model to be processed;
judging whether the cylindrical side surface is a stretchable side surface, responding to the cylindrical side surface as the stretchable side surface, and performing initial parameter setting on the stretchable side surface to determine a starting circular arc line, a stopping circular arc line and any stretching line;
Generating a zeroth grid according to the stretching lines, and determining a plurality of stretching points to obtain the number of stretching layers;
Generating a first grid according to the stretching points, and determining a plurality of stretching line segments;
And generating a second grid according to the stretching line segments, and determining the triangular grid on the side surface of the cylinder.
In one embodiment, the method further comprises:
And carrying out grid fine adjustment on the triangular grids on the side surface of the cylinder to obtain the triangular grids on the side surface of the cylinder.
In one embodiment, according to the cylindrical model to be processed, obtaining the cylindrical side surface includes:
And identifying the cylindrical model to be processed through a geometric engine identification model to obtain a cylindrical side surface.
In one embodiment, determining whether the cylindrical side surface is a stretchable side surface, and in response to the cylindrical side surface being a stretchable side surface, performing initial parameter settings on the stretchable side surface comprises:
Judging whether the cylindrical side surface is a parallelogram, and judging whether the cylindrical side surface contains an embedded entity in response to the cylindrical side surface being the parallelogram;
An initial parameter setting is performed for the stretchable side surface in response to the cylindrical side surface not including an embedded entity.
In one embodiment, the initial parameter setting of the stretchable side surface, determining the start arc line, the end arc line, and any stretch line includes:
Acquiring a center line and two circular arc lines with split arrays in the stretchable side surface, and performing initial parameter setting according to the center line with split arrays to determine a starting circular arc line and a ending circular arc line, so as to ensure that the starting circular arc line is before the ending circular arc line;
and determining any straight line which is the same as the starting point and the ending point of the initial circular arc line as a stretching line.
In one embodiment, according to the stretch lines, generating a zeroth grid, determining a plurality of stretch points, and obtaining the number of stretch layers includes:
obtaining two end points of a stretching wire, and calculating the length of the stretching wire according to the two end points:
h=sqrt((t[0])2+(t[1])2+(t[2])2)
t[3]={x2-x1,y2–y1,z2–z1}
t[0]=x2-x1,t[1]=y2-y1,t[2]=z2-z1
wherein h represents the length of the stretched line, sqrt represents square root calculation, t3 represents the distance vector of the two endpoints, t 0 represents the distance vector x-axis value, t1 represents the distance vector y-axis value, and t2 represents the distance vector z-axis value;
Obtaining a global grid size, and calculating the number of stretching layers according to the global grid size:
n=(h/s)+1
where n represents the number of stretching layers, h represents the length of the stretching wires, and s represents the global grid size.
In one embodiment, according to the stretching points, generating the first grid, and determining the plurality of stretching line segments includes:
Calculating the length of any stretching line segment, and determining a plurality of stretching line segments according to the length of the stretching line segment:
l=h/n
l represents the length of the stretch wire segment, h represents the length of the stretch wire, and n represents the number of stretch layers.
In one embodiment, the generating of the second mesh according to the stretching line segment, and determining the triangular mesh with the cylindrical side surface includes:
calculating a projection size according to the initial circular arc line and the stretching layer number, and projecting the stretching line segment according to the projection size, the ending circular arc line and the stretching line segment to obtain a plurality of projection stretching points;
according to the stretching line segments and the projection stretching points, different layers of grid points belonging to the same starting point are sequentially connected through a projection relation, and a rectangular grid is obtained;
And connecting diagonal lines of the rectangular grids to obtain cylindrical side surface triangular grids.
In one embodiment, calculating a projection size according to the initial arc line and the stretching layer number, and projecting the stretching line segment according to the projection size and the stretching line segment to obtain a plurality of projection stretching points includes:
the projection size is calculated according to the following formula:
k=(i/n)*(t[0],t[1],t[2])
k represents a projection vector value, i represents an i-th layer, n represents a number of stretching layers, t 0 represents a distance vector x-axis value, t1 represents a distance vector y-axis value, and t2 represents a distance vector z-axis value.
In one embodiment, the method further comprises:
Meshing is performed using regular triangle subdivision in response to the cylindrical side surface containing an embedded entity.
Compared with the prior art, the invention has the advantages that: the invention can utilize the grid stretching to generate the grids on the side surface of the cylinder into a longer right triangle, which not only can well describe the side surface of the cylinder, but also can greatly reduce the number of the grids, thereby improving the simulation precision of solving and the speed of solving.
Drawings
FIG. 1 is a flow chart of a method for generating a triangular mesh on a cylindrical side surface based on mesh stretching in one embodiment;
FIG. 2 is a schematic diagram of an embedded entity in one embodiment;
FIG. 3 is a schematic view of a circular arc in one embodiment;
FIG. 4 is a schematic drawing of a stretch point in one embodiment;
FIG. 5 is a schematic diagram of the number of tensile layers in one embodiment;
FIG. 6 is a schematic drawing of a stretch segment in one embodiment;
FIG. 7 is a schematic diagram of projected stretch points in one embodiment;
FIG. 8 is a schematic diagram of a rectangular grid in one embodiment;
FIG. 9 is a schematic diagram of a cylindrical side surface triangular mesh in one embodiment;
FIG. 10 is a schematic diagram of a first type of simulation mesh of a cylindrical side surface in one embodiment;
FIG. 11 is a schematic diagram of a second type of simulation mesh for a cylindrical side surface in one embodiment;
FIG. 12 is a schematic diagram of a cylindrical side surface simulation grid produced by stretching in accordance with the present invention in one embodiment;
FIG. 13 is a schematic diagram of a first type of simulation grid solution for a cylindrical side surface in one embodiment;
FIG. 14 is a schematic diagram of a second type of simulation grid solution for a cylindrical side surface in one embodiment;
FIG. 15 is a schematic representation of the solution of a cylindrical side surface simulation grid generated by stretching in accordance with one embodiment of the present invention.
Detailed Description
Before proceeding with the description of the embodiments of the present invention, the general inventive concept will be described as follows:
The invention is mainly developed in the cylinder simulation process, when a longer and thinner cylinder appears in the simulation at present, if the mesh size of the cylinder is consistent with the overall mesh size, the generated mesh can describe the geometry as prismatic geometry, and sometimes even the situation that the mesh on the side surface of the cylinder is directly stuck together can occur. If the mesh size of the cylinder is set to be capable of better describing the mesh size of the cylinder, the mesh number of the whole cylinder accounts for a large part of the total mesh number because the mesh is close to the characteristic of a regular triangle by a plurality of mainstream mesh generation algorithms, but in the simulation, too many meshes on the cylindrical surface do not greatly promote the solving result, and conversely, the solving time is greatly increased due to too many meshes. Even if there is no elongated cylinder in the model, the mesh number is increased in the manner that the regular triangle mesh is generated on the side surface of the common cylinder, and although the mesh number is not very large, in the simulation of a large array, the solution time is greatly increased because the situation is amplified due to the large number of cylinders. In the current mainstream grid generation software, the grid stretching function generally needs to be manually operated, which is unfavorable for grid generation of complex models and large array models.
Therefore, the invention provides a cylindrical side surface triangle grid generation method based on grid stretching, which stretches the cylindrical side surface into a plurality of right triangles by an automatic grid stretching method, so that the time required by simulation is reduced and the simulation efficiency is improved under the condition of ensuring the accuracy of the simulation result of the cylinder.
Having described the general inventive concept, the present invention will be further described in detail with reference to the accompanying drawings by way of specific embodiments thereof, in order to make the objects, technical solutions and advantages of the present invention more apparent.
It should be noted that unless otherwise defined, technical or scientific terms used in one or more embodiments of the present specification should be given the ordinary meaning as understood by one of ordinary skill in the art to which the present invention pertains. The use of the terms "first," "second," and the like in one or more implementations of the present description does not denote any order, quantity, or importance, but rather the terms "first," "second," and the like are used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
In one embodiment, as shown in fig. 1, there is provided a mesh stretching-based cylindrical side surface triangle mesh generation method, including the steps of:
Step S101, a cylindrical model to be processed is obtained, and a cylindrical side surface is obtained according to the cylindrical model to be processed.
Specifically, a cylindrical model to be subjected to simulation processing is acquired, and side surfaces, circular arcs, and the like are determined from the cylindrical model.
On the basis, according to the cylindrical model to be processed, obtaining the cylindrical side surface comprises the following steps:
And identifying the cylindrical model to be processed through a geometric engine identification model to obtain a cylindrical side surface.
Specifically, the geometry engine recognition model will rank the entities in all dimensions in the cylindrical model, such as all points (0 dimensions): 1. 2, 3, 4 … …; all lines (1 dimension): 1. 2, 3, 4 … …; all faces (2 dimensions): 1. 2, 3, 4 … …; all volumes (3 dimensions): 1. 2, 3, 4 … …, can obtain cylindrical side surfaces, circular arcs and the like through a geometric engine recognition model.
Step S102, judging whether the cylindrical side surface is a stretchable side surface, responding to the cylindrical side surface as the stretchable side surface, and performing initial parameter setting on the stretchable side surface to determine a starting circular arc line, a stopping circular arc line and any stretching line.
Specifically, for the cylindrical side surface identified by the geometric engine identification model, the cylindrical side surface is divided into a stretchable side surface and a non-stretchable side surface according to whether the cylindrical side surface is a parallelogram or not by expansion and whether the embedded entity is contained. And (3) carrying out initial parameter setting on the stretchable side surface, and determining a starting circular arc line, a stopping circular arc line and any stretching line.
In the embodiment, the cylindrical side surfaces are classified according to the model characteristics of the cylindrical model, and for the stretchable side surfaces, the side surface simulation is performed by the method, so that the use efficiency and accuracy of the method are ensured.
On the basis, judging whether the cylindrical side surface is a stretchable side surface, and in response to the cylindrical side surface being a stretchable side surface, performing initial parameter setting on the stretchable side surface includes:
Judging whether the cylindrical side surface is a parallelogram, and judging whether the cylindrical side surface contains an embedded entity in response to the cylindrical side surface being the parallelogram;
An initial parameter setting is performed for the stretchable side surface in response to the cylindrical side surface not including an embedded entity.
On the basis, the device also comprises:
Meshing is performed using regular triangle subdivision in response to the cylindrical side surface containing an embedded entity.
Specifically, whether the cylindrical side surface is parallel four standard lines is firstly judged, when the cylindrical side surface is non-parallelogram, other methods are used for grid generation, the non-applicable cylindrical side surface is eliminated, and the applicability of the method is ensured.
As shown in fig. 2, an embedded entity refers to an entity that does not originally belong to a certain entity, and is embedded in the entity after boolean operations. When the cylindrical side surface contains embedded entities, smaller mesh sizes may need to be set around the embedded entities, in which case the use of regular triangle subdivision may be advantageous over the manner in which the mesh is stretched.
On the basis, initial parameter setting is carried out on the stretchable side surface, and a starting circular arc line, a stopping circular arc line and any stretching line are determined:
Acquiring a center line and two circular arc lines with split arrays in the stretchable side surface, and performing initial parameter setting according to the center line with split arrays to determine a starting circular arc line and a ending circular arc line, so as to ensure that the starting circular arc line is before the ending circular arc line;
and determining any straight line which is the same as the starting point and the ending point of the initial circular arc line as a stretching line.
Specifically, as shown in fig. 3, the geometric engine recognition model can be indexed to all entities through dimensions and numbers, so that two sections of circular arc lines of a cylinder have a precedence relationship, the circular arc line with the front number is firstly generated by a grid, and the grid on the ending circular arc line is obtained by a starting circular arc line, so that the circular arc line with the front number is set as the starting circular arc line. The two sections of arcs contained in the stretchable cylindrical side surface can be set as initial arcs of the cylindrical side surface, and the arcs arranged at the front are set as final arcs according to the sequence of the central lines of the array to be split.
The setting of the initial arc line and the final arc line can also be set according to other standards, and specific examples are only illustrative, and the final arc line is only required to be ensured to be split after the corresponding initial arc line is split.
A straight line in which any one of the cylindrical side surfaces and the start point and the end point of the start arc line are identical is set as a stretch line.
In this embodiment, a start circular arc line, a stop circular arc line and any one stretching line are set, so that the mesh generation sequence is ensured, and the mesh generation accuracy is improved.
Step S103, generating a zeroth grid according to the stretching lines, and determining a plurality of stretching points to obtain the number of stretching layers.
Specifically, a straight line which is included in the surface of the cylindrical side and is identical to the starting point and the ending point of the initial arc line is set as a stretching line, the generation of a zeroth grid can be performed according to the stretching line, a plurality of stretching points are determined, the stretching points correspond to the stretching layer number one by one, and the stretching layer number can be obtained through the stretching points.
On the basis, according to the stretching lines, generating a zeroth grid, determining a plurality of stretching points, and obtaining the stretching layer number comprises:
obtaining two end points of a stretching wire, and calculating the length of the stretching wire according to the two end points:
h=sqrt((t[0])2+(t[1])2+(t[2])2)
t[3]={x2-x1,y2–y1,z2–z1}
t[0]=x2-x1,t[1]=y2-y1,t[2]=z2-z1
wherein h represents the length of the stretched line, sqrt represents square root calculation, t3 represents the distance vector of the two endpoints, t 0 represents the distance vector x-axis value, t1 represents the distance vector y-axis value, and t2 represents the distance vector z-axis value;
Obtaining a global grid size, and calculating the number of stretching layers according to the global grid size:
n=(h/s)+1
where n represents the number of stretching layers, h represents the length of the stretching wires, and s represents the global grid size.
Specifically, as shown in fig. 4, the stretching vector values t [3] = { x2-x1, y2-y1, z2-z1} can be calculated according to two endpoints of any stretching line (the starting circular arc line is used in the embodiment), the length of the stretching line can be calculated according to the vector values t [3], h=sqrt ((t 0 ]) 2+(t[1])2+(t[2])2), the global grid is a pre-designed grid size, the global grid size is recorded as s, and then the number of stretching points on the stretching line is calculated according to the length of the stretching line and the global grid size, namely, the stretching layer number n= (h/s) +1 is the stretching layer number, as shown in fig. 5.
Step S104, according to the stretching points, generating a first grid, and determining a plurality of stretching line segments.
Specifically, as shown in fig. 6, the stretching line is cut into a plurality of stretching line segments according to stretching points, and when the first grid generation is performed, the initial arc line performs grid generation according to the grid size capable of accurately describing the arc, so as to obtain the stretching line segments; and the grids on the ending arc line calculate the grid number according to the grid point coordinates on the starting arc line and the vector value t3 to obtain a stretching line segment, wherein the stretching line is the rest straight lines except the non-starting arc line and the ending arc line, and the stretching line is split according to the grid size of l=h/n.
In this embodiment, different tensile lines are split by different modes, so that adaptability of the tensile line segment split is ensured, and accuracy of grid generation is improved.
On the basis, according to the stretching points, generating a first grid, and determining a plurality of stretching line segments comprises:
Calculating the length of any stretching line segment, and determining a plurality of stretching line segments according to the length of the stretching line segment:
l=h/n
l represents the length of the stretch wire segment, h represents the length of the stretch wire, and n represents the number of stretch layers.
Specifically, the stretching lines are the rest straight lines except the non-initial circular arc line and the end circular arc line, and the stretching lines are split according to the grid size of l=h/n.
And step S105, generating a second grid according to the stretching line segments, and determining a triangular grid on the surface of the cylindrical side.
Specifically, firstly, generating a zeroth grid to obtain stretching points and stretching the layer number, then, generating a first grid to obtain the length of a line segment, and finally, generating a second grid to generate a specific cylindrical side surface triangle grid.
On the basis, according to the stretching line segments, generating a second grid, and determining the triangular grid on the side surface of the cylinder comprises the following steps:
calculating a projection size according to the initial circular arc line and the stretching layer number, and projecting the stretching line segment according to the projection size, the ending circular arc line and the stretching line segment to obtain a plurality of projection stretching points;
According to the stretching line segments and the projection stretching points, different layers of grid points belonging to the same starting point are sequentially connected through a projection relation, so that a rectangular grid is obtained;
And connecting diagonal lines of the rectangular grids to obtain cylindrical side surface triangular grids.
Specifically, as shown in fig. 7, the vector value of each projection is calculated according to the stretching points on the initial arc line and the number of stretching layers, the initial arc line is projected to the final arc line for multiple projections to obtain multiple projected stretching points, and then the grid points (stretching points and projected stretching points) of each layer are connected. As shown in fig. 8, grid points of different layers belonging to the same starting point are sequentially connected according to the projection relationship, so as to obtain a plurality of rectangular grids. As shown in fig. 9, diagonal lines of a plurality of rectangular meshes are connected to obtain a cylindrical side surface triangular mesh composed of a plurality of right triangles.
In the embodiment, different projection stretching points are obtained through projection, stability of stretching point distribution is guaranteed, grids on the side surface of the cylinder are generated into a longer right triangle by utilizing grid stretching, the side surface of the cylinder can be well described, the number of the grids is greatly reduced, simulation precision of solving can be improved, and solving speed can be improved.
On the basis, the device also comprises: and carrying out grid fine adjustment on the triangular grids on the side surface of the cylinder to obtain the triangular grids on the side surface of the cylinder.
Specifically, when the second grid is generated, a part of the common surface including the special type line can be used for trimming the boundary grid in the grid generation process to ensure that the grid keeps a regular triangle state, at the moment, whether the modified point exists on the special type line needs to be identified, and if so, the operation needs to be prevented, so that the quality of the cylindrical side surface grid is prevented from being influenced after the grid point is trimmed, or the generation of the cylindrical side surface grid is prevented from failing. Wherein, special class lines are an initial line, a termination line and a stretching line. When the special class line is set, the dimension and the number are recorded, when the grid point on the special class line is modified, whether the dimension and the number are set by the special class line is judged, and if the dimension and the number are set by the special class line, the grid point is not changed.
The technical solutions of the present invention will be clearly and completely described in the following in connection with the embodiments of the present invention. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. 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.
Example 1
Taking a cylindrical model with parameters of 0.5mm radius and 10mm height as an example, the overall grid size is set to be 2mm, the grid size capable of ensuring that an arc can be accurately described is set to be 0.24166mm, the number of triangle grids is 126 for a cylindrical side surface first-type simulation grid which is split by using 2mm, the number of triangle grids is 1542 for a cylindrical side surface second-type simulation grid which is split by using 0.24166mm, the grid of fig. 12 is split by using a stretching mode, and the number of triangle grids is 260.
Performing scattering double-station RCS test on the simulation grids generated by the three methods, wherein FIG. 13 is a solution result of a first type simulation grid on the surface of the cylindrical side, and the solution time is 0.124s; FIG. 14 is a solution of a second type of simulation grid on the side surface of a cylinder, wherein 2.852s are used for solving; FIG. 15 is a solution of 0.268s for a cylindrical side surface simulation grid generated by stretching in accordance with the present invention. According to the number of grids and the quality of the grids, the fitting result of the cylindrical side surface simulation grids generated by stretching greatly saves simulation time under the condition of ensuring accuracy.
It should be noted that, the method of the embodiment of the present invention may be performed by a single device, for example, a computer or a server. The method of the embodiment can also be applied to a distributed scene, and is completed by mutually matching a plurality of devices. In the case of such a distributed scenario, one of the devices may perform only one or more steps of the method of an embodiment of the present invention, the devices interacting with each other to accomplish the method.
It should be noted that the foregoing describes some embodiments of the present invention. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Those of ordinary skill in the art will appreciate that: the discussion of any of the embodiments above is merely exemplary and is not intended to suggest that the scope of the invention (including the claims) is limited to these examples; the technical features of the above embodiments or in the different embodiments may also be combined within the idea of the invention, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
Where specific details are set forth in order to describe example embodiments of the invention, it should be apparent to one skilled in the art that embodiments of the invention can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative in nature and not as restrictive.
While the invention has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of those embodiments will be apparent to those skilled in the art in light of the foregoing description.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, and the like, which are within the spirit and principles of the embodiments of the invention, are intended to be included within the scope of the invention.
Claims (10)
1. The method for generating the triangular meshes on the side surface of the cylinder based on the mesh stretching is characterized by comprising the following steps of:
acquiring a cylindrical model to be processed, and obtaining a cylindrical side surface according to the cylindrical model to be processed;
judging whether the cylindrical side surface is a stretchable side surface, responding to the cylindrical side surface as the stretchable side surface, and performing initial parameter setting on the stretchable side surface to determine a starting circular arc line, a stopping circular arc line and any stretching line;
Generating a zeroth grid according to the stretching lines, and determining a plurality of stretching points to obtain the number of stretching layers;
Generating a first grid according to the stretching points, and determining a plurality of stretching line segments;
And generating a second grid according to the stretching line segments, and determining the triangular grid on the side surface of the cylinder.
2. The mesh stretching-based cylindrical side surface triangle mesh generation method according to claim 1, further comprising:
And carrying out grid fine adjustment on the triangular grids on the side surface of the cylinder to obtain the triangular grids on the side surface of the cylinder.
3. The method for generating triangular meshes on a cylindrical side surface based on mesh stretching according to claim 1, wherein the obtaining the cylindrical side surface according to the cylindrical model to be processed comprises:
And identifying the cylindrical model to be processed through a geometric engine identification model to obtain a cylindrical side surface.
4. The mesh stretching-based cylindrical side surface triangle mesh generation method according to claim 1, wherein the determining whether the cylindrical side surface is a stretchable side surface, and the initial parameter setting of the stretchable side surface in response to the cylindrical side surface being a stretchable side surface comprises:
Judging whether the cylindrical side surface is a parallelogram, and judging whether the cylindrical side surface contains an embedded entity in response to the cylindrical side surface being the parallelogram;
An initial parameter setting is performed for the stretchable side surface in response to the cylindrical side surface not including an embedded entity.
5. The method for generating triangular meshes on a cylindrical side surface based on mesh stretching according to claim 1, wherein the step of performing initial parameter setting on the stretchable side surface to determine a start circular arc line, a stop circular arc line and any stretching line comprises the steps of:
Acquiring a center line and two circular arc lines with split arrays in the stretchable side surface, and performing initial parameter setting according to the center line with split arrays to determine a starting circular arc line and a ending circular arc line, so as to ensure that the starting circular arc line is before the ending circular arc line;
and determining any straight line which is the same as the starting point and the ending point of the initial circular arc line as a stretching line.
6. The method for generating triangular meshes on a cylindrical side surface based on mesh stretching according to claim 1, wherein the generating a zeroth mesh according to the stretching lines, determining a plurality of stretching points, and obtaining the number of stretching layers comprises:
obtaining two end points of a stretching wire, and calculating the length of the stretching wire according to the two end points:
h=sqrt((t[0])2+(t[1])2+(t[2])2)
t[3]={x2-x1,y2–y1,z2–z1}
t[0]=x2-x1,t[1]=y2-y1,t[2]=z2-z1
wherein h represents the length of the stretched line, sqrt represents square root calculation, t3 represents the distance vector of the two endpoints, t 0 represents the distance vector x-axis value, t1 represents the distance vector y-axis value, and t2 represents the distance vector z-axis value;
Obtaining a global grid size, and calculating the number of stretching layers according to the global grid size:
n=(h/s)+1
where n represents the number of stretching layers, h represents the length of the stretching wires, and s represents the global grid size.
7. The method for generating triangular meshes on a cylindrical side surface based on mesh stretching as recited in claim 6, wherein said generating a first mesh according to said stretching points, determining a plurality of stretching line segments includes:
Calculating the length of any stretching line segment, and determining a plurality of stretching line segments according to the length of the stretching line segment:
l=h/n
l represents the length of the stretch wire segment, h represents the length of the stretch wire, and n represents the number of stretch layers.
8. The method for generating triangular meshes on a cylindrical side surface based on mesh stretching according to claim 1, wherein the generating a second mesh according to the stretching line segments, determining the triangular meshes on the cylindrical side surface comprises:
calculating a projection size according to the initial circular arc line and the stretching layer number, and projecting the stretching line segment according to the projection size, the ending circular arc line and the stretching line segment to obtain a plurality of projection stretching points;
According to the stretching line segments and the projection stretching points, different layers of grid points belonging to the same starting point are sequentially connected through a projection relation, so that a rectangular grid is obtained;
And connecting diagonal lines of the rectangular grids to obtain cylindrical side surface triangular grids.
9. The method for generating triangular meshes on a cylindrical side surface based on mesh stretching according to claim 8, wherein calculating a projection size according to the initial arc line and the number of stretching layers, and projecting the stretching line segment according to the projection size, and obtaining a plurality of projection stretching points comprises:
the projection size is calculated according to the following formula:
k=(i/n)*(t[0],t[1],t[2])
k represents a projection vector value, i represents an i-th layer, n represents a number of stretching layers, t 0 represents a distance vector x-axis value, t1 represents a distance vector y-axis value, and t2 represents a distance vector z-axis value.
10. The mesh stretching-based cylindrical side surface triangle mesh generation method according to claim 4, further comprising:
Meshing is performed using regular triangle subdivision in response to the cylindrical side surface containing an embedded entity.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410127946.8A CN118037991A (en) | 2024-01-29 | 2024-01-29 | Cylindrical side surface triangular mesh generation method based on mesh stretching |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410127946.8A CN118037991A (en) | 2024-01-29 | 2024-01-29 | Cylindrical side surface triangular mesh generation method based on mesh stretching |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118037991A true CN118037991A (en) | 2024-05-14 |
Family
ID=90992533
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410127946.8A Pending CN118037991A (en) | 2024-01-29 | 2024-01-29 | Cylindrical side surface triangular mesh generation method based on mesh stretching |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118037991A (en) |
-
2024
- 2024-01-29 CN CN202410127946.8A patent/CN118037991A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110223218B (en) | Face image processing method and device, electronic equipment and storage medium | |
US20030160785A1 (en) | Texture map editing | |
US12029620B2 (en) | Peeling type laser tooth preparing method, apparatus and device, and medium | |
CN108805871A (en) | Blood-vessel image processing method, device, computer equipment and storage medium | |
CN110348453B (en) | Object detection method and system based on cascade connection, storage medium and terminal | |
CN107567641B (en) | System and method for identifying replicas | |
CN111291450A (en) | Method, device and equipment for determining engine hood rebound three-dimensional model | |
CN118037991A (en) | Cylindrical side surface triangular mesh generation method based on mesh stretching | |
CN116167333A (en) | Chip verification method and device, electronic equipment and storage medium | |
CN112329282A (en) | Hole surrounding grid classification method and device and storage medium | |
CN113986728B (en) | Thermodynamic diagram-based integrated test case minimum set analysis method, system and terminal | |
CN112560126B (en) | Data processing method, system and storage medium for 3D printing | |
CN109754449B (en) | Triangularization determination method for two-dimensional grid graph | |
CN114779209A (en) | Laser radar point cloud voxelization method and device | |
CN111898654A (en) | Three-dimensional object feature acquisition method and device, computer equipment and storage medium | |
JP2007213243A (en) | Numerical analysis mesh generation device, numerical analysis mesh generation method and numerical analysis mesh generation program | |
CN116561890A (en) | Head envelope template generation method, head envelope generation method, device and product | |
CN112380611B (en) | Method, device, equipment and medium for designing perforated steel plate of ship outfitting platform channel | |
CN111401467B (en) | Remote sensing image classification method, image processing device and computer readable storage device | |
CN117115391B (en) | Model updating method, device, computer equipment and computer readable storage medium | |
CN118037601B (en) | Point cloud filling method and electronic equipment | |
JP7345821B2 (en) | Machining simulation system and machining simulation program | |
CN109143334B (en) | Level interpolation method, device and system | |
CN113886252B (en) | Regression test case priority determining method based on thermodynamic diagram | |
JP2019185177A (en) | System, method and program for specifying shape of three-dimensional object |
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 |