Method for determining spatial position of vertex relative to geometric body, and element attribute assignment method

By constructing a statistical count of the distance and direction markers between the vertex ray and the intersection point of the geometry in the ray casting method, the problem of position determination in special cases of the ray casting method is solved, ensuring the accuracy of the simulation model and the reliability of the simulation results.

WO2026025543A1PCT designated stage Publication Date: 2026-02-05PHYSIM ELECTRONIC TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/111928
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-08-02
Filing Date
2024-08-14
Publication Date
2026-02-05

AI Technical Summary

Technical Problem

The ray casting method in the existing technology cannot correctly determine the spatial relationship between points and geometric objects in some special cases, resulting in inaccurate assignment of element attributes and affecting the accuracy and efficiency of the simulation model.

Method used

By constructing rays from vertices and calculating the distances and orientations of their intersections with the directly constituent units of the geometry, and combining statistical counts of the distances and orientations, it is determined whether the vertex is inside or outside the geometry, thus ensuring the accuracy of the ray casting method.

Benefits of technology

It enables accurate determination of vertex and geometric spatial positions under special circumstances, ensuring the accuracy of the simulation model and the reliability of the simulation results, and supporting engineering decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024111928_05022026_PF_FP_ABST
    Figure CN2024111928_05022026_PF_FP_ABST
Patent Text Reader

Abstract

Provided is a method for determining the spatial position of a vertex relative to a geometric body, the method comprising: constructing a ray from a vertex (S3); determining whether the ray from the vertex intersects a plurality of direct constituent elements of a geometric body, and in response to determining that the ray from the vertex does not intersect any of the plurality of direct constituent elements of the geometric body, determining that the vertex is located outside the geometric body (S4); otherwise, calculating direction identifiers ni and distances di between the vertex and intersection points of the ray from the vertex and the direct constituent elements of the geometric body (S5); in response to determining that ni=N1 or N2, recording data pairs (di, ni), and in response to determining that ni=N3, discarding the data pairs (S6); sorting the data pairs on the basis of the numerical values of di (S7); performing statistical counting on the sorted data pairs (S8); and in response to determining that the total count is an odd number, the vertex being located in the geometric body, and in response to determining that the total count is an even number, the vertex being located outside the geometric body (S9).
Need to check novelty before this filing date? Find Prior Art

Description

Method for judging spatial position of vertex and geometric body and method for assigning attribute of unit

[0001] This application claims priority to the Chinese patent application No. 202411056532.7, filed on August 2, 2024, to the Chinese Patent Office, the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] The present application relates to the technical field of industrial numerical simulation, for example, to a method for judging spatial position of vertex and geometric body and a method for assigning attribute of unit. BACKGROUND

[0003] In the process of industrial numerical simulation, the assignment of unit attributes generally follows the step of mesh partitioning, which is of great significance. By assigning correct physical and mathematical attributes, such as material properties and cell types, to each mesh cell, the simulation model can accurately reflect the behavior and performance of the actual system. Accurate assignment of unit attributes helps to reduce errors and uncertainties in simulation calculations, thereby improving simulation efficiency, saving computing resources and time, enabling engineers to obtain simulation results more quickly and perform further analysis and optimization, and accelerating the product development cycle.

[0004] In the assignment of unit attributes, the spatial position relationship between points and geometric bodies is generally considered. The judgment of this spatial position relationship is crucial to ensure the accuracy and reasonableness of the assignment of unit attributes. During the mesh partitioning process, a large number of mesh cells are generated, which are defined by a series of points (vertices). For each mesh cell, it is necessary to determine whether it is located within a specific geometric body or intersects with it. This step is determined by comparing the vertices of the mesh cell with the boundaries of the geometric body. If all the vertices of the mesh cell are located outside the geometric body, the cell is not assigned the attribute of the geometric body; if the mesh cell has common points or common boundaries with the geometric body, the cell intersects with the geometric body, and whether to assign the attribute of the geometric body to the cell needs to be determined according to the specific simulation requirements; if the mesh cell is completely located within the geometric body, the cell is contained by the geometric body, and the cell should be assigned the attribute of the geometric body. Based on the judgment of the above spatial position relationship, the correct attribute can be assigned to each mesh cell, thereby ensuring that the simulation model can accurately reflect the distribution of material and physical properties of the actual physical system.

[0005] In two dimensions, a geometric body can be represented by a polygon as a boundary line. In three dimensions, a geometric body can be represented by a polyhedron as a boundary surface. The determination of the spatial relationship between a point and a geometric body is a problem often encountered in computer aided design (CAD) and computer aided engineering (CAE), which can be transformed into the determination of the spatial relationship between a point and a two-dimensional polygon or a three-dimensional polyhedron.

[0006] The ray method in the related art determines whether the end point of a ray is inside or outside a two-dimensional polygon or a three-dimensional polyhedron by recording the number of intersection points of the ray (the horizontal line with an arrow in FIG. 2) and the polygon or the polyhedron, and determining that the end point is inside in response to determining that the number of intersection points is odd, and determining that the end point is outside in response to determining that the number of intersection points is even. The ray method in the related art cannot handle some special cases, for example, as shown in FIG. 3: the number of intersection points of ray ① and ray ② with the polygon is the same, but the end point of ray ① is outside the polygon, and the end point of ray ② is inside the polygon; the number of intersection points of ray ③ and ray ④ with the polygon is the same, but the end point of ray ④ is outside the polygon, and the end point of ray ③ is inside the polygon. Therefore, it is necessary to explore an improved ray method suitable for the determination of the spatial relationship between a point and a geometric body that can correctly determine the above special cases.

[0007] SUMMARY

[0008] The present application provides a method for determining the spatial position of a vertex and a geometric body and a method for assigning attributes to units, which can improve some special cases that cannot be improved by the ray method in the related art, thereby accurately determining the spatial position of a vertex and a geometric body.

[0009] The present application provides a method for determining the spatial position of a vertex and a geometric body, comprising:

[0010] An industrial simulation software constructs a simulation geometric model;

[0011] The simulation geometric model is meshed, and the meshed simulation geometric model forms a plurality of geometric bodies;

[0012] A ray of the vertex is constructed, the ray of the vertex being a ray that extends infinitely to the right horizontally with the vertex as an end point;

[0013] It is determined whether the ray of the vertex intersects a plurality of directly constituent units of the geometric body, and based on a determination result that the ray of the vertex does not intersect all the directly constituent units of the geometric body, it is determined that the vertex is outside the geometric body;

[0014] Based on a determination result that the ray of the vertex intersects the directly constituent units of the geometric body, the distance d between the intersection point of the ray of the vertex and the directly constituent units of the geometric body and the vertex is calculated i and a direction identifier ni wherein the direction is identified as n i according to a dot product g of a ray direction of the vertex and a direct constituent element normal of the geometric body i determining, in response to determining that g i > 0, determining n i = N1, in response to determining that g i < 0, determining n i = N2, in response to determining that g i = 0, determining n i = N3;

[0015] in response to determining that n i = N1 or N2, recording a data pair (d i, n i ); in response to determining that n i = N3, discarding the data pair (d i, n i );

[0016] sorting the data pairs (d i n i, ) according to the numerical value of the distance d i , wherein, in response to determining that there is a same data pair (d i, n i ), merging the same data pair (d i, n i ) into one, in response to determining that the value of the distance d i is same but the value of n i is different, deleting all data pairs of the distance d i value;

[0017] statistically counting the sorted data pairs (d i, n i ), in response to determining that n i and n i-1 are different, counting one, in response to determining that n i and n i-1 are same, not increasing the count;

[0018] in response to determining that the total number of counts is odd, determining that the vertex is inside the geometric body; in response to determining that the total number of counts is even, determining that the vertex is outside the geometric body.

[0019] In one embodiment, the geometric body is a two-dimensional figure or a three-dimensional geometric body.

[0020] In one embodiment, the direct constituent element of the two-dimensional figure is an edge, the edge is a line segment, and the edge normal is perpendicular to the edge and points to the interior of the two-dimensional figure.

[0021] In one embodiment, determining whether the ray of a vertex intersects with multiple directly constituent units of the geometry includes:

[0022] Calculate α and β respectively, α = (x A -x S )×y R -(y A -y S )×x R , β=(y B -y S )×x R -(x B -x S )×y R ;

[0023] Where A and B are the two endpoints of one side of the two-dimensional figure, and the coordinates of point A are (x, y). A y A The coordinates of point B are (x, y). B y B The coordinates of vertex S are (x, y). S y S The ray direction R at the vertex is (x R y R R is a unit vector;

[0024] In response to determining α≥0, β≥0 and α+β>0, a ray to a vertex is determined to intersect an edge of the 2D graph; in response to determining α<0, or β<0, or α+β≤0, a ray to a vertex is determined to not intersect an edge of the 2D graph.

[0025] In one embodiment, the edge normal N of the two-dimensional graphic AB The calculation formula is:

[0026] Where A and B are the two endpoints of one side of the two-dimensional figure, and the coordinates of point A are (x, y). A y A The coordinates of point B are (x, y). B y B ).

[0027] In one embodiment, the direct constituent unit of the three-dimensional geometry is a surface, and the surface normal is perpendicular to the surface and points into the interior of the three-dimensional geometry.

[0028] In one embodiment, the direct constituent units of the three-dimensional geometry are triangular facets.

[0029] In one embodiment, determining whether the ray of a vertex intersects with multiple directly constituent units of the geometry includes:

[0030] Calculate α, β, and γ respectively, where α = xn1 ×x R +y n1 ×y R +Z n1 ×Z R β=x n2 ×x R +y n2 ×y R +z n2 ×Z R γ=x n3 ×x R +y n3 ×y R +Z n3 ×Z R ;

[0031] in,

[0032] A, B, and C are the three vertices of the triangular facet. The three-dimensional coordinates of point A are (x, y, c). A y A , z A The three-dimensional spatial coordinates of point B are (x, y). B y B , z B The three-dimensional spatial coordinates of point C are (x, y). C y C , z C The three-dimensional spatial coordinates of vertex S are (x, y). S y S , z S The ray direction R at the vertex is (x R y R , z R R is a unit vector;

[0033] In response to the conditions α≥0, β≥0, γ≥0 and α+β+γ>0, a ray at a vertex is determined to intersect a triangular facet. In response to the conditions α<0, or β<0, or γ<0, or α+β+γ≤0, a ray at a vertex is determined to not intersect a triangular facet.

[0034] In one embodiment, the face normal N of the triangular facet is... ABC The calculation formula is:

[0035] Where A, B, and C are the three vertices of the triangular facet, and the three-dimensional coordinates of point A are (x, y, c). A y A , z A The three-dimensional spatial coordinates of point B are (x, y). B yB , z B ), the three-dimensional space coordinates of point C are (x C , y C , z C ).

[0036] The application further provides a method for assigning a unit attribute, which uses the method for judging the spatial position of a vertex and a geometric body to judge the spatial position of a vertex of a grid unit and a geometric body, and assigns an attribute of the geometric body to the grid unit in response to determining that the vertex of the grid unit is located in the geometric body. BRIEF DESCRIPTION OF DRAWINGS

[0037] Fig. 1 is a flowchart of the method for judging the spatial position of a vertex and a geometric body according to an embodiment of the application;

[0038] Fig. 2 is a schematic diagram of the ray method for judging the position of a vertex and a polygon in the prior art;

[0039] Fig. 3 is a schematic diagram of the ray method for judging the position of a vertex and a polygon in the prior art, which cannot correctly judge the position;

[0040] Fig. 4 is a schematic diagram of the method for judging the position of a vertex and a polygon according to the application;

[0041] Fig. 5 is a two-dimensional model represented by a polygon;

[0042] Fig. 6 is a schematic diagram of the two-dimensional model in Fig. 5 after assigning a unit attribute;

[0043] Fig. 7 is a three-dimensional model represented by a polyhedron;

[0044] Fig. 8 is a schematic diagram of the three-dimensional model in Fig. 7 after assigning a unit attribute. DETAILED DESCRIPTION

[0045] Secondly, “one embodiment” or “an embodiment” in the application refers to a specific feature, structure or property that can be included in at least one implementation of the application. “In one embodiment”, “an embodiment” appearing in different places in the specification do not refer to the same embodiment, nor are they separate or alternative embodiments that exclude each other. The use of the words “include”, “contain” means that the claimed features exist, but do not exclude the existence of one or more other features. The application uses the word “and / or” to include any and all combinations of one or more of the related listed terms.

[0046] The application provides a method for judging the spatial position of a vertex (a vertex of a grid unit generated by grid division) and a geometric body, referring to Figs. 1 and 4, which comprises:

[0047] Step S1, an industrial simulation software constructs a simulation geometric model.

[0048] Step S2, meshing the simulation geometric model, the meshed simulation geometric model forms several geometric bodies.

[0049] Step S3, constructing a ray of vertex, the ray of vertex is a ray with vertex as an end point and extending horizontally to the right infinitely.

[0050] Step S4, judging whether the ray of vertex intersects with the plurality of direct constituent units of geometric body, if all do not intersect, the vertex is located outside the geometric body, otherwise, entering step S5.

[0051] Step S5, calculating the distance d i and direction identifier n i of the intersection point of the ray of vertex and the direct constituent unit of geometric body and the vertex. i The dot product g i of the direction of the ray of vertex and the normal of the direct constituent unit of geometric body is determined, if g i >0, n i =N1; if g i <0, n i =N2; if g i =0, n i =N3. N1, N2, N3 can be set as any number, letter, etc., as long as they can be distinguished from each other. For example, N1 can be set as 1, N2 can be set as -1, and N3 can be set as 0.

[0052] Step S6, if n i =N1 or N2, recording the data pair (d i, n i ); if n i =N3, discarding the data pair.

[0053] Step S7, sorting the data pairs (d i n i, ) according to the numerical value of d i (for example, from small to large). If there is the same data pair (d i, n i ), the same data pair (d i, n i ) is merged into one; if the value of d i is the same but the value of n i is different, all data pairs of the d i value are deleted.

[0054] Step S8, counting the sorted data pairs (d i, n i )(i=1, 2, 3, …): if n i and ni-1 If they are different, increment the count by one; otherwise, do not increment the count.

[0055] Step S9: If the total number of counts is odd, the vertex is inside the geometry; if the total number of counts is even, the vertex is outside the geometry.

[0056] This application applies to spatial geometric objects such as two-dimensional graphics (e.g., polygons) and three-dimensional geometric objects.

[0057] For a two-dimensional figure, its direct constituent units are edges, which are line segments. The normal to an edge is perpendicular to the edge and points inward into the two-dimensional figure. Let A and B be the two endpoints of an edge of the two-dimensional figure, and let the coordinates of point A be (x, y). A y A The coordinates of point B are (x, y). B y B The coordinates of vertex S are (x, y). S y S The ray direction R at the vertex is (x R y R ), where R is a unit vector.

[0058] Let α = (x A -x S )×y R -(y A -y S )×x R , β=(y B -y S )×x R -(x B -x S )×y R ;

[0059] If α≥0, β≥0 and α+β>0, then the ray from the vertex intersects the edge of the two-dimensional figure; otherwise, the ray from the vertex does not intersect the edge of the two-dimensional figure.

[0060] When a ray from a vertex intersects an edge of a two-dimensional figure, let the intersection point be E(x). E y E The coordinates of their intersection point E are:

[0061] The distance d between the intersection point E and the vertex S is:

[0062] normal N to the side (i.e., line segment AB) AB The calculation formula is:

[0063] The dot product g of the ray at the vertex and the direction of the edge normal is:

[0064] For a three-dimensional geometry, its direct constituent unit is a face, and the face normal is perpendicular to the face and points to the interior of the three-dimensional geometry. Most three-dimensional geometries have triangular facets as their direct constituent units. Let A, B, and C be the three vertices of a triangular facet, the three-dimensional coordinates of point A are (x A , y A , z A ), the three-dimensional coordinates of point B are (x B , y B , z B ), the three-dimensional coordinates of point C are (x C , y C , z C ), the three-dimensional coordinates of vertex S are (x S , y S , z S ), and the ray direction of the vertex is (x R , y R , z R ). R is a unit vector.

[0065] Let α = x n1 × x R + y n1 × y R + z n1 × z R , β = x n2 × x R + y n2 × y R + z n2 × z R , and γ = x n3 × x R + y n3 × y R + z n3 × z R .

[0066] If α ≥ 0, β ≥ 0, γ ≥ 0, and α + β + γ > 0, the ray of the vertex intersects the triangular facet, otherwise the ray of the vertex does not intersect the triangular facet.

[0067] When the ray of the vertex intersects the edge of a two-dimensional figure, let E(x E , y E , z E ) be the intersection point, and the coordinates of the intersection point E are:

[0068] The distance d between the intersection point E and the vertex S is:

[0069] The face normal N of the triangular facet ABC The calculation formula is:

[0070] The dot product g of the vertex and the face normal direction is: g=x R x n +y R y n +z R z n .

[0071] The application further provides a method for assigning a unit attribute, which uses the method for judging the spatial position of a vertex and a geometric body as described above to judge the spatial position of a vertex of a grid unit and the geometric body, and if the vertex of the grid unit is located in the geometric body, the grid unit is assigned the attribute of the geometric body.

[0072] The method for judging the spatial position of a vertex and a geometric body can be used in a grid division module in simulation software Physim-DC, Physim-ET, Turbot-BCA and other industrial simulation software, and if a unit is located in a geometric body, the unit is assigned the material attribute of the geometric body.

[0073] When the method for judging the spatial position of a vertex and a geometric body is used in simulation of electronic equipment, the following steps can be used:

[0074] Constructing a simulation geometric model of the electronic equipment;

[0075] Grid dividing the simulation geometric model, as shown in FIG. 5 and FIG. 7;

[0076] Using the method for judging the spatial position of a vertex and a geometric body as described above to judge the spatial position of a vertex of a grid unit and the geometric body, and assigning a unit attribute, as shown in FIG. 6 and FIG. 8;

[0077] Setting a boundary condition;

[0078] Carrying out simulation solving to obtain a simulation result.

[0079] The embodiments of the application have the following beneficial effects:

[0080] 1) The embodiments of the application introduce a geometric body directly into a unit normal into a ray method, which can solve some special cases that cannot be solved by the ray method in the related art, thereby accurately judging the spatial position of a vertex and a geometric body.

[0081] 2) By accurately judging the spatial position of a vertex and a geometric body, it can be ensured that each part in a simulation model can be accurately modeled according to an actual design or a physical state, thereby ensuring the accuracy of a simulation result, providing reliable data for subsequent analysis, and providing strong support for engineering decision-making.

[0082] The application further provides a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the method for determining the spatial position of a vertex relative to a geometric body or the method for assigning a unit attribute according to any one of the preceding embodiments.

[0083] The application further provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is executed by a processor to implement the method for determining the spatial position of a vertex relative to a geometric body or the method for assigning a unit attribute according to any one of the preceding embodiments. The computer storage medium can be a non-transitory computer readable storage medium.

[0084] The application further provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the method for determining the spatial position of a vertex relative to a geometric body or the method for assigning a unit attribute according to any one of the preceding embodiments.

[0085] The method for determining the spatial position of a vertex relative to a geometric body and the method for assigning a unit attribute provided by the embodiments of the application can be applied to industrial simulation technology, and are suitable for electronic device manufacturing, automobile part production, mechanical processing industry, aerospace industry, construction industry and the like. For example, the method can be applied to the design and research and development of industrial products, helps designers to visualize the appearance and structure of products in the early stage, and quickly evaluates the feasibility of different design schemes; or in combination with detection equipment, accurately measures and analyzes the size, shape and the like of products. The method for determining the spatial position of a vertex relative to a geometric body and the method for assigning a unit attribute in the embodiments of the application can be executed by an industrial simulation software, and the industrial simulation software is stored in a computer readable storage medium. The method can also be executed by a processor or a computer device comprising the industrial simulation software.

Claims

1. A method for determining spatial position of a vertex relative to a geometric body, comprising: constructing a simulation geometric model by industrial simulation software; performing meshing on the simulation geometric model, the meshed simulation geometric model forms a plurality of geometric bodies; constructing a ray of the vertex, the ray of the vertex is a ray with the vertex as an end point and extending horizontally to the right infinitely; determining whether the ray of the vertex intersects with a plurality of direct constituent units of the geometric body, based on a determination result that the ray of the vertex does not intersect with all the direct constituent units of the geometric body, determining that the vertex is located outside the geometric body; based on the determination of the intersection of the ray of the vertex with the directly constituent unit of the geometry, calculating a distance d of the intersection of the ray of the vertex and the directly constituent unit of the geometry from the vertex i and a direction identifier n i wherein the direction identifier n i is determined according to a dot product g of the ray direction of the vertex and a normal of the directly constituent unit of the geometry i determined, in response to a determination that g i > 0, determining n i = N1, in response to a determination that g i < 0, determining n i = N2, in response to a determination that g i = 0, determining n i = N3; in response to determining that n i = N1 or N2, recording the data pair (d i , n i ); in response to determining that n i = N3, discarding the data pair (d i , n i ); According to the distance d i The numerical value of the data pair (d i , n i ) is sorted, wherein, in response to determining that there is a same data pair (d i , n i ), the same data pair (d i , n i ) is merged into one, in response to determining that the value of the distance d i The value of n i Is different, delete all data pairs of the distance d i Value. counting the ordered pairs (d i , n i ) and in response to determining that n i and n i-1 are different, incrementing the count by one and in response to determining that n i and n i-1 are the same, not incrementing the count; in response to determining that a total number of counts is odd, determining that the vertex is located inside the geometric body; in response to determining that the total number of counts is even, determining that the vertex is located outside the geometric body.

2. The method of determining the spatial position of a vertex with respect to a geometry as recited in claim 1, wherein, The geometric body is a two-dimensional figure or a three-dimensional geometric body.

3. The method of determining the spatial position of a vertex with respect to a geometry as recited in claim 2, wherein, The direct constituent unit of the two-dimensional figure is an edge, the edge is a line segment, and an edge normal is perpendicular to the edge and points to the interior of the two-dimensional figure.

4. The method of determining the spatial position of a vertex with respect to a geometry as recited in claim 3, wherein, The determining whether the ray of the vertex intersects with the plurality of direct constituent units of the geometric body comprises: respectively calculating α and β, a = (x A - x S ) x y R - (y A - y S ) x x R , β = (y B - y S ) x x R - (x B - x S ) x y R ; Where A and B are the two endpoints of one side of the two-dimensional figure, and the coordinates of point A are (x, y). A y A The coordinates of point B are (x, y). B y B The coordinates of vertex S are (x, y). S y S The ray direction R at the vertex is (x R y R R is a unit vector; in response to determining that α≥0, β≥0 and α+β>0, determining that the ray of the vertex intersects with the edge of the two-dimensional figure, in response to determining that α<0, or β<0, or α+β≤0, determining that the ray of the vertex does not intersect with the edge of the two-dimensional figure.

5. The method of determining the spatial position of a vertex with respect to a geometry as recited in claim 3, wherein, The edge normal N of the two-dimensional figure AB The calculation formula is: Wherein, A, B are two end points of one side of the two-dimensional figure, the coordinate of point A is (x A , y A ), and the coordinate of point B is (x B , y B ).

6. The method of determining the spatial position of a vertex with respect to a geometry as recited in claim 2, wherein, The direct constituent unit of the three-dimensional geometric body is a face, and a face normal is perpendicular to the face and points to the interior of the three-dimensional geometric body.

7. The method of determining the spatial position of a vertex with respect to a geometry as recited in claim 6, wherein, The direct constituent unit of the three-dimensional geometric body is a triangular facet.

8. The method of determining vertex and geometry spatial positions according to claim 7, wherein, The determining whether the ray of the vertex intersects with the plurality of direct constituent units of the geometric body comprises: respectively calculating α, β and γ, α = x n1 x x R + y n1 x y R + z n1 x z R , β = x n2 x x R + y n2 x y R + z n2 x z R , γ = x n3 x x R + y n3 x y R + z n3 x z R ; wherein, A, B, C are three vertices of the triangular facet, the three-dimensional coordinate of point A is (x A , y A , z A ), the three-dimensional space coordinates of point B are (x B , y B , z B ), the three-dimensional space coordinates of point C are (x C , y C , z C ), the three-dimensional space coordinates of vertex S are (x S , y S , z S ), the ray direction R of the vertex is (x R , y R , z R ), and R is a unit vector; in response to determining that α≥0, β≥0, γ≥0 and α+β+γ>0, determining that the ray of the vertex intersects with the triangular facet, in response to determining that α<0, or β<0, or γ<0, or α+β+γ≤0, determining that the ray of the vertex does not intersect with the triangular facet.

9. The method of determining the spatial position of a vertex with respect to a geometry as recited in claim 7, wherein, a face normal N of the triangle patch ABC The formula for calculating N is: Wherein, A, B, C are three vertices of the triangular facet respectively, the three-dimensional space coordinates of point A are (x A , y A , z A ), the three-dimensional space coordinates of point B are (x B , y B , z B ), and the three-dimensional space coordinates of point C are (x C , y C , z C ).

10. A method for assigning a cell attribute, using the method for determining spatial position of a vertex relative to a geometric body according to any one of claims 1-9 to determine spatial position of a vertex of a grid cell relative to a geometric body, and in response to determining that the vertex of the grid cell is located inside the geometric body, assigning an attribute of the geometric body to the grid cell.

Citation Information

Patent Citations

  • Method for judging space position relation of point and polygon by using maximum slope ray algorithm

    CN102360509A

  • Method for determining points within polygon using simplified intersection calculations on computer

    CN111915665A

  • Position judgment method

    CN112509031A

  • Intersection testing in a ray tracing system

    GB2618213A