CN116883685A - STEP file analysis-based vehicle body part characteristic information acquisition method - Google Patents

STEP file analysis-based vehicle body part characteristic information acquisition method Download PDF

Info

Publication number
CN116883685A
CN116883685A CN202310913723.XA CN202310913723A CN116883685A CN 116883685 A CN116883685 A CN 116883685A CN 202310913723 A CN202310913723 A CN 202310913723A CN 116883685 A CN116883685 A CN 116883685A
Authority
CN
China
Prior art keywords
point
functional
functional surface
parameter
value
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
CN202310913723.XA
Other languages
Chinese (zh)
Inventor
许源平
唐聃
孔超
张朝龙
曹衍龙
李涂鲲
罗钧鼎
付红圣
徐俊鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Chengdu University of Information Technology
Shandong Industrial Technology Research Institute of ZJU
Weilai Automobile Technology Anhui Co Ltd
Original Assignee
Zhejiang University ZJU
Chengdu University of Information Technology
Shandong Industrial Technology Research Institute of ZJU
Weilai Automobile Technology Anhui Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University ZJU, Chengdu University of Information Technology, Shandong Industrial Technology Research Institute of ZJU, Weilai Automobile Technology Anhui Co Ltd filed Critical Zhejiang University ZJU
Priority to CN202310913723.XA priority Critical patent/CN116883685A/en
Publication of CN116883685A publication Critical patent/CN116883685A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/11Complex mathematical operations for solving equations, e.g. nonlinear equations, general mathematical optimization problems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Mathematical Optimization (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Algebra (AREA)
  • Operations Research (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Generation (AREA)

Abstract

本发明公开了一种基于STEP文件解析的车身零件特征信息获取方法,其包括获取车身零件的STEP文件,基于STEP文件中边的参数信息提取边的边界离散点;将功能面转换为NURBS曲面,采用拟牛顿法计算获取边界离散点在参数域内的取值,之后采用射线法对NURBS曲面进行裁剪得到面点云,将面点云转换到原有空间;采用主成分分析法获取功能面的局部坐标,计算功能面的每个面点云到局部坐标系的z轴所在平面的距离;确定功能面的类型及两个功能面是否垂直;根据功能面的边界类型、面类型、与邻面是否垂直和法向穿过面的数量,采用朴素贝叶斯分类器得到功能面类型。

The invention discloses a method for obtaining feature information of vehicle body parts based on STEP file analysis, which includes obtaining the STEP file of the vehicle body part, extracting edge boundary discrete points based on the edge parameter information in the STEP file; converting the functional surface into a NURBS surface, The quasi-Newton method is used to calculate and obtain the values of boundary discrete points in the parameter domain, and then the ray method is used to clip the NURBS surface to obtain the surface point cloud, and the surface point cloud is converted to the original space; the principal component analysis method is used to obtain the local part of the functional surface Coordinates, calculate the distance from each surface point cloud of the functional surface to the plane where the z-axis of the local coordinate system is located; determine the type of the functional surface and whether the two functional surfaces are perpendicular; according to the boundary type of the functional surface, the surface type, and whether it is with the adjacent surface The number of vertical and normal crossing surfaces, and the functional surface type is obtained using a naive Bayes classifier.

Description

STEP file analysis-based vehicle body part characteristic information acquisition method
Technical Field
The invention relates to a feature recognition technology, in particular to a vehicle body part feature information acquisition method based on STEP file analysis.
Background
The information acquisition of the CAD (Computer Aided Design) model is critical to the design to manufacturing conversion. In some automatic projects, for example, automatic positioning of a reference, the reference is usually required to determine the position of the reference according to some external avoidance features of the part, if the identification of the features is inaccurate, the type division of the functional surface is inaccurate, so that the reference is inaccurate to select, and finally, a larger error occurs in the production of the vehicle body part. Most feature recognition today is more based on the secondary development of industrial software, which greatly limits the flexibility of information transfer. The STEP (Standard for the Exchange of Product Model Data) file-based information acquisition method is a popular CAD model geometric information acquisition method in recent years, and the geometric information is acquired through an open source library OPENCASCADE or PythonOCC.
The feature recognition methods at the present stage can be mainly divided into three categories: the method is characterized in that the method is characterized by utilizing a boundary matching method, the method is characterized by utilizing three-dimensional decomposition, and the method is characterized by utilizing a mapping from a processing surface to a processing resource, wherein the most common method is the boundary matching method, and the core of the idea is to match the characteristic elements in the existing statistical knowledge base with the model of the characteristic to be identified.
The method can only preliminarily achieve the recognition of avoidance features in the CAD model, but the personalized feature definition method is high in pertinence and difficult to popularize. The disadvantages of the current solutions are summarized in the following ways:
depending on the resolution of the third party library, some of the surface attributes, especially the plane and surface distinction, cannot be corrected from the bottom layer, and these ambiguous attributes reduce the recognition accuracy. The robustness of the graph-based matching method is poor, and effective identification of some composite features and complex features is difficult.
Disclosure of Invention
Aiming at the defects in the prior art, the method for acquiring the characteristic information of the vehicle body part based on STEP file analysis solves the problem that the identification accuracy is low due to the ambiguity attribute of the existing characteristic identification.
In order to achieve the aim of the invention, the invention adopts the following technical scheme:
the invention provides a vehicle body part characteristic information acquisition method based on STEP file analysis, which comprises the following STEPs:
s1, acquiring an STEP file of a vehicle body part, reading parameter information of various sides in the STEP file, and extracting boundary discrete points of the sides based on the parameter information of the sides and a parameter equation corresponding to the parameter information of the sides;
s2, converting all functional surfaces in the STEP file into NURBS curved surfaces, and calculating the value of boundary discrete points of each edge in the parameter domain of the NURBS curved surfaces by adopting a quasi-Newton method;
s3, clipping the NURBS curved surface corresponding to the functional surface by adopting a ray method according to the value of the boundary discrete point of the functional surface in the parameter domain to obtain a surface point cloud, and converting the surface point cloud of each functional surface into an original space;
s4, acquiring local coordinates of each functional surface by adopting a principal component analysis method, and calculating the distance from the surface point cloud of the functional surface to the plane where the z-axis of the local coordinate system is located;
s5, determining the type of the functional surface according to the distance between the functional surfaces; determining whether the functional surface is vertical to the adjacent surface according to the relation between any two functional surfaces;
s6, reading the number of normal passing surfaces and the boundary types of the functional surfaces in the STEP file, inputting the boundary types, the surface types, whether the boundary types are perpendicular to the adjacent surfaces or not and the number of normal passing surfaces into a naive Bayesian classifier, and calculating the probability that the functional surfaces belong to each category to obtain the functional surface types.
Further, the functional surface includes a plurality of edges, and the parametric equations of the solid straight line and the NURBS curve of the edges are respectively:
p straight line =[1 t]*[o Original source d] T
wherein ,pStraight line Is a straight line parameter equation; t is the length parameter of a straight line, o Original source Is the origin of the straight line; d is the direction of the straight line; [] T Is a transposition; p (k) is NURBS curveIs a parameter equation of (2); n (N) i,m (k),N i,m-1(k) and Ni+1,m-1 (k) Are all base functions, N i,0 (k) A value of a base function which is the ith and has an order of 0; w (w) i Is the weight; p (P) i Is a control point; k (k) i 、k i+1 、k i+m k i+m+1 All are parameters; m is the order.
The beneficial effects of the technical scheme are as follows: the method is beneficial to automatic acquisition of the features, the recognition accuracy of the features is increased under the condition of automation, the accuracy of reference positioning is further enhanced, and the rapid generation of the process is facilitated.
Further, the method for extracting the boundary discrete points of the solid circular line of the edge comprises the following steps:
a1, randomly taking direction vectors of the global x, y and z axes to carry out cross multiplication with the normal n of a circle, judging whether the cross multiplication result is equal to zero, if so, repeating the step A1, otherwise, entering the step A2;
a2, setting a direction vector as an a direction, and cross-multiplying a normal n of a circle with the a direction to obtain a b direction; adopting a, b and N as local coordinate systems of circular lines, and projecting the circular lines into a two-dimensional plane according to the N direction;
a3, removing the z axis in the local coordinate system to obtain the coordinates of the starting point and the end point of the circular line on the two-dimensional plane, and calculating the sine value v by adopting the coordinates of the starting point and the end point 1 Sum cosine value v 2
A4, according to sine value v 1 Sum cosine value v 2 Calculating a circular line angle theta:
a5, extracting boundary discrete points of the circular line by adopting a parameter equation of the circular line according to the angle theta of the circular line, wherein the parameter equation of the circular line is as follows:
p round circle =[1 rcosθ rsinθ]*[o Heart shape a b] T
wherein ,pRound circle A straight line parameter equation which is a circle; r is the radius of the circle; o (o) Heart shape Is the center of a circle; a and b are respectively perpendicular to each other and perpendicular to a circleTwo direction vectors normal to the line.
The beneficial effects of the technical scheme are as follows: the above manner can generate discrete points of the circular line in the three-dimensional space more simply and accurately.
Further, the conversion formulas for converting all the functional surfaces in the STEP file into NURBS curved surfaces and converting the surface point cloud of each functional surface into the original space are as follows:
wherein p (u, v) is the value of each point of the NURBS surface; n (N) i,m (u) is a u-direction basis function; n (N) j,n (v) Is a basis function in the v direction; w (w) i,j Is the weight; p (P) i,j To control a lattice of points.
Further, the method for calculating the value of the boundary discrete point of each edge in the parameter domain of the NURBS curved surface by adopting the quasi-Newton method comprises the following steps:
s21, selecting any boundary point [ x ] on the edge of the functional surface i ,y i ,z i ]I=0, 1,2, … f, and taking the corresponding NURBS surface and boundary point [ x ] i ,y i ,z i ]The nearest point P takes the corresponding value u of the point P in the parameter domain i and vi As an initial value of the newton iterative method;
s21, selecting any boundary point [ x ] on the edge of the functional surface i ,y i ,z i ]I=0, 1,2, … f, and taking the corresponding NURBS surface and boundary point [ x ] i ,y i ,z i ]The nearest point P takes the corresponding value u of the point P in the parameter domain i and vi As an initial value of the newton iterative method;
s22, acquiring a target optimization function, and when the target optimization function is equal to zero, obtaining an optimal value of a point P in a parameter domain, wherein a calculation formula of the target optimization function is as follows:
l(u,v)=[p(u,v)-P][p(u,v)-P] T
wherein l (u, v) is a target optimization function;
s23, adopting the optimal value asParameter q c Initial value q 0 =[u 0 ,v 0 ] T Initializing gradient g c And a symmetrical positive definite matrix B c C is more than or equal to 0; gradient g c Initial value g 0 The method comprises the following steps:
wherein ,lu (u 0 ,v 0 ) To optimize u in the function for the target 0 Obtaining a deflection guide; l (L) v (u 0 ,v 0 ) To optimize v in the function for the target 0 Obtaining a deflection guide;
s24, according to gradient g c And a symmetrical positive definite matrix B c Calculate the parameter q c+1
wherein ,λi Is the step length of the edge; q c+1 =[u c+1 ,v c+1 ] T Is the parameter at the c+1th iteration; u (u) c+1 ,v c+1 The parameters of Newton iteration method in the c+1th iteration;
s25, updating the gradient matrix:
wherein ,gc+1 Is the parameter at the c+1th iteration; l (L) u (u c+1 ,v c+1 ) To optimize u in the function for the target c+1 Obtaining a deflection guide; l (L) v (u c+1 ,v c+1 ) To optimize v in the function for the target c+1 Obtaining a deflection guide;
s26, symmetrical positive definite matrix B c+1 Updating:
S c =q c+1 -q c ,Y c =g c+1 -g c
wherein ,Yc and sc Are all intermediate parameters; y is Y c T Is Y c Is a transpose of (2); g c+1 A gradient at iteration c+1st; b (B) c+1 and Bc Are symmetrical positive definite matrixes in the c+1 and c iterations;
s27, judging II g c+1 II is greater than or equal to a threshold epsilon, if so, c=c+1, and returning to the step S24; otherwise output q c+1 Is the boundary point (x i ,y i ,z i ) An optimal value in the parameter domain, and proceeds to step S28;
s28, judging whether i is greater than or equal to f, if so, all boundary points (x i ,y i ,z i ) The optima in the parameter domain have all been found, otherwise let i=i+1, and return to step S21.
The beneficial effects of the technical scheme are as follows: by adopting the cutting mode, the free-form surface can be cut more quickly and accurately under the condition of reducing the calculation complexity.
Further, the method for acquiring the local coordinate system of each functional surface by adopting the principal component analysis method comprises the following steps:
calculating characteristic values according to the surface point cloud on the functional surface:
wherein , and />Respectively is a function ofAn average value of X coordinate values and Y coordinate values of all the surface point clouds on the surface; m is the total number of point clouds on the functional surface; x is X Point I and YPoint I X coordinate values and Y coordinate values of the point cloud of the I-th surface on the functional surface are respectively; h is a Special purpose Is a feature matrix; u and V are feature matrixes, and H is a feature value;
for h Special purpose And carrying out feature decomposition, and after the feature decomposition, forming a three-dimensional matrix by feature values according to feature vectors formed by big-to-small arrangement, wherein the three-dimensional matrix represents three principal axis matrixes, so as to obtain a local coordinate system.
Further, a formula for calculating a distance from a surface point cloud of the functional surface to a plane where a z-axis of the local coordinate system is located is as follows:
wherein ,mI Is the I-th discrete point on the functional surface; p is p z Is any point on the plane where the z axis is located, and n is a normal direction.
Further, the method for acquiring the number of normal passing surfaces of the functional surface comprises the following steps:
a local coordinate system with the normal direction of the functional surface as the z axis is obtained by adopting a principal component analysis method, and a point P is arbitrarily selected on the functional surface Method of And the point P is obtained by the formula Rp-Ro Method of Coordinates in a two-dimensional coordinate system;
determination of point P by means of a ray method Method of The number of through-surfaces is the number of normal through-surfaces as functional surfaces.
Further, the method for determining the type of the functional surface according to the distance of the functional surface comprises the following steps:
and selecting the maximum distance corresponding to each functional surface, judging whether the maximum distance is larger than a preset threshold, if so, judging that the type of the functional surface is a curved surface, and otherwise, judging that the type of the functional surface is a plane.
Further, according to the relation between any two functional surfaces, the method for determining whether the functional surface is perpendicular to the adjacent surface comprises the following steps:
b1, judging whether any two functional surfaces have a common starting point and an end point, if so, entering a step B2, otherwise, marking the functional surfaces not to be perpendicular to the adjacent surfaces;
b2, judging whether normals corresponding to the two functional surfaces are mutually perpendicular, if so, marking the functional surfaces to be perpendicular to the adjacent surfaces; otherwise, the marking function surface is not perpendicular to the adjacent surface.
The beneficial effects of the invention are as follows: the scheme provides a CAD digital-analog geometric information extraction framework from analysis to recognition based on STEP files, effectively avoids the defect of low accuracy of the conventional single-attribute adjacency graph, and corrects some details on STEP file analysis again, thereby enhancing the stability of the proposed algorithm on feature recognition.
In the aspect of obtaining initial information, the method reduces the complexity of the surface type by generating discrete points (surface point cloud) of the surface and dividing the surface type into two types of simple curved surfaces and planes on the basis of obtaining the discrete points, classifies the characteristics by constructing the attribute of each characteristic and finally using a naive Bayesian classifier, and solves the defect of fixed node number of the subgraph in the traditional subgraph matching algorithm.
Drawings
Fig. 1 is a flowchart of a vehicle body part feature information acquisition method based on STEP file analysis.
Fig. 2 is a determination of the arc angle.
Fig. 3 shows the formats of the functional surfaces in STEP file.
FIG. 4 is a schematic diagram of a ray method for determining inner and outer points.
Fig. 5 is a clipping illustration of a planar point cloud.
Fig. 6 is a flow chart of face point cloud clipping.
Detailed Description
The following description of the embodiments of the present invention is provided to facilitate understanding of the present invention by those skilled in the art, but it should be understood that the present invention is not limited to the scope of the embodiments, and all the inventions which make use of the inventive concept are protected by the spirit and scope of the present invention as defined and defined in the appended claims to those skilled in the art.
Referring to fig. 1, fig. 1 shows a flowchart of a vehicle body part feature information acquisition method based on STEP file parsing; as shown in fig. 1, the method includes steps S1 to S7.
In STEP S1, a STEP file of the body part is obtained, parameter information of a plurality of sides in the STEP file is read, and then boundary discrete points of the sides are extracted based on the parameter information of the sides and a parameter equation corresponding to the parameter information of the sides.
The parameter information is analyzed according to character information in the STEP file, and main character information is divided into entity information and topology information. The entity information is mainly composed of geometry, the functional surface in one part is mainly described by the entity information and topology information together, and then the functional surface is used for forming one part.
Taking fig. 2 as an example, an "advanced_face" in the STEP file represents a functional FACE, and parameter information for an edge and boundary information of the FACE can be read according to the content therein. One face is composed of its boundaries and its own type, and one face often contains multiple edges, while the entities of one edge are often divided into straight lines, circles, knotted-with-rational-B-spline curves, and non-uniform-rational-B-spline curves (NURBS), which are also referred to as boundary types.
In implementation, the functional surface preferably comprises a plurality of edges, and the parameter equations of the solid straight line and the NURBS curve of the edges are respectively as follows:
p straight line =[1 t]*[o Original source d] T
wherein ,pStraight line Is a straight line parameter equation; t is the length parameter of a straight line, o Original source Is the origin of the straight line; d is the direction of the straight line; [] T Is a transposition; p (k) is a parametric equation for the NURBS curve; n (N) i,m (k),N i,m-1(k) and Ni+1,m-1 (k) Are all base functions, N i,0 (k) A value of a base function which is the ith and has an order of 0; w (w) i Is the weight; p (P) i Is a control point; k (k) i 、k i+1 、k i+m k i+m+1 All are parameters; m is the order.
In one embodiment of the invention, a method for extracting boundary discrete points of a solid circle line of an edge comprises the following steps:
a1, randomly taking direction vectors of the global x, y and z axes to carry out cross multiplication with the normal n of a circle, judging whether the cross multiplication result is equal to zero, if so, repeating the step A1, otherwise, entering the step A2;
a2, setting a direction vector as an a direction, and cross-multiplying a normal n of a circle with the a direction to obtain a b direction; adopting a, b and N as local coordinate systems of circular lines, and projecting the circular lines into a two-dimensional plane according to the N direction; the formula of the conversion is Rp-Ro, as shown in fig. 2, where r= [ a, b, n ], p is a coordinate point, here a start point or an end point, and O is a center.
A3, removing the z axis in the local coordinate system to obtain the coordinates of the starting point and the end point of the circular line on the two-dimensional plane, and calculating the sine value v by adopting the coordinates of the starting point and the end point 1 Sum cosine value v 2
A4, according to sine value v 1 Sum cosine value v 2 Calculating a circular line angle theta:
a5, extracting boundary discrete points of the circular line by adopting a parameter equation of the circular line according to the angle theta of the circular line, wherein the parameter equation of the circular line is as follows:
p round circle =[1 rcosθ rsinθ]*[o Heart shape a b] T
wherein ,pRound circle A straight line parameter equation which is a circle; r is the radius of the circle; o (o) Heart shape Is the center of a circle; a and b are respectively two direction vectors which are perpendicular to each other and perpendicular to the normal direction of the circular line.
In STEP S2, converting all the functional surfaces in the STEP file into NURBS curved surfaces, and calculating the value of the boundary discrete point of each edge in the parameter domain of the NURBS curved surfaces by adopting a quasi-Newton method;
in one embodiment of the present invention, the conversion formulas for converting all the functional surfaces in the STEP file into NURBS curved surfaces and converting the surface point cloud of each functional surface into the original space are:
wherein p (u, v) is the value of each point of the NURBS surface; n (N) i,m (u) is a u-direction basis function; n (N) j,n (v) Is a basis function in the v direction; w (w) i,j Is the weight; p (P) i,j To control a lattice of points.
Further, the method for calculating the value of the boundary discrete point of each edge in the parameter domain of the NURBS curved surface by adopting the quasi-Newton method comprises the following steps:
s21, selecting any boundary point [ x ] on the edge of the functional surface i ,y i ,z i ]I=0, 1,2, … f, and taking the corresponding NURBS surface and boundary point [ x ] i ,y i ,z i ]The nearest point P takes the corresponding value u of the point P in the parameter domain i and vi As an initial value of the newton iterative method;
s21, selecting any boundary point [ x ] on the edge of the functional surface i ,y i ,z i ]I=0, 1,2, … f, and taking the corresponding NURBS surface and boundary point [ x ] i ,y i ,z i ]The nearest point P takes the corresponding value u of the point P in the parameter domain i and vi As an initial value of the newton iterative method;
s22, acquiring a target optimization function, and when the target optimization function is equal to zero, obtaining an optimal value of a point P in a parameter domain, wherein a calculation formula of the target optimization function is as follows:
l(u,v)=[p(u,v)-P][p(u,v)-P] T
wherein l (u, v) is a target optimization function;
s23, adopting the optimal value as a parameter q c Initial value q 0 =[u 0 ,v 0 ] T Initializing gradient g c And a symmetrical positive definite matrix B c C is more than or equal to 0; gradient g c Initial value g 0 The method comprises the following steps:
wherein ,lu (u 0 ,v 0 ) To optimize u in the function for the target 0 Obtaining a deflection guide; l (L) v (u 0 ,v 0 ) To optimize v in the function for the target 0 Obtaining a deflection guide;
s24, according to gradient g c And a symmetrical positive definite matrix B c Calculate the parameter q c+1
wherein ,λi Is the step length of the edge; q c+1 =[u c+1 ,v c+1 ] T Is the parameter at the c+1th iteration; u (u) c+1 ,v c+1 The parameters of Newton iteration method in the c+1th iteration;
s25, updating the gradient matrix:
wherein ,gc+1 Is the parameter at the c+1th iteration; l (L) u (u c+1 ,v c+1 ) To optimize u in the function for the target c+1 Obtaining a deflection guide; l (L) v (u c+1 ,v c+1 ) To optimize v in the function for the target c+1 Obtaining a deflection guide;
s26, symmetrical positive definite matrix B c+1 Updating:
S c =q c+1 -q c ,Y c =g c+1 -g c
wherein ,Yc and sc Are all intermediate parameters; y is Y c T Is Y c Is a transpose of (2); g c+1 A gradient at iteration c+1st; b (B) c+1 and Bc Are symmetrical positive definite matrixes in the c+1 and c iterations;
s27, judging II g c+1 II is greater than or equal to a threshold epsilon, if so, c=c+1, and returning to the step S24; otherwise output q c+1 Is the boundary point (x i ,y i ,z i ) An optimal value in the parameter domain, and proceeds to step S28;
s28, judging whether i is greater than or equal to f, if so, all boundary points (x i ,y i ,z i ) The optima in the parameter domain have all been found, otherwise let i=i+1, and return to step S21.
In step S3, according to the value of the boundary discrete point of the functional surface in the parameter domain, clipping the NURBS curved surface corresponding to the boundary discrete point by adopting a ray method to obtain a surface point cloud, and converting the surface point cloud of each functional surface into the original space.
Clipping curved surfaces directly in three-dimensional space is difficult, nor does it follow the method of clipping planes by mapping to two-dimensional space domain. According to the scheme, the boundary is reversely mapped to the two-dimensional parameter field of the NURBS curved surface, so that the NURBS curved surface can be cut. Each point in three-dimensional space corresponds to the u, v parameter of the NURBS surface. Assuming a point P (x, y, z), the BFGS method can be used to approximate its corresponding parameters u0 and v0 in the parameter domain.
The process of clipping the NURBS curved surface corresponding to the method by adopting a ray method to obtain the face point cloud is generally as follows: fig. 4 shows the result of filling a polygon, and after filling, it is necessary to determine whether the filled point is inside the surrounding polygon, and the determination is performed by using a ray method, where the ray method is shown in fig. 4a, and when the side of the polygon is a curve, the curve can be approximately seen as a side formed by multiple sections of straight lines shown in fig. 4 b. In the ray method, a point to be judged is taken as an origin as a ray, when the edge through which the ray passes is even, the point is discarded if the edge is outside the polygon, and if the edge is odd, the point is reserved. The final result of the ray cut of the graph shown in fig. 5a (left side view in fig. 5) is shown in fig. 5b (right side view in fig. 5).
Fig. 6 shows a flow chart of surface point cloud clipping, wherein a first sub-graph is a surface point cloud in an original three-dimensional space, after a second sub-graph converts a parameter domain, each point on the surface point cloud corresponds to a parameter point in the parameter domain, a third sub-graph is a corresponding parameter point boundary of a boundary point in the three-dimensional space, which is found in the parameter domain by a quasi-newton method, a fourth sub-graph is a schematic diagram obtained by a radial method from the parameter domain point cloud, and a fifth sub-graph is a schematic diagram converted from the two-dimensional space to the original space.
In step S4, a principal component analysis method is adopted to obtain local coordinates of each functional surface, and a distance from a surface point cloud of the functional surface to a plane where a z-axis of a local coordinate system is located is calculated:
wherein ,mI Is the I-th discrete point on the functional surface; p is p z Is any point on the plane where the z axis is located, and n is a normal direction.
In implementation, the method for acquiring the local coordinate system of each functional surface by adopting the principal component analysis method preferably comprises the following steps of:
calculating characteristic values according to the surface point cloud on the functional surface:
wherein , and />Respectively averaging X coordinate values and Y coordinate values of all the surface point clouds on the functional surface; m is the total number of point clouds on the functional surface; x is X Point I and YPoint I X coordinate values and Y coordinate values of the point cloud of the I-th surface on the functional surface are respectively; h is a Special purpose Is a feature matrix; u and V are feature matrixes, and H is a feature value;
for h Special purpose And carrying out feature decomposition, and after the feature decomposition, forming a three-dimensional matrix by feature values according to feature vectors formed by big-to-small arrangement, wherein the three-dimensional matrix represents three principal axis matrixes, so as to obtain a local coordinate system.
S5, determining the type of the functional surface according to the distance between the functional surfaces; determining whether the functional surface is vertical to the adjacent surface according to the relation between any two functional surfaces;
in implementation, the method for determining the type of the functional surface preferably comprises the following steps of:
and selecting the maximum distance corresponding to each functional surface, judging whether the maximum distance is larger than a preset threshold, if so, judging that the type of the functional surface is a curved surface, and otherwise, judging that the type of the functional surface is a plane.
The method for determining whether the functional surface is perpendicular to the adjacent surface or not according to the relation between any two functional surfaces comprises the following steps:
b1, judging whether any two functional surfaces have a common starting point and an end point, if so, entering a step B2, otherwise, marking the functional surfaces not to be perpendicular to the adjacent surfaces;
b2, judging whether normals corresponding to the two functional surfaces are mutually perpendicular, if so, marking the functional surfaces to be perpendicular to the adjacent surfaces; otherwise, the marking function surface is not perpendicular to the adjacent surface.
In the following, whether two functional surfaces a and B are perpendicular to the adjacent surface will be described by taking an example, if the two surfaces are perpendicular, the functional surface a is perpendicular to the adjacent surface functional surface B, and if the functional surface B is perpendicular to the adjacent surface functional surface a, and if the functional surface B is perpendicular to the adjacent surface functional surface a, the marking manner of non-perpendicular marking is similar, and will not be repeated here.
S6, reading the number of normal passing surfaces and the boundary types of the functional surfaces in the STEP file, inputting the boundary types, the surface types, whether the boundary types are perpendicular to the adjacent surfaces or not and the number of normal passing surfaces into a naive Bayesian classifier, and calculating the probability that the functional surfaces belong to each category to obtain the functional surface types.
Wherein the naive bayes classifier is:
wherein f represents a category and pro represents an attribute.
In implementation, the method for acquiring the number of normal passing surfaces of the preferable function surface of the scheme comprises the following steps:
a local coordinate system with the normal direction of the functional surface as the z axis is obtained by adopting a principal component analysis method, and a point P is arbitrarily selected on the functional surface Method of And the point P is obtained by the formula Rp-Ro Method of Coordinates in a two-dimensional coordinate system;
determination of point P by means of a ray method Method of The number of through-surfaces is the number of normal through-surfaces as functional surfaces.
The functional surface in the scheme comprises a flanging surface, an R angle, a round hole and a slotted hole. A total of 87 parts of the vehicle body were selected from the training dataset of the naive bayes classifier.
In summary, the technical scheme provided by the scheme can effectively solve the unified expression of models made by different software, and processing characteristics related to design intent and manufacturing process are identified from low-level geometric characteristics shared by various CAD models.

Claims (10)

1. The vehicle body part characteristic information acquisition method based on STEP file analysis is characterized by comprising the following STEPs of:
s1, acquiring an STEP file of a vehicle body part, reading parameter information of various sides in the STEP file, and extracting boundary discrete points of the sides based on the parameter information of the sides and a parameter equation corresponding to the parameter information of the sides;
s2, converting all functional surfaces in the STEP file into NURBS curved surfaces, and calculating the value of boundary discrete points of each edge in the parameter domain of the NURBS curved surfaces by adopting a quasi-Newton method;
s3, clipping the NURBS curved surface corresponding to the functional surface by adopting a ray method according to the value of the boundary discrete point of the functional surface in the parameter domain to obtain a surface point cloud, and converting the surface point cloud of each functional surface into an original space;
s4, acquiring local coordinates of each functional surface by adopting a principal component analysis method, and calculating the distance from the surface point cloud of the functional surface to the plane where the z-axis of the local coordinate system is located;
s5, determining the type of the functional surface according to the distance between the functional surfaces; determining whether the functional surface is vertical to the adjacent surface according to the relation between any two functional surfaces;
s6, reading the number of normal passing surfaces and the boundary types of the functional surfaces in the STEP file, inputting the boundary types, the surface types, whether the boundary types are perpendicular to the adjacent surfaces or not and the number of normal passing surfaces into a naive Bayesian classifier, and calculating the probability that the functional surfaces belong to each category to obtain the functional surface types.
2. The method for obtaining feature information of a vehicle body part according to claim 1, wherein the functional surface includes a plurality of sides, and parameter equations of a solid straight line of the sides and NURBS curves are respectively:
p straight line =[1 t]*[o Original source d] T
wherein ,pStraight line Is a straight line parameter equation; t is the length parameter of a straight line, o Original source Is the origin of the straight line; d is the direction of the straight line; [] T Is a transposition; p (k) is a parametric equation for the NURBS curve; n (N) i,m (k),N i,m-1(k) and Ni+1,m-1 (k) Are all base functions, N i,0 (k) A value of a base function which is the ith and has an order of 0; w (w) i Is the weight; p (P) i Is a control point; k (k) i 、k i+1 、k i+m k i+m+1 All are parameters; m is the order.
3. The method for acquiring the feature information of the vehicle body part according to claim 1, wherein the method for extracting the boundary discrete points of the solid circle line of the side comprises:
a1, randomly taking direction vectors of the global x, y and z axes to carry out cross multiplication with the normal n of a circle, judging whether the cross multiplication result is equal to zero, if so, repeating the step A1, otherwise, entering the step A2;
a2, setting a direction vector as an a direction, and cross-multiplying a normal n of a circle with the a direction to obtain a b direction; adopting a, b and N as local coordinate systems of circular lines, and projecting the circular lines into a two-dimensional plane according to the N direction;
a3, removing the z axis in the local coordinate system to obtain the coordinates of the starting point and the end point of the circular line on the two-dimensional plane, and calculating the sine value v by adopting the coordinates of the starting point and the end point 1 Sum cosine value v 2
A4, according to sine value v 1 Sum cosine value v 2 Calculating a circular line angle theta:
a5, extracting boundary discrete points of the circular line by adopting a parameter equation of the circular line according to the angle theta of the circular line, wherein the parameter equation of the circular line is as follows:
p round circle =[1 rcosθ rsinθ]*[o Heart shape a b] T
wherein ,pRound circle A straight line parameter equation which is a circle; r is the radius of the circle; o (o) Heart shape Is the center of a circle; a and b are respectively two direction vectors which are perpendicular to each other and perpendicular to the normal direction of the circular line.
4. The method for acquiring the feature information of the vehicle body part according to claim 1, wherein the conversion formulas for converting all the functional surfaces in the STEP file into NURBS curved surfaces and converting the surface point cloud of each functional surface into the original space are:
wherein p (u, v) is the value of each point of the NURBS surface; n (N) i,m (u) is a u-direction basis function; n (N) j,n (v) Is a basis function in the v direction; w (w) i,j Is the weight; p (P) i,j To control a lattice of points.
5. The method for obtaining the characteristic information of the vehicle body part according to claim 4, wherein the method for calculating the value of the boundary discrete point of each side in the parameter domain of the NURBS surface by using the quasi-newton method comprises the following steps:
s21, selecting any boundary point [ x ] on the edge of the functional surface i ,y i ,z i ]I=0, 1,2, … f, and taking the corresponding NURBS surface and boundary point [ x ] i ,y i ,z i ]The nearest point P takes the corresponding value u of the point P in the parameter domain i and vi As an initial value of the newton iterative method;
s22, acquiring a target optimization function, and when the target optimization function is equal to zero, obtaining an optimal value of a point P in a parameter domain, wherein a calculation formula of the target optimization function is as follows:
l(u,v)=[p(u,v)-P][p(u,v)-P] T
wherein l (u, v) is a target optimization function;
s23, adopting the optimal value as a parameter q c Is at the beginning of (1)Value q 0 =[u 0 ,v 0 ] T Initializing gradient g c And a symmetrical positive definite matrix B c C is more than or equal to 0; gradient g c Initial value g 0 The method comprises the following steps:
wherein ,lu (u 0 ,v 0 ) To optimize u in the function for the target 0 Obtaining a deflection guide; l (L) v (u 0 ,v 0 ) To optimize v in the function for the target 0 Obtaining a deflection guide;
s24, according to gradient g c And a symmetrical positive definite matrix B c Calculate the parameter q c+1
wherein ,λi Is the step length of the edge; q c+1 =[u c+1 ,v c+1 ] T Is the parameter at the c+1th iteration; u (u) c+1 ,v c+1 The parameters of Newton iteration method in the c+1th iteration;
s25, updating the gradient matrix:
wherein ,gc+1 Is the parameter at the c+1th iteration; l (L) u (u c+1 ,v c+1 ) To optimize u in the function for the target c+1 Obtaining a deflection guide; l (L) v (u c+1 ,v c+1 ) To optimize v in the function for the target c+1 Obtaining a deflection guide;
s26, symmetrical positive definite matrix B c+1 Updating:
S c =q c+1 -q c ,Y c =g c+1 -g c
wherein ,Yc and sc Are all intermediate parameters; y is Y c T Is Y c Is a transpose of (2); g c+1 A gradient at iteration c+1st; b (B) c+1 and Bc Are symmetrical positive definite matrixes in the c+1 and c iterations;
s27, judging II g c+1 II is greater than or equal to a threshold epsilon, if so, c=c+1, and returning to the step S24; otherwise output q c+1 Is the boundary point (x i ,y i ,z i ) An optimal value in the parameter domain, and proceeds to step S28;
s28, judging whether i is greater than or equal to f, if so, all boundary points (x i ,y i ,z i ) The optima in the parameter domain have all been found, otherwise let i=i+1, and return to step S21.
6. The method for acquiring the feature information of the vehicle body part according to claim 1, wherein the method for acquiring the local coordinate system of each functional surface by using the principal component analysis method comprises:
calculating characteristic values according to the surface point cloud on the functional surface:
wherein , and />Respectively isAn average value of X coordinate values and Y coordinate values of all the surface point clouds on the functional surface; m is the total number of point clouds on the functional surface; x is X Point I and YPoint I X coordinate values and Y coordinate values of the point cloud of the I-th surface on the functional surface are respectively; h is a Special purpose Is a feature matrix; u and V are feature matrixes, and H is a feature value;
for h Special purpose And carrying out feature decomposition, and after the feature decomposition, forming a three-dimensional matrix by feature values according to feature vectors formed by big-to-small arrangement, wherein the three-dimensional matrix represents three principal axis matrixes, so as to obtain a local coordinate system.
7. The method for acquiring the feature information of the vehicle body part according to claim 6, wherein the formula for calculating the distance from the surface point cloud of the functional surface to the plane in which the z-axis of the local coordinate system is located is:
wherein ,mI Is the I-th discrete point on the functional surface; p is p z Is any point on the plane where the z axis is located, and n is a normal direction.
8. The vehicle body part characteristic information acquisition method according to claim 1, wherein the acquisition method of the number of normal passing surfaces of the functional surface includes:
a local coordinate system with the normal direction of the functional surface as the z axis is obtained by adopting a principal component analysis method, and a point P is arbitrarily selected on the functional surface Method of And the point P is obtained by the formula Rp-Ro Method of Coordinates in a two-dimensional coordinate system;
determination of point P by means of a ray method Method of The number of through-surfaces is the number of normal through-surfaces as functional surfaces.
9. The vehicle body part characteristic information acquisition method according to claim 1, wherein the method of determining the type of the functional surface based on the distance of the functional surface includes:
and selecting the maximum distance corresponding to each functional surface, judging whether the maximum distance is larger than a preset threshold, if so, judging that the type of the functional surface is a curved surface, and otherwise, judging that the type of the functional surface is a plane.
10. The vehicle body part characteristic information acquisition method according to claim 1, wherein the method of determining whether the functional surface is perpendicular to the adjacent surface according to the relationship between any two functional surfaces comprises:
b1, judging whether any two functional surfaces have a common starting point and an end point, if so, entering a step B2, otherwise, marking the functional surfaces not to be perpendicular to the adjacent surfaces;
b2, judging whether normals corresponding to the two functional surfaces are mutually perpendicular, if so, marking the functional surfaces to be perpendicular to the adjacent surfaces; otherwise, the marking function surface is not perpendicular to the adjacent surface.
CN202310913723.XA 2023-07-24 2023-07-24 STEP file analysis-based vehicle body part characteristic information acquisition method Pending CN116883685A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310913723.XA CN116883685A (en) 2023-07-24 2023-07-24 STEP file analysis-based vehicle body part characteristic information acquisition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310913723.XA CN116883685A (en) 2023-07-24 2023-07-24 STEP file analysis-based vehicle body part characteristic information acquisition method

Publications (1)

Publication Number Publication Date
CN116883685A true CN116883685A (en) 2023-10-13

Family

ID=88267787

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310913723.XA Pending CN116883685A (en) 2023-07-24 2023-07-24 STEP file analysis-based vehicle body part characteristic information acquisition method

Country Status (1)

Country Link
CN (1) CN116883685A (en)

Similar Documents

Publication Publication Date Title
CN111080684B (en) Point cloud registration method for point neighborhood scale difference description
CN111581776B (en) An isogeometric analysis method based on geometric reconstruction model
CN119478285B (en) Automatic transformation method and system for CAD and BIM model coordinates based on coordinate mapping
Guo et al. Automatic and high-quality surface mesh generation for CAD models
CN109740227B (en) Miniature complex part modeling method based on feature recognition
JP2010049677A (en) Computer-implemented method of design of surface defined by guiding curve
CN114841965B (en) Steel structure deformation detection method and device, computer equipment and storage medium
CN113781667A (en) Three-dimensional structure simplified reconstruction method and device, computer equipment and storage medium
Liu et al. Point2Building: Reconstructing buildings from airborne LiDAR point clouds
CN115661221A (en) Non-rigid point cloud registration method
CN112560954B (en) Non-rigid matching method and device of geometric model using local and global information
CN118296204A (en) Comparing multi-format shape similarity and search
CN115423973B (en) Method and system for generating distance field of triangular mesh model based on multi-information voxels
CN120374886B (en) A point cloud building component modeling method and system based on feature extraction
CN112967333A (en) Complex point cloud framework extraction method and system based on grade division
Zhang Discrete shape modeling for geometrical product specification: contributions and applications to skin model simulation
CN105869210A (en) Interpolation data processing method in three-dimensional geological surface model
CN110688440A (en) A Map Fusion Method Applicable to Less Submap Overlaps
CN116883685A (en) STEP file analysis-based vehicle body part characteristic information acquisition method
Ramanathan et al. Interior medial axis transform computation of 3D objects bound by free-form surfaces
CN116452620A (en) Human body point cloud data segmentation method based on radial basis function
CN116596750A (en) Point cloud processing method and device, electronic equipment and storage medium
Takashima et al. Shape Descriptor-Based Similar Feature Extraction for Finite Element Meshing.
CN115937460A (en) Feature-preserving Surface Reconstruction Method Based on Optimal Transmission
CN115439517A (en) A point cloud registration method, system, electronic device and storage medium

Legal Events

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