CN113626944A - Vector cross-multiplication-based grid surface patch retrieval method for curved surface part measurement points - Google Patents

Vector cross-multiplication-based grid surface patch retrieval method for curved surface part measurement points Download PDF

Info

Publication number
CN113626944A
CN113626944A CN202110745123.8A CN202110745123A CN113626944A CN 113626944 A CN113626944 A CN 113626944A CN 202110745123 A CN202110745123 A CN 202110745123A CN 113626944 A CN113626944 A CN 113626944A
Authority
CN
China
Prior art keywords
vector
patch
point
cross product
path
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
CN202110745123.8A
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.)
Guangdong Institute of Science and Technology
Original Assignee
Guangdong Institute of Science and Technology
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 Guangdong Institute of Science and Technology filed Critical Guangdong Institute of Science and Technology
Priority to CN202110745123.8A priority Critical patent/CN113626944A/en
Publication of CN113626944A publication Critical patent/CN113626944A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/17Mechanical parametric or variational design
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B21/00Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
    • G01B21/20Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring contours or curvatures, e.g. determining profile

Landscapes

  • Physics & Mathematics (AREA)
  • Geometry (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Length Measuring Devices With Unspecified Measuring Means (AREA)

Abstract

A grid surface patch retrieval method facing to curved surface part measuring points based on vector cross product comprises the following steps: acquiring patch data of each mesh patch in the STL file; and B: determining a plurality of travelling starting points and a plurality of sections of travelling paths of the selected mesh patches; and C: performing vector cross product operation on a connecting line vector of the current travel starting point and the measurement point and a vector of the current travel path, performing point multiplication on a vector cross product operation result and a patch normal vector, and acquiring a position relation between the measurement point and the travel path according to the point multiplication result; step D: judging whether the selected grid surface patch is the grid surface patch corresponding to the measuring point, if so, entering the step E, otherwise, reselecting a new grid surface patch, and returning to the step B; step E: and acquiring the normal vector direction of the grid surface patch to drive the measuring head to move. The invention realizes the direct data processing operation of the triangular mesh model corresponding to the STL file, quickly obtains the normal vector direction of the measuring point corresponding to the model outline, and effectively drives the measuring head for precision detection to move.

Description

Vector cross-multiplication-based grid surface patch retrieval method for curved surface part measurement points
Technical Field
The invention relates to the technical field of precision of curved surface parts, in particular to a vector cross product-based mesh surface patch retrieval method facing to measurement points of curved surface parts.
Background
In the production process of the complex curved surface part, the machining precision of the complex curved surface part needs to be detected and controlled by using a corresponding detection technology. Among them, a three-Coordinate Measuring Machine (CMM) -based inspection technique is often used for form and position accuracy inspection of precision parts. At present, three-dimensional data of a complex curved surface part is often stored in a computer as a parameterized model, and any shape data information in the parameterized model is accurately recorded through digitalized information such as shape characteristics or parametric curved surfaces. And the normal vector direction of the part appearance corresponding to the measuring point is directly obtained by retrieving the recorded digital information, so that the movement of the measuring head for precise detection is realized.
With the rapid development of digital detection and reverse engineering technologies, triangular mesh models are also increasingly used for the outline expression of complex curved surface parts. The triangular mesh model approximately expresses the outline of the model by a series of connected triangular patches, the triangular mesh model is usually stored in a computer in an STL file format, and data information of each mesh patch is listed one by one in a file. But the storage sequence of the mesh patches is random, and each mesh patch only records the normal vector of the mesh patch and the coordinate information of three vertexes. The data information of each grid patch in the STL file consists of 7 lines of codes, wherein the 1 st line is a grid patch pointing to the normal vector direction data outside the entity; the 2 nd and 6 th behaviors declare the beginning and the end of the traversal of the vertex of the current patch; coordinate information of three vertexes of the mesh patches of the 3 rd to 5 th behaviors, and the three vertexes are sequenced along the right-hand spiral direction of the normal vector of the patches according to the normal vector rule of the patches; act 7 ends the declaration for the current mesh patch. All digital data retain 8 significant digits and are expressed in scientific notation.
As shown in fig. 1, for precision detection of a triangular mesh model, when a detection position (i.e., a measurement point) is known, a corresponding mesh patch needs to be retrieved, and then the detection probe is moved in a reverse direction according to a normal vector direction of the mesh patch, so as to finally obtain a precision detection value of the part surface. The direction information of the normal vector of the patch can be directly obtained according to the storage data of the STL file, but the retrieval operation of the grid patch corresponding to the measuring point lacks a direct method.
Disclosure of Invention
The invention aims to provide a method for searching a mesh patch facing to a curved surface part measuring point, which aims at overcoming the defects in the background art, realizes the direct data processing operation of a triangular mesh model corresponding to an STL file, quickly acquires the outer normal vector direction of the measuring point corresponding to the model outline, and effectively drives a measuring head for precision detection to move. Compared with the prior art, the method and the device do not need to carry out topology reconstruction of model data, directly carry out data processing judgment operation on the mesh patch information of the STL file, occupy less computer resources and consume less time.
In order to achieve the purpose, the invention adopts the following technical scheme:
the vector cross multiplication-based mesh patch retrieval method facing to the measurement points of the curved surface part comprises the following steps:
step A: acquiring patch data of each mesh patch in the STL file one by one;
and B: determining a plurality of traveling starting points and a plurality of sections of traveling paths of the currently selected mesh patch;
and C: acquiring a connecting line vector of a current advancing starting point and a measuring point, performing vector cross product operation on the connecting line vector and a vector of a current advancing path, performing point multiplication on a result of the vector cross product operation and a normal vector of a currently selected mesh patch, and judging the position relation between the measuring point and the current advancing path according to a point multiplication result;
repeating the step B and the step C until the position relation between the measuring point and each section of the travel path is obtained;
step D: judging whether the currently selected grid surface patch is the grid surface patch corresponding to the measuring point or not according to the position relation between the measuring point and each section of the path, if so, entering the step E, otherwise, reselecting a new grid surface patch, and returning to the step B;
step E: and acquiring the normal vector direction of the grid surface patch to drive the measuring head to move.
Preferably, in the step a, the obtaining patch data of each mesh patch in the STL file one by one specifically includes:
sequentially extracting the data code of each grid patch in the STL file, and performing data conversion on the extracted data code;
and obtaining three-dimensional coordinates of three vertexes of the currently selected mesh patch according to the converted data.
Preferably, in the step B, determining a plurality of travel starting points and a plurality of travel paths of the currently selected mesh patch includes:
step B1: taking the first vertex of the currently selected mesh patch as a current traveling starting point, taking a path from the first vertex to the second vertex as a current traveling path, and executing the step C to determine the position relationship between the measuring point and the current traveling path;
step B2: taking the second vertex of the currently selected mesh patch as a current traveling starting point, taking a path from the second vertex to the third vertex as a current traveling path, and executing the step C to determine the position relationship between the measuring point and the current traveling path;
step B3: and C, taking the third vertex of the currently selected mesh patch as the current traveling starting point, taking the path from the third vertex to the first vertex as the current traveling path, and executing the step C to determine the position relation between the measuring point and the current traveling path.
Preferably, in the step C: obtaining a connecting line vector of a current traveling starting point and a measuring point, and performing vector cross product operation on the connecting line vector and a vector of a current traveling path, wherein the method specifically comprises the following steps:
when the step B1 is executed, performing a vector cross product operation according to formula one;
the formula I is as follows:
Figure BDA0003142472910000041
wherein:
the three vertexes of the currently selected mesh patch are sequentially ordered as v along the right-hand spiral direction of the normal vector of the patch1、v2、v3Three-dimensional coordinates of three vertices are v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、 v3(v3x,v3y,v3z);
The three-dimensional coordinate of the measurement point P is (P)x,Py,Pz);
Figure BDA0003142472910000042
A vector representing a current path of travel;
Figure BDA0003142472910000043
indicating the current travel starting point v1A line vector with the measurement point P;
Figure BDA0003142472910000044
to meet
Figure BDA0003142472910000045
To
Figure BDA0003142472910000046
The unit vector of the right-hand rule is necessarily parallel to the normal vector of the currently selected grid patch;
∠Pv1v2to represent
Figure BDA0003142472910000047
And
Figure BDA0003142472910000048
the included angle of (a).
Preferably, in the step C: obtaining a connecting line vector of a current traveling starting point and a measuring point, and performing vector cross product operation on the connecting line vector and a vector of a current traveling path, wherein the method specifically comprises the following steps:
when the step B2 is executed, performing a vector cross product operation according to formula two;
the formula II is as follows:
Figure BDA0003142472910000049
wherein:
the three vertexes of the currently selected mesh patch are sequentially ordered as v along the right-hand spiral direction of the normal vector of the patch1、v2、v3Three-dimensional coordinates of three vertices are v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、 v3(v3x,v3y,v3z);
The three-dimensional coordinate of the measurement point P is (P)x,Py,Pz);
Figure BDA0003142472910000051
A vector representing a current path of travel;
Figure BDA0003142472910000052
indicating the current travel starting point v2A line vector with the measurement point P;
Figure BDA0003142472910000053
to meet
Figure BDA0003142472910000054
To
Figure BDA0003142472910000055
Unit of right hand ruleThe vector is necessarily parallel to the normal vector of the currently selected grid patch;
∠Pv2v3to represent
Figure BDA0003142472910000056
And
Figure BDA0003142472910000057
the included angle of (a).
Preferably, in the step C: obtaining a connecting line vector of a current traveling starting point and a measuring point, and performing vector cross product operation on the connecting line vector and a vector of a current traveling path, wherein the method specifically comprises the following steps:
when the step B3 is executed, carrying out vector cross product operation according to formula three;
the formula III is as follows:
Figure BDA0003142472910000058
wherein:
the three vertexes of the currently selected mesh patch are sequentially ordered as v along the right-hand spiral direction of the normal vector of the patch1、v2、v3Three-dimensional coordinates of three vertices are v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、 v3(v3x,v3y,v3z);
The three-dimensional coordinate of the measurement point P is (P)x,Py,Pz);
Figure BDA0003142472910000059
A vector representing a current path of travel;
Figure BDA0003142472910000061
indicating the current travel starting point v3A line vector with the measurement point P;
Figure BDA0003142472910000062
to meet
Figure BDA0003142472910000063
To
Figure BDA0003142472910000064
The unit vector of the right-hand rule is necessarily parallel to the normal vector of the currently selected grid patch;
∠Pv3v1to represent
Figure BDA0003142472910000065
And
Figure BDA0003142472910000066
the included angle of (a).
Preferably, in the step C, performing a dot product on a result of the vector cross product operation and a patch normal vector of the currently selected mesh patch, specifically including:
when step B1 is executed, dot product is performed according to formula four;
the formula four is as follows:
Figure BDA0003142472910000067
when step B2 is performed, a dot product is performed according to the formula five:
the formula five is as follows:
Figure BDA0003142472910000068
when step B3 is performed, a dot product is performed according to the formula six:
formula six:
Figure BDA0003142472910000069
wherein:
Figure BDA0003142472910000071
represents the normal vector of the currently selected grid patch and has three-dimensional coordinates of
Figure BDA0003142472910000072
Preferably, in the step C, the determining the position relationship between the measurement point and the current travel path according to the dot product result specifically includes:
if the dot product result is a positive number, the vector obtained by the vector cross product operation result is in the same direction as the normal vector of the patch;
if the dot product result is negative, the vector obtained by the vector cross product operation result is opposite to the normal vector of the patch;
when the vector obtained by the vector cross product operation result is in the same direction with the normal vector of the patch:
∠Pv1v2∈0°~180°,sin∠Pv1v2> 0, the measurement point P is located on the travel path v1→v2To the left of (1);
∠Pv2v3∈0°~180°,sin∠Pv2v3> 0, the measurement point P is located on the travel path v2→v3To the left of (1);
∠Pv3v1∈0°~180°,sin∠Pv3v1> 0, the measurement point P is located on the travel path v3→v1To the left of (1);
when the vector obtained by the vector cross product operation result is in the same direction with the normal vector of the patch:
∠Pv1v2∈-180°~0°,sin∠Pv1v2< 0, the measurement point P is located on the travel path v1→v2To the right of (1);
∠Pv2v3∈-180°~0°,sin∠Pv2v3< 0, the measurement point P is located on the travel path v2→v3To the right of (1);
∠Pv3v1∈-180°~0°,sin∠Pv3v1<0,the measuring point P being located on the path of travel v3→v1To the right of (c).
Preferably, in the step D, determining whether the currently selected mesh patch is the mesh patch corresponding to the measurement point according to the position relationship between the measurement point and each segment of the path includes:
and when the measuring points always keep the same direction relative to each section of the traveling path, the currently selected grid patch is the grid patch corresponding to the measuring point.
Preferably, in the step E, the method specifically includes:
extracting data codes of the mesh patches corresponding to the measuring points in the STL file;
acquiring the normal vector direction of the grid patch corresponding to the measuring point and the x, y and z axial numerical values of the normal vector according to the data code;
and driving the measuring head with the precision detection to move according to the acquired axial numerical value.
The technical scheme of the embodiment of the invention has the following beneficial effects:
the invention realizes the direct data processing operation of the triangular mesh model corresponding to the STL file, quickly obtains the outer normal vector direction of the measuring point corresponding to the model outline, and effectively drives the measuring head for precision detection to move. Compared with the prior art, the method and the device do not need to carry out topology reconstruction of model data, directly carry out data processing judgment operation on the mesh patch information of the STL file, occupy less computer resources and consume less time.
Drawings
FIG. 1 is a precision detection diagram of the triangular mesh model of the present invention;
FIG. 2 is a schematic diagram of the positions of the corresponding measurement points of the mesh patches according to one embodiment of the present invention;
FIG. 3 is a schematic diagram of a grid patch without corresponding measurement points in accordance with an embodiment of the present invention;
FIG. 4 shows a graph of v for one embodiment of the present invention1As a starting point of travel, v1→v2A vector cross product operation graph of the travel path;
FIG. 5 is a flowchart of a method of searching a mesh patch for a measurement point of a curved surface part according to the present invention;
fig. 6 is a schematic diagram of extracting patch data in an STL file according to an embodiment of the present invention.
Detailed Description
The technical scheme of the invention is further explained by the specific implementation mode in combination with the attached drawings.
In the prior art, a triangular mesh model is used for expressing the outline of a complex curved surface part, but an angular mesh model approximately expresses the outline of the model by a series of connected triangular patches, the triangular mesh model is stored in a computer in an STL file format, and data information of each mesh patch is arranged one by one inside the file. But the storage sequence of the mesh patches is random, and each mesh patch only records the normal vector of the mesh patch and the coordinate information of three vertexes.
The data information of each mesh patch in the STL file consists of 7 lines of code, as shown in the following example:
Figure BDA0003142472910000091
wherein, the 1 st behavior grid patch points to the normal vector direction data outside the entity; the 2 nd and 6 th behaviors state the beginning and the ending of the traversal of the vertex of the current patch; coordinate information of three vertexes of the mesh patches of the 3 rd to 5 th behaviors, and the three vertexes are sequenced along the right-hand spiral direction of the normal vector of the patches according to the normal vector rule of the patches; act 7 ends the declaration for the current mesh patch. All digital data retains 8 significant digits and is expressed in scientific notation.
As shown in fig. 1, for precision detection of a triangular mesh model, when a detection position (i.e., a measurement point) is known, a corresponding mesh patch needs to be retrieved, and then the detection probe is moved in a reverse direction according to a normal vector direction of the mesh patch, so as to finally obtain a precision detection value of the part surface. The direction information of the normal vector of the patch can be directly obtained according to the stored data of the STL file, but the retrieval operation of the measuring point corresponding to the grid patch lacks a direct method, the conventional technology mostly carries out a large amount of topological data reconstruction operation on the STL file, and then the retrieval and the obtaining of the measuring point corresponding to the grid patch are realized through the data processing of the topological reconstruction data.
As can be seen from the prior art, for the retrieval operation of a measurement point corresponding to a mesh patch, the current research methods all need to perform a large amount of topology data reconstruction operations on an STL file corresponding to a triangular mesh model, retrieve the mesh patch corresponding to the measurement point by using the model data of the topology reconstruction, and obtain patch normal vector information for driving the probe to move. However, the reconstruction operation of the topology data is time-consuming, the generated model topology reconstruction data information amount is large, the computer resources are occupied, and the direct precision measurement of the triangular mesh model corresponding to the complex curved surface part is not facilitated.
Therefore, in order to solve the above problems, the present application provides a method for retrieving a mesh patch facing a curved surface part measurement point based on vector cross product, and for better explaining the technical scheme of the present application, the main principle of the technical scheme of the present application is firstly analyzed, specifically including:
if the selected grid surface patch is the only grid surface patch where the measuring point is located, the measuring point is located inside the grid surface patch, a circle is made along three edges of the grid surface patch, and the measuring point always keeps the same direction relative to a traveling path; if the selected grid patch is not the only grid patch where the measuring point is located, the measuring point is located outside the grid patch, a circle is made along three edges of the grid patch, and the measuring point inevitably presents different relative directions relative to the traveling path.
As shown in fig. 2, the selected mesh patch is the only mesh patch where the measurement point is located, the measurement point is located inside the mesh patch, and the mesh patch is rotated counterclockwise by one turn along three edges of the mesh patch, and the measurement point is located on the left of the traveling path; as shown in fig. 3, the selected mesh patch is not the location of the measurement point, the measurement point is located outside the mesh patch, and the measurement point makes a counterclockwise turn along three edges of the mesh patch, and the measurement point will appear on the left and right sides of the travel path at the same time.
Based on the above principle, comparing and judging the data information of each grid patch in the STL file in sequence, that is, judging and acquiring the data information of the only grid patch where the measurement point is located, and driving the movement of the measuring head for precision detection by using the patch normal vector direction, as shown in fig. 4, the method includes the following steps:
step A: acquiring patch data of each mesh patch in the STL file one by one;
in step a, acquiring patch data of each mesh patch in the STL file one by one specifically includes:
sequentially extracting the data code of each grid patch in the STL file, and performing data conversion on the extracted data code;
and obtaining three-dimensional coordinates of three vertexes of the currently selected mesh patch according to the converted data.
As shown in fig. 6, as known from the above conventional technology, the data information of each mesh patch is randomly arranged one by one inside the STL file, and the data information of each mesh patch is composed of 7 lines of codes. Acquiring patch data in the STL file one by one, namely sequentially extracting 7 rows of data codes in the STL file and performing data conversion on the codes; the 7-row data code for each extraction corresponds to one mesh patch as follows:
Figure BDA0003142472910000111
the 3 rd line to the 5 th line correspond to three vertexes of the current patch respectively, and three data after each line of code English characters 'vertex' are spaced by a space and correspond to x, y and z coordinates of each vertex respectively. Therefore, three-dimensional coordinates of three vertexes of the currently selected mesh patch can be obtained after data code conversion based on each mesh patch in the STL file, wherein the three-dimensional coordinates are respectively v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、 v3(v3x,v3y,v3z) Vector of normal vector
Figure BDA0003142472910000121
And B: determining a plurality of traveling starting points and a plurality of sections of traveling paths of the currently selected mesh patch;
in the present embodiment, since the mesh patch is a triangular mesh patch, there are three vertices v1、v2、v3The travel path is v1→v2→v3→v1The circulation direction of (a), i.e., the counterclockwise direction viewed from the normal vector of the patch; the traveling path is divided into three sections, so that the position relation between the measuring point and each traveling path is judged by vector cross product and dot product operation of the vector of each traveling path and the connecting line vector of the current traveling starting point and the measuring point, and the traveling starting point of each traveling path is determined;
and C: acquiring a connecting line vector of a current advancing starting point and a measuring point, performing vector cross product operation on the connecting line vector and a vector of a current advancing path, performing point multiplication on a result of the vector cross product operation and a normal vector of a currently selected mesh patch, and judging the position relation between the measuring point and the current advancing path according to a point multiplication result;
repeating the step B and the step C until the position relation between the measuring point and each section of the travel path is obtained;
it should be noted that the travel path in this embodiment may be divided into v in the counterclockwise direction when viewed from the top according to the normal vector of the patch1→v2、v2→v3、v3→v1When the measuring point is always in the same direction with respect to the traveling path as viewed in the direction, the measuring point will be located to the left of the traveling path, that is, the content described below in this embodiment; if the advancing path is at different angles and different hour directions according to the normal vector of the patch, the measuring point can be positioned not only at the left side of the advancing path but also at the right side of the advancing path, and the specific situation needs to be judged according to the actual production requirement; the method can be used for judging only by keeping the measuring points in the same direction relative to the three sections of the travelling paths respectively;
preferably, in the step B, determining a plurality of travel starting points and a plurality of travel paths of the currently selected mesh patch includes:
step B1: taking the first vertex of the currently selected mesh patch as a current traveling starting point, taking a path from the first vertex to the second vertex as a current traveling path, and executing the step C to determine the position relationship between the measuring point and the current traveling path;
step B2: taking the second vertex of the currently selected mesh patch as a current traveling starting point, taking a path from the second vertex to the third vertex as a current traveling path, and executing the step C to determine the position relationship between the measuring point and the current traveling path;
step B3: and C, taking the third vertex of the currently selected mesh patch as the current traveling starting point, taking the path from the third vertex to the first vertex as the current traveling path, and executing the step C to determine the position relation between the measuring point and the current traveling path.
Preferably, as shown in FIG. 4, FIG. 4 is a view showing v in the present embodiment1As a starting point of travel, v1→v2In step C, a vector cross product map of the travel path is used: acquiring a connecting line vector of a current traveling starting point and a measuring point, and performing vector cross product operation on the connecting line vector and a vector of a current traveling path, wherein the method specifically comprises the following steps:
when the step B1 is executed, performing a vector cross product operation according to formula one;
the formula I is as follows:
Figure BDA0003142472910000131
wherein:
the three vertexes of the currently selected mesh patch are sequentially ordered as v along the right-hand spiral direction of the normal vector of the patch1、v2、v3Three-dimensional coordinates of three vertices are v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、 v3(v3x,v3y,v3z);
The three-dimensional coordinate of the measurement point P is (P)x,Py,Pz);
Figure BDA0003142472910000132
A vector representing a current path of travel;
Figure BDA0003142472910000141
indicating the current travel starting point v1A line vector with the measurement point P;
Figure BDA0003142472910000142
to meet
Figure BDA0003142472910000143
To
Figure BDA0003142472910000144
The unit vector of the right-hand rule is necessarily parallel to the normal vector of the currently selected grid patch;
∠Pv1v2to represent
Figure BDA0003142472910000145
And
Figure BDA0003142472910000146
the included angle of (a).
Preferably, in the step C: obtaining a connecting line vector of a current traveling starting point and a measuring point, and performing vector cross product operation on the connecting line vector and a vector of a current traveling path, wherein the method specifically comprises the following steps:
when the step B2 is executed, performing a vector cross product operation according to formula two;
the formula II is as follows:
Figure BDA0003142472910000147
wherein:
the three vertexes of the currently selected mesh patch are sequentially ordered as v along the right-hand spiral direction of the normal vector of the patch1、v2、v3Three-dimensional coordinates of three vertices are v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、 v3(v3x,v3y,v3z);
The three-dimensional coordinate of the measurement point P is (P)x,Py,Pz);
Figure BDA0003142472910000148
A vector representing a current path of travel;
Figure BDA0003142472910000149
indicating the current travel starting point v2A line vector with the measurement point P;
Figure BDA00031424729100001410
to meet
Figure BDA00031424729100001411
To
Figure BDA00031424729100001412
The unit vector of the right-hand rule is necessarily parallel to the normal vector of the currently selected grid patch;
∠Pv2v3to represent
Figure BDA00031424729100001413
And
Figure BDA00031424729100001414
the included angle of (a).
Preferably, in the step C: obtaining a connecting line vector of a current traveling starting point and a measuring point, and performing vector cross product operation on the connecting line vector and a vector of a current traveling path, wherein the method specifically comprises the following steps:
when the step B3 is executed, carrying out vector cross product operation according to formula three;
the formula III is as follows:
Figure BDA0003142472910000151
wherein:
the three vertexes of the currently selected mesh patch are sequentially ordered as v along the right-hand spiral direction of the normal vector of the patch1、v2、v3Three-dimensional coordinates of three vertices are v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、 v3(v3x,v3y,v3z);
The three-dimensional coordinate of the measurement point P is (P)x,Py,Pz);
Figure BDA0003142472910000152
A vector representing a current path of travel;
Figure BDA0003142472910000153
indicating the current travel starting point v3A line vector with the measurement point P;
Figure BDA0003142472910000154
to meet
Figure BDA0003142472910000155
To
Figure BDA0003142472910000156
The unit vector of the right-hand rule is necessarily parallel to the normal vector of the currently selected grid patch;
∠Pv3v1to represent
Figure BDA0003142472910000157
And
Figure BDA0003142472910000158
the included angle of (a).
Preferably, in the step C, performing a dot product on a result of the vector cross product operation and a patch normal vector of the currently selected mesh patch, specifically including:
when step B1 is executed, dot product is performed according to formula four;
the formula four is as follows:
Figure BDA0003142472910000161
when step B2 is performed, a dot product is performed according to the formula five:
the formula five is as follows:
Figure BDA0003142472910000162
when step B3 is performed, a dot product is performed according to the formula six:
formula six:
Figure BDA0003142472910000163
wherein:
Figure BDA0003142472910000164
represents the normal vector of the currently selected grid patch and has three-dimensional coordinates of
Figure BDA0003142472910000165
Preferably, in the step C, the determining the position relationship between the measurement point and the current travel path according to the dot product result specifically includes:
if the dot product result is a positive number, the vector obtained by the vector cross product operation result is in the same direction as the normal vector of the patch;
if the dot product result is negative, the vector obtained by the vector cross product operation result is opposite to the normal vector of the patch;
when the vector obtained by the vector cross product operation result is in the same direction with the normal vector of the patch:
∠Pv1v2∈0°~180°,sin∠Pv1v2> 0, the measurement point P is located on the travel path v1→v2To the left of (1);
∠Pv2v3∈0°~180°,sin∠Pv2v3> 0, the measurement point P is located on the travel path v2→v3To the left of (1);
∠Pv3v1∈0°~180°,sin∠Pv3v1> 0, the measurement point P is located on the travel path v3→v1To the left of (1);
when the vector obtained by the vector cross product operation result is in the same direction with the normal vector of the patch:
∠Pv1v2∈-180°~0°,sin∠Pv1v2< 0, the measurement point P is located on the travel path v1→v2To the right of (1);
∠Pv2v3∈-180°~0°,sin∠Pv2v3< 0, the measurement point P is located on the travel path v2→v3To the right of (1);
∠Pv3v1∈-180°~0°,sin∠Pv3v1< 0, the measurement point P is located on the travel path v3→v1To the right of (c).
In the present embodiment, the angle Pv is defined as ≈ Pv1v2For example, if the measuring point is at the left of the traveling path, angle Pv1v2Is 0 to 180 degrees, sin & lt Pv1v2If the vector cross product is more than 0, the vector obtained by vector cross product calculation is in the same direction with the normal vector of the patch; on the contrary, if the measuring point is at the right of the traveling path, the angle Pv1v2Is-180-0 degrees, sin & lt Pv1v2If the vector cross product is less than 0, the vector obtained by vector cross product calculation is opposite to the normal vector of the patch;
∠Pv2v3and Pv3v1The same process is carried out;
therefore, can be judged by-1v2、∠Pv2v3And Pv3v1To determine whether the measurement point is located at the left side of the traveling path, and the determination of the angle cannot pass sin & lt Pv1v2、sin∠Pv2v3、 sin∠Pv3v1Because the angle may be a negative angle when the value of the sin trigonometric function is positive, it is not sufficient to judge by the operation result of the vector cross product; when the vector obtained by vector cross product calculation is in the same direction with the normal vector of the patch, the interval of the angle is necessarily 0-180 degrees, and when the vector obtained by vector cross product calculation is opposite to the normal vector of the patch, the interval of the angle is necessarily-180-0 degrees, so that the interval of the angle can be judged by judging whether the vector obtained by vector cross product is in the same direction with the normal vector of the mesh patch, thereby judging the relation between the measuring point and the traveling path, judging whether the vector obtained by vector cross product is in the same direction with the normal vector of the mesh patch, and judging whether the vector obtained by vector cross product is in the same direction with the normal vector of the mesh patch by multiplying the vector obtained by vector cross product with the normal vector of the mesh patch, when the result of point multiplication is positive, the vector obtained by vector cross product is in the same direction with the normal vector of the mesh patch, and when the result of point multiplication is negative, the vector obtained by vector cross product is opposite to the normal vector of the mesh patch.
Step D: judging whether the currently selected grid surface patch is the grid surface patch corresponding to the measuring point or not according to the position relation between the measuring point and each section of the path, if so, entering the step E, otherwise, reselecting a new grid surface patch, and returning to the step B;
and when the measuring points always keep the same direction relative to each section of the traveling path, the currently selected grid patch is the grid patch corresponding to the measuring point.
In the present embodiment, when the measurement points P are all located on the travel path v1→v2、v2→v3、v3→v1When the measurement point P is the left side of the grid surface patch, the currently selected grid surface patch is the grid surface patch corresponding to the measurement point P;
step E: and acquiring the normal vector direction of the grid surface patch to drive the measuring head to move.
Preferably, in the step E, the method specifically includes:
extracting data codes of the mesh patches corresponding to the measuring points in the STL file;
acquiring the normal vector direction of the grid patch corresponding to the measuring point and the x, y and z axial numerical values of the normal vector according to the data code;
and driving the measuring head with the precision detection to move according to the acquired axial numerical value.
Since the purpose of the present application is to determine the grid patch where the measurement point is located according to the position of the known measurement point, and the data of the grid patch is stored in the STL file, after the grid patch is determined, the normal vector direction of the grid patch and the x, y, and z axial values of the normal vector can be obtained from the STL file, and the probe for precision detection can be driven to move based on these values.
By the aid of the technology, direct data processing operation of the triangular mesh model corresponding to the STL file can be achieved, the outer normal vector direction of the measuring point corresponding to the model outline can be quickly obtained, and the measuring head for precision detection can be effectively driven to move.
The technical principle of the present invention is described above in connection with specific embodiments. The description is made for the purpose of illustrating the principles of the invention and should not be construed in any way as limiting the scope of the invention. Based on the explanations herein, those skilled in the art will be able to conceive other specific embodiments of the present invention without inventive efforts, which shall fall within the scope of the present invention.

Claims (10)

1. The vector cross multiplication-based mesh patch retrieval method facing to the measurement points of the curved surface part is characterized by comprising the following steps of: the method comprises the following steps:
step A: acquiring patch data of each mesh patch in the STL file one by one;
and B: determining a plurality of traveling starting points and a plurality of sections of traveling paths of the currently selected mesh patch;
and C: acquiring a connecting line vector of a current traveling starting point and a measuring point, performing vector cross product operation on the connecting line vector and a vector of a current traveling path, performing point multiplication on a result of the vector cross product operation and a normal vector of a patch of a currently selected grid patch, and judging a position relation between the measuring point and the current traveling path according to a point multiplication result;
repeating the step B and the step C until the position relation between the measuring point and each section of the travel path is obtained;
step D: judging whether the currently selected grid surface patch is the grid surface patch corresponding to the measuring point or not according to the position relation between the measuring point and each section of the path, if so, entering the step E, otherwise, reselecting a new grid surface patch, and returning to the step B;
step E: and acquiring the normal vector direction of the grid surface patch to drive the measuring head to move.
2. The method for retrieving the mesh patch facing the measurement point of the curved surface part based on the vector cross product as claimed in claim 1, wherein:
in step a, acquiring patch data of each mesh patch in the STL file one by one specifically includes:
sequentially extracting the data code of each grid patch in the STL file, and performing data conversion on the extracted data code;
and obtaining three-dimensional coordinates of three vertexes of the currently selected mesh patch according to the converted data.
3. The method for retrieving the mesh patch based on the vector cross product and facing the measurement point of the curved surface part as claimed in claim 2, wherein:
in step B, determining a plurality of travel starting points and a plurality of travel paths of the currently selected mesh patch includes:
step B1: taking the first vertex of the currently selected mesh patch as a current traveling starting point, taking a path from the first vertex to the second vertex as a current traveling path, and executing the step C to determine the position relation between the measuring point and the current traveling path;
step B2: taking the second vertex of the currently selected mesh patch as the current traveling starting point, taking the path from the second vertex to the third vertex as the current traveling path, and executing the step C to determine the position relationship between the measuring point and the current traveling path;
step B3: and C, taking the third vertex of the currently selected mesh patch as the current traveling starting point, taking the path from the third vertex to the first vertex as the current traveling path, and executing the step C to determine the position relation between the measuring point and the current traveling path.
4. The method for retrieving the mesh patch based on the vector cross product and facing the measurement point of the curved surface part as claimed in claim 3, wherein:
in the step C: acquiring a connecting line vector of a current traveling starting point and a measuring point, and performing vector cross product operation on the connecting line vector and a vector of a current traveling path, wherein the method specifically comprises the following steps:
when the step B1 is executed, performing a vector cross product operation according to formula one;
the formula I is as follows:
Figure FDA0003142472900000021
wherein:
the three vertexes of the currently selected mesh patch are sequentially ordered as v along the right-hand spiral direction of the normal vector of the patch1、v2、v3Three-dimensional coordinates of three vertices are v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、v3(v3x,v3y,v3z);
The three-dimensional coordinate of the measurement point P is (P)x,Py,Pz);
Figure FDA0003142472900000031
A vector representing a current path of travel;
Figure FDA0003142472900000032
a link vector representing the current travel starting point v1 and the measurement point P;
Figure FDA0003142472900000033
to meet
Figure FDA0003142472900000034
To
Figure FDA0003142472900000035
The unit vector of the right-hand rule is necessarily parallel to the normal vector of the currently selected grid patch;
∠Pv1v2to represent
Figure FDA0003142472900000036
And
Figure FDA0003142472900000037
the included angle of (a).
5. The method for retrieving the mesh patch based on the vector cross product and facing the measurement point of the curved surface part as claimed in claim 4, wherein:
in the step C: acquiring a connecting line vector of a current traveling starting point and a measuring point, and performing vector cross product operation on the connecting line vector and a vector of a current traveling path, wherein the method specifically comprises the following steps:
when the step B2 is executed, performing a vector cross product operation according to formula two;
the formula II is as follows:
Figure FDA0003142472900000038
wherein:
right-handed helical square of three vertices of currently selected mesh patch along patch normal vectorRank order is v1、v2、v3Three-dimensional coordinates of three vertices are v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、v3(v3x,v3y,v3z);
The three-dimensional coordinate of the measurement point P is (P)x,Py,Pz);
Figure FDA0003142472900000039
A vector representing a current path of travel;
Figure FDA0003142472900000041
indicating the current travel starting point v2A line vector with the measurement point P;
Figure FDA0003142472900000042
to meet
Figure FDA0003142472900000043
To
Figure FDA0003142472900000044
The unit vector of the right-hand rule is necessarily parallel to the normal vector of the currently selected grid patch;
∠Pv2v3to represent
Figure FDA0003142472900000045
And
Figure FDA0003142472900000046
the included angle of (a).
6. The method for retrieving the mesh patch based on the vector cross product and facing the measurement point of the curved surface part as claimed in claim 5, wherein:
in the step C: acquiring a connecting line vector of a current traveling starting point and a measuring point, and performing vector cross product operation on the connecting line vector and a vector of a current traveling path, wherein the method specifically comprises the following steps:
when the step B3 is executed, carrying out vector cross product operation according to formula three;
the formula III is as follows:
Figure FDA0003142472900000047
wherein:
the three vertexes of the currently selected mesh patch are sequentially ordered as v along the right-hand spiral direction of the normal vector of the patch1、v2、v3Three-dimensional coordinates of three vertices are v1(v1x,v1y,v1z)、v2(v2x,v2y,v2z)、v3(v3x,v3y,v3z);
The three-dimensional coordinate of the measurement point P is (P)x,Py,Pz);
Figure FDA0003142472900000048
A vector representing a current path of travel;
Figure FDA0003142472900000049
indicating the current travel starting point v3A line vector with the measurement point P;
Figure FDA00031424729000000410
to meet
Figure FDA00031424729000000411
To
Figure FDA00031424729000000412
The unit vector of the right-hand rule is necessarily parallel to the normal vector of the currently selected grid patch;
∠Pv3v1to represent
Figure FDA0003142472900000051
And
Figure FDA0003142472900000052
the included angle of (a).
7. The method for retrieving the mesh patch based on the vector cross product and facing the measurement point of the curved surface part as claimed in claim 6, wherein:
in the step C, performing dot multiplication on the result of the vector cross product operation and the normal vector of the currently selected mesh patch, which specifically includes:
when step B1 is executed, dot product is performed according to formula four;
the formula four is as follows:
Figure FDA0003142472900000053
when step B2 is performed, a dot product is performed according to the formula five:
the formula five is as follows:
Figure FDA0003142472900000054
when step B3 is performed, a dot product is performed according to the formula six:
formula six:
Figure FDA0003142472900000055
wherein:
Figure FDA0003142472900000056
represents the normal vector of the currently selected grid patch and has three-dimensional coordinates of
Figure FDA0003142472900000057
8. The method for retrieving the mesh patch based on the vector cross product and facing the measurement point of the curved surface part as claimed in claim 7, wherein:
in the step C, the determining the position relationship between the measurement point and the current travel path according to the result of the point multiplication specifically includes:
if the dot product result is a positive number, the vector obtained by the vector cross product operation result is in the same direction as the normal vector of the patch;
if the dot product result is negative, the vector obtained by the vector cross product operation result is opposite to the normal vector of the patch;
when the vector obtained by the vector cross product operation result is in the same direction with the normal vector of the patch:
∠Pv1v2∈0°~180°,sin∠Pv1v2> 0, the measurement point P is located on the travel path v1→v2To the left;
∠Pv2v3∈0°~180°,sin∠Pv2v3> 0, the measurement point P is located on the travel path v2→v3To the left;
∠Pv3v1∈0°~180°,sin∠Pv3v1> 0, the measurement point P is located on the travel path v3→v1To the left;
when the vector obtained by the vector cross product operation result is in the same direction with the normal vector of the patch:
∠Pv1v2∈-180°~0°,sin∠Pv1v2< 0, the measurement point P is located on the travel path v1→v2To the right of (c);
∠Pv2v3∈-180°~0°,sin∠Pv2v3< 0, the measurement point P is located on the travel path v2→v3To the right of (c);
∠Pv3v1∈-180°~0°,sin∠Pv3v1< 0, the measurement point P is located on the travel path v3→v1To the right of (c).
9. The method for retrieving the mesh patch facing the measurement point of the curved surface part based on the vector cross product as claimed in claim 1, wherein:
in the step D, determining whether the currently selected mesh patch is the mesh patch corresponding to the measurement point according to the position relationship between the measurement point and each segment of the path, specifically including:
and when the measuring points always keep the same direction relative to each section of the traveling path, the currently selected grid patch is the grid patch corresponding to the measuring point.
10. The method for retrieving the mesh patch facing the measurement point of the curved surface part based on the vector cross product as claimed in claim 1, wherein:
in the step E, the method specifically includes:
extracting data codes of the mesh patches corresponding to the measuring points in the STL file;
acquiring the normal vector direction of the grid patch corresponding to the measuring point and the x, y and z axial numerical values of the normal vector according to the data code;
and driving the measuring head with the precision detection to move according to the acquired axial numerical value.
CN202110745123.8A 2021-06-30 2021-06-30 Vector cross-multiplication-based grid surface patch retrieval method for curved surface part measurement points Pending CN113626944A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110745123.8A CN113626944A (en) 2021-06-30 2021-06-30 Vector cross-multiplication-based grid surface patch retrieval method for curved surface part measurement points

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110745123.8A CN113626944A (en) 2021-06-30 2021-06-30 Vector cross-multiplication-based grid surface patch retrieval method for curved surface part measurement points

Publications (1)

Publication Number Publication Date
CN113626944A true CN113626944A (en) 2021-11-09

Family

ID=78378867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110745123.8A Pending CN113626944A (en) 2021-06-30 2021-06-30 Vector cross-multiplication-based grid surface patch retrieval method for curved surface part measurement points

Country Status (1)

Country Link
CN (1) CN113626944A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116304484A (en) * 2023-01-10 2023-06-23 广东科学技术职业学院 High-precision estimation method and system for grid model vertex normal vector

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107330142A (en) * 2017-05-23 2017-11-07 天津大学 A kind of measuring point method arrow evaluation method of On-machine Test based on STL models
CN111783260A (en) * 2020-08-14 2020-10-16 广东科学技术职业学院 STL file-oriented section contour line segment connection method
CN112686945A (en) * 2021-01-11 2021-04-20 阿坝州自然资源与科技信息研究所 Web-based three-dimensional terrain surface area measurement method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107330142A (en) * 2017-05-23 2017-11-07 天津大学 A kind of measuring point method arrow evaluation method of On-machine Test based on STL models
CN111783260A (en) * 2020-08-14 2020-10-16 广东科学技术职业学院 STL file-oriented section contour line segment connection method
CN112686945A (en) * 2021-01-11 2021-04-20 阿坝州自然资源与科技信息研究所 Web-based three-dimensional terrain surface area measurement method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
姜晓峰,李云飞: "计算机数控加工仿真中误差检测技术的研究与实现", 小型微型计算机系统, no. 07, pages 886 - 889 *
雅典娜的棒槌: "判断点是否在三角形内 3D-2D", pages 1 - 2, Retrieved from the Internet <URL:https://www.jianshu.com/p/f3872d5c6f22》> *
高健;陈岳坪;邓海祥;杨泽鹏;陈新;: "复杂曲面零件加工精度的原位检测误差补偿方法", 机械工程学报, no. 19, pages 133 - 143 *
高珊等: "面向 STL 模型的在机检测系统测点法矢计算", 《机械科学与技术》, vol. 37, no. 8, pages 1231 - 1233 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116304484A (en) * 2023-01-10 2023-06-23 广东科学技术职业学院 High-precision estimation method and system for grid model vertex normal vector
CN116304484B (en) * 2023-01-10 2023-11-17 广东科学技术职业学院 High-precision estimation method and system for grid model vertex normal vector

Similar Documents

Publication Publication Date Title
CN109993827B (en) Elevation view identification method for converting building drawing into three-dimensional BIM model
Zhang et al. Reference pose generation for long-term visual localization via learned features and view synthesis
CN112241997B (en) Three-dimensional model building and repairing method and system based on multi-scale point cloud up-sampling
Qiu et al. Pipe-run extraction and reconstruction from point clouds
JP2009129189A (en) Object recognition method
Croce et al. Connecting geometry and semantics via artificial intelligence: from 3D classification of heritage data to H-BIM representations
CN108230452A (en) A kind of model filling-up hole method based on textures synthesis
CN113838005A (en) Intelligent rock fracture identification and three-dimensional reconstruction method and system based on dimension conversion
CN114359226A (en) Three-dimensional model set visual area extraction method based on hierarchical superposition and region growth
CN112613551A (en) Automobile part identification method, storage medium and system
CN113626944A (en) Vector cross-multiplication-based grid surface patch retrieval method for curved surface part measurement points
Tabb et al. Fast and robust curve skeletonization for real-world elongated objects
Phan et al. Triangulation based skeletonization and trajectory recovery for handwritten character patterns
Milde et al. Building reconstruction using a structural description based on a formal grammar
Shin et al. Analyzing Fracture Patterns in TheranWall Paintings.
Li et al. Automated bridge crack detection based on improving encoder–decoder network and strip pooling
CN116452826A (en) Coal gangue contour estimation method based on machine vision under shielding condition
Son et al. Automatic 3D reconstruction of as-built pipeline based on curvature computations from laser-scanned data
CN113378324A (en) Grid surface patch retrieval method based on included angle method and oriented to curved surface part measuring points
CN110633517B (en) Efficient slicing method for three-dimensional scene
CN113378325A (en) Area method-based grid patch retrieval method for curved surface part measuring points
Gao et al. A new method for repeated localization and matching of tunnel lining defects
Wang et al. Structured Building Extraction from High-Resolution Satellite Images with a Hybrid Convolutional Neural Network
Yang et al. Surface Defect-Extended BIM Generation Leveraging UAV Images and Deep Learning
CN110991308A (en) Method for rapidly identifying and extracting thread characteristics and parameters in three-dimensional 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