[go: up one dir, main page]

CN103292654B - A kind of method calculating function size of cylindrical part - Google Patents

A kind of method calculating function size of cylindrical part Download PDF

Info

Publication number
CN103292654B
CN103292654B CN201310230254.8A CN201310230254A CN103292654B CN 103292654 B CN103292654 B CN 103292654B CN 201310230254 A CN201310230254 A CN 201310230254A CN 103292654 B CN103292654 B CN 103292654B
Authority
CN
China
Prior art keywords
point
contact
contact point
points
axis
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.)
Expired - Fee Related
Application number
CN201310230254.8A
Other languages
Chinese (zh)
Other versions
CN103292654A (en
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.)
Guilin University of Electronic Technology
Original Assignee
Guilin University of Electronic 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 Guilin University of Electronic Technology filed Critical Guilin University of Electronic Technology
Priority to CN201310230254.8A priority Critical patent/CN103292654B/en
Publication of CN103292654A publication Critical patent/CN103292654A/en
Application granted granted Critical
Publication of CN103292654B publication Critical patent/CN103292654B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices With Unspecified Measuring Means (AREA)
  • Image Analysis (AREA)

Abstract

一种计算圆柱体零件作用尺寸的方法,该方法首先测量并获取被测圆柱面上的测点坐标;然后给出圆柱的初始参数,将测点投影在垂直于轴线的平面内,通过对包容区域的平移变动,计算投影圆的作用尺寸,从而搜索到包容区域的3个接触点;然后通过包容区域的旋转变动及圆柱半径的变动,分别搜索与包容区域接触的第4个与第5个测点;当接触点的数量大于等于5时,以4个接触点为1个组合,在保持4点接触的条件下,进一步变动圆柱半径,然后换1个组合,继续变动圆柱半径,依次迭代计算,直到满足判别准则,输出圆柱的作用尺寸、圆柱度误差以及圆柱轴线参数的最优值。本发明可准确计算出满足作用表面判别准则的圆柱半径最优值及圆柱度误差。

A method for calculating the effective size of a cylindrical part. This method first measures and obtains the coordinates of the measuring points on the measured cylindrical surface; then gives the initial parameters of the cylinder, projects the measuring points on a plane perpendicular to the axis, and uses the inclusion The translational change of the area calculates the action size of the projection circle, so as to search for the 3 contact points of the containment area; then through the rotation change of the containment area and the change of the cylinder radius, respectively search for the fourth and fifth points in contact with the containment area Measure points; when the number of contact points is greater than or equal to 5, use 4 contact points as a combination, and further change the radius of the cylinder under the condition of maintaining 4 points of contact, and then change to 1 combination, continue to change the radius of the cylinder, and iterate successively Calculate until the criterion is met, and output the optimal value of the cylinder's effective size, cylindricity error and cylinder axis parameters. The invention can accurately calculate the optimal value of the cylinder radius and the cylindricity error satisfying the discrimination criterion of the action surface.

Description

一种计算圆柱体零件作用尺寸的方法A Method for Calculating Functional Dimensions of Cylindrical Parts

技术领域 technical field

本发明涉及一种计算圆柱体零件作用尺寸的方法,属于精密计量与计算机应用领域,可用于各种情况下圆柱形几何产品的合格性检测,并为零件加工过程以及加工工艺的改进提供指导。 The invention relates to a method for calculating the functional dimension of a cylindrical part, which belongs to the field of precision measurement and computer application, can be used for the qualification detection of cylindrical geometric products in various situations, and provides guidance for the improvement of the part processing process and processing technology.

背景技术 Background technique

圆柱是机械零件中最常见的组成要素之一,其精度对产品的质量、性能以及使用寿命具有重要的影响,而圆柱体的作用尺寸是圆柱形零件的主要技术参数。最大内接圆柱和最小外接圆柱统称为圆柱体的作用表面,最大内接圆柱的半径和最小外接圆柱的半径统称为圆柱体的作用尺寸。 Cylinder is one of the most common components in mechanical parts. Its precision has an important impact on product quality, performance and service life, and the function size of cylinder is the main technical parameter of cylindrical parts. The largest inscribed cylinder and the smallest circumscribed cylinder are collectively referred to as the active surface of the cylinder, and the radius of the largest inscribed cylinder and the smallest circumscribed cylinder are collectively referred to as the active dimension of the cylinder.

最大内接圆柱和最小外接圆柱的计算方法是基于光滑圆柱环规的检测原理所建立的计算方法。最大内接圆柱体现了被测孔所能通过的最大配合轴,由此获得的圆柱度误差可视为被测孔与最大配合轴之间的最大间隙;而最小外接圆柱体现了被测轴所能通过的最小配合孔,由此获得的圆柱度误差可视为被测轴与最小配合孔之间的最大间隙。 The calculation method of the maximum inscribed cylinder and the minimum circumscribed cylinder is a calculation method established based on the detection principle of the smooth cylinder ring gauge. The largest inscribed cylinder reflects the maximum matching axis that the measured hole can pass through, and the resulting cylindricity error can be regarded as the maximum gap between the measured hole and the largest matching axis; while the smallest circumscribed cylinder reflects the maximum gap between the measured axis The smallest fitting hole that can pass through, the resulting cylindricity error can be regarded as the maximum gap between the measured shaft and the smallest fitting hole.

圆柱体作用尺寸的计算,属于不可微复杂最优化问题。目前,国内外学者主要采用传统优化方法、智能算法、计算几何方法等。这些方法由于存在计算稳定性差、计算效率低、对采点数量有限制、计算结果难以达到精确解等缺陷,导致最大内接圆柱法与最小外接圆柱法很难在实际检测中应用。目前市场上一般都采用成熟的最小二乘法近似地计算圆柱体零件的作用尺寸。 The calculation of the action size of a cylinder is a non-differentiable complex optimization problem. At present, scholars at home and abroad mainly use traditional optimization methods, intelligent algorithms, and computational geometry methods. Due to the shortcomings of these methods such as poor calculation stability, low calculation efficiency, limited number of sampling points, and difficulty in achieving accurate solutions, it is difficult to apply the maximum inscribed cylinder method and minimum circumscribed cylinder method in actual detection. At present, the mature least square method is generally used in the market to approximate the action size of cylindrical parts.

发明内容 Contents of the invention

为了克服上述技术缺点,本发明的目的是提供一种计算圆柱体零件作用尺寸的方法。本方法不仅提高了测量仪器测量圆柱体作用尺寸的精度,而且算法稳定性好、计算效率高,可以推广应用于其几何体作用尺寸的计算。 In order to overcome the above-mentioned technical shortcomings, the object of the present invention is to provide a method for calculating the effective size of cylindrical parts. The method not only improves the accuracy of the measurement instrument for measuring the action size of the cylinder, but also has good algorithm stability and high calculation efficiency, and can be extended and applied to the calculation of the action size of the geometric body.

本发明一种计算圆柱体零件作用尺寸的方法,用于计算圆柱体的最大内接尺寸,主要包括以下步骤: The present invention is a method for calculating the functional size of a cylinder part, which is used to calculate the maximum inscribed size of a cylinder, and mainly includes the following steps:

步骤1:将被测圆柱置于测量平台上,在测量空间直角坐标系中测量并获取圆柱表面上的点=1,2,…,n代表测点数目且n为大于5的正整数;所有测点形成测点集Step 1: Place the measured cylinder on the measurement platform, measure and obtain points on the surface of the cylinder in the measurement space Cartesian coordinate system , =1,2,…, n represents the number of measuring points and n is a positive integer greater than 5; all measuring points Form a point set .

步骤2:随机给出圆柱的参数,即圆柱的轴线L方向矢量;进行坐标系的旋转变换,使坐标系z轴平行于圆柱轴线L方向矢量;坐标变换后,将测点投影在xoy平面内,得到测点坐标;所有测点形成测点集Step 2: Randomly give the parameters of the cylinder, that is, the axis L direction vector of the cylinder ; Carry out the rotation transformation of the coordinate system, so that the z axis of the coordinate system is parallel to the cylinder axis L direction vector ;After the coordinate transformation, the measured point Projected on the xoy plane to get the measuring point coordinate ;all measuring points Form a point set .

步骤3:在点集中,任意取出3个测点,并计算3个测点组成三角形的外接圆心,作为圆心的迭代初始值。 Step 3: In point set , take 3 measuring points arbitrarily, and calculate the circumcenter of the triangle formed by the 3 measuring points , as the center of the circle The initial value of iteration.

步骤4:依次计算测点集中各测点到圆心的距离;并记录测点集中各测点到圆心坐标距离的最小距离所对应的测点,得到误差包容区域内边界的接触点集合Step 4: Calculate the measurement point set in sequence From each measuring point to the center of the circle distance; and record the set of measuring points coordinates from each measuring point to the center of the circle The measurement point corresponding to the minimum distance of the distance, and the contact point set of the boundary of the error tolerance area is obtained .

步骤5:判断误差包容区域内边界的接触点集合中是否只有1个接触点; Step 5: Determine the set of contact points within the boundary of the error tolerance area Is there only 1 touchpoint in ;

如果只有1个接触点,则该接触点为有效接触点,此时包容区域平移的方向矢量等于圆心坐标减去接触点坐标,跳转到步骤8; If there is only one contact point, the contact point is a valid contact point, and the direction vector of the containment area translation at this time equal to the coordinates of the center of the circle Subtract the contact point coordinates and jump to step 8;

如果接触点数量大于1,则跳转到下一步。 If the number of touch points is greater than 1, skip to the next step.

步骤6:判断误差包容区域内边界的接触点集合中是否只有2个接触点; Step 6: Determine the set of contact points within the boundary of the error tolerance area Is there only 2 touchpoints in ;

如果只有2个接触点,则这2个接触点为有效接触点,此时包容区域平移的方向矢量等于圆心坐标减去2个接触点连线的中点坐标,跳转到步骤8; If there are only 2 contact points, these 2 contact points are valid contact points, and the direction vector of the containment area translation at this time equal to the coordinates of the center of the circle Subtract the coordinates of the midpoint of the line connecting the two contact points, and skip to step 8;

如果接触点数量大于2,则跳转到下一步。 If the number of touch points is greater than 2, skip to the next step.

步骤7:计算各个接触点相对圆心的相位角Step 7: Calculate individual touchpoints relative center the phase angle of ,

所有接触点的相位角形成集合,对中的元素进行排序,得到向量,计算向量中相邻2个相位角之差, Phase angles of all contact points form a collection ,right The elements in are sorted to get a vector , to calculate the vector 2 adjacent phase angles in Difference,

为接触点的数量;计算,如果,则满足锐角三角形准则,跳转到步骤9;如果,查询对应的2个接触点,所查询到的2个接触点有效接触点,其余接触点为无效接触点,此时包容区域平移的方向矢量等于圆心坐标减去2有效接触点连线的中点坐标。 is the number of touchpoints; calculate ,if , then the acute triangle criterion is met, and skip to step 9; if ,Inquire For the corresponding two contact points, the queried two contact points are valid contact points, and the remaining contact points are invalid contact points. At this time, the direction vector of the containment area translation equal to the coordinates of the center of the circle Subtract 2 from the midpoint coordinates of the line connecting the effective contact points.

步骤8:依次计算包容区域变动到与每个非接触测点接触时的圆心虚拟位置Step 8: Calculate the change of containment area in sequence to each non-contact measuring point The virtual position of the center of the circle at the time of contact ;

首先分别计算各个非接触测点和其中一个有效接触点的垂直中分线,然后计算垂直中分线与过圆心且方向矢量为的直线的交点,即为包容区域变动到与该测点接触时,圆心的虚拟位置,所有的非接触测点对应的组成集合,计算各个非接触测点对应的到圆心的距离,所有的构成集合,在集合中,剔除异向的对应元素,然后查询集合中的最小值,即为包容区域的平移变动量;根据包容区域变动量以及移动方向矢量,计算圆心的坐标;转到步骤4。 First calculate each non-contact measuring point separately and one of the effective contact points of the vertical median line, and then calculate the vertical median line and the center of the circle and the direction vector is The intersection point of the straight line, that is, the containment area changes to the measuring point When in contact, the virtual position of the center of the circle , all non-contact measuring points correspond to Form a collection , calculate the corresponding to each non-contact measuring point to the center distance ,all form a collection , in the collection in, remove and The corresponding elements of the opposite direction, and then query the collection The minimum value in is the translational variation of the containment area ;According to the amount of change in the containment area and the moving direction vector , calculate the coordinates of the center of the circle ; Go to step 4.

步骤9:进行与步骤2中相逆的坐标变换,测点坐标还原到原始值,计算坐标变换后的坐标,即为圆柱轴线L上一点,圆柱轴线L为方向矢量。 Step 9: Carry out the coordinate transformation opposite to that in step 2, restore the coordinates of the measuring point to the original value, and calculate Coordinates after coordinate transformation , which is a point on the cylinder axis L , and the cylinder axis L is is the direction vector.

步骤10:依次计算测点集中各个测点到轴线L的距离;并记录测点集中各个测点到轴线L距离的最小值,所记录距离最小值对应的测点集合为包容区域内边界的接触点集合,所记录距离的最小值为圆柱的半径RStep 10: Calculate the measurement point set in sequence The distance from each measuring point to the axis L ; and record the measuring point set The minimum value of the distance from each measuring point to the axis L , and the set of measuring points corresponding to the minimum value of the recorded distance is the set of contact points on the inner boundary of the containment area , the minimum recorded distance is the radius R of the cylinder.

步骤11:判断包容区域内边界的接触点集合中接触点的数量是否为3; Step 11: Determine the set of contact points within the boundary of the containment area Whether the number of touch points in is 3;

如果接触点的数量等于3,则对接触点进行的坐标转换,使坐标系z轴正向与圆柱轴线的方向矢量同向且平行,对接触点按其z轴坐标进行由小到大的排序,使z轴坐标递增,此时误差包容区域旋转变动的方向矢量等于轴线方向矢量的矢量叉乘;设置旋转变动角度的初始值;计算的点乘,如果点乘结果等于0,跳转到步骤18,如果点乘结果不等于0,跳转到下一步; If the number of contact points is equal to 3, the coordinate transformation of the contact points makes the z axis of the coordinate system positive and the axis of the cylinder The direction vector of In the same direction and parallel, the contact points are sorted from small to large according to their z-axis coordinates, so that , , The z -axis coordinates of the increase, at this time the direction vector of the error tolerance area rotation change equal to axis direction vector and The vector cross product; set the rotation angle initial value of ; calculate and If the dot product result is equal to 0, go to step 18, if the dot product result is not equal to 0, go to the next step;

如果接触点的数量不为3,跳转到步骤14。 If the number of touch points is not 3, go to step 14.

步骤12:计算旋转角度后的矢量方向;然后,将3个接触点投影在垂直于的平面内,并计算3个接触点的外接圆的圆心,根据外接圆心与确定旋转后的圆柱的轴线Step 12: Calculate around to rotate vector direction after angle ; Then, project the 3 contact points perpendicular to In the plane of , and calculate the center of the circumcircle of the three contact points, according to the circumcenter and Determine the axis of the rotated cylinder .

步骤13:计算所有非接触点到的距离,如果 ,则表示变动量不足,旋转角度变为;否则,变动过大,其余非接触测点超出包容区域,旋转角度变为Step 13: Calculate all non-contact points to distance ,if , it means that the amount of change is insufficient, and the rotation angle becomes ;Otherwise, the change is too large, and the rest of the non-contact measurement points exceed the containment area, and the rotation angle becomes ;

判断前后两次的迭代值之差是否小于设定的误差允许值;若前后两次的迭代值之差小于设定的误差允许值,则说明找到第4个接触点,则将赋值给,跳转到步骤10;若前后两次的迭代值之差不小于设定的误差允许值,则跳转到步骤12。 judge Whether the difference between the two iteration values before and after is less than the set error allowable value; if The difference between the two iteration values before and after is less than the set error allowable value, it means that the fourth contact point is found, then the assigned to , skip to step 10; if The difference between the two iteration values before and after is not less than the set If the allowable value of error is exceeded, then go to step 12.

步骤14:判断包容区域内边界的接触点集合中接触点的数量是否为4; Step 14: Determine the set of contact points within the boundary of the containment area Whether the number of touch points in is 4;

如果接触点的数量等于4,设定圆柱半径增加量的初始值,跳转到下一步; If the number of contact points equals 4, sets the cylinder radius increment The initial value, jump to the next step;

如果接触点的数量不等于4,则跳转到步骤17。 If the number of touch points is not equal to 4, go to step 17.

步骤15:加当前的圆柱半径得到,得到尺寸变动后圆柱,其轴线为,每个接触点到轴线的距离等于的关系,得到以下计算式, Step 15: plus the current cylinder radius get , to get the cylinder after size change, its axis is , each contact point to the axis distance equal to relationship, the following formula is obtained,

其中为轴线的方向矢量,为轴线上一点,以为未知量,分别得到4个四元非线性方程,通过非线性方程组可以求解出4个未知量,得到圆柱的轴线in axis The direction vector of axis last point to , is the unknown quantity, and four quaternary nonlinear equations are obtained respectively, and the four unknown quantities can be solved through the nonlinear equation system, and the axis of the cylinder can be obtained .

步骤16:依次计算所有非接触点到的距离,所有非接触测点对应的组成集合,如果 +,则表示变动量不足,变为;如果 +,则变动过大,其余非接触测点超出包容区域,变为Step 16: Calculate all non-contact points in sequence to distance , all non-contact measuring points corresponding to Form a set ,if + , it means that the amount of change is insufficient, becomes ;if + , the change is too large, and the rest of the non-contact measuring points exceed the containment area, becomes ;

判断前后2次的迭代值之差是否小于设定的误差允许值;如果前后2次的迭代值之差小于设定的误差允许值,说明找到第5个接触点,将分别赋值给轴线L的参数,并判断是否满足判别准则,若满足则跳转到步骤18,若不满足判别准则,跳转到步骤10;如果前后2次的迭代值之差不小于设定的误差允许值,则跳转到步骤15。 judge Whether the difference between the two iteration values before and after is less than the set value Allowable value of error; if The difference between the two iteration values before and after is less than the set value Allowable value of error, indicating that the fifth contact point is found, the , The parameters assigned to the axis L respectively , , and judge whether the criterion is satisfied, if so, go to step 18, if not, go to step 10; if The difference between the two iteration values before and after is not less than the set value If the allowable value of error is exceeded, then go to step 15.

步骤17:判断包容区域内边界的接触点集合中接触点的数量是否大于等于5; Step 17: Determine the set of contact points within the boundary of the containment area Whether the number of contact points is greater than or equal to 5;

如果接触点的数量小于5,跳转到步骤10; If the number of contact points is less than 5, go to step 10;

如果接触点的数量大于等于5,以接触点集合中4个为1个组合,并以其中1个组合为计算对象,根据步骤15、16中的试探性微量调整的方法确定If the number of contact points is greater than or equal to 5, take 4 of the contact point sets as a combination, and take one of the combinations as the calculation object, and determine it according to the method of tentative micro-adjustment in steps 15 and 16 ;

判断是否小于设定的误差允许值;如果小于设定的误差允许值,判断是否满足判别准则,如果满足则跳转到步骤18,如果不满足判别准则,换1个组合,重新计算,重新进行判断,依次迭代下去;如果大于设定的误差允许值,将计算得到的的参数赋值分别给圆柱轴线L的参数,然后跳转到步骤10。 judge Is it less than the set Allowable value of error; if less than set Allowable error value, judge whether the criterion is met, if yes, jump to step 18, if not, change to another combination, and recalculate , re-judgment, and iterate in turn; if greater than the set Allowable value of error, will be calculated from the Assignment of parameters to the parameters of the cylinder axis L respectively , , and then skip to step 10.

步骤18:输出圆柱度误差、圆柱半径的最优值R以及圆柱轴线L的参数。 Step 18: Output the parameters of the cylindricity error, the optimal value R of the radius of the cylinder, and the axis L of the cylinder.

上述方法中,所述的步骤3至步骤8,可以单独用来计算回转体零件截面圆的最大内接圆度以及作用尺寸。 In the above method, the steps 3 to 8 can be used alone to calculate the maximum inscribed circularity and functional size of the cross-sectional circle of the revolving body part.

本发明另一种计算圆柱体零件作用尺寸的方法,用于计算圆柱体的最小外接尺寸,其特点是与最大内接尺寸的计算过程基本一致,不同点在于查询接触点的方式、包容区域的变动方向,包括如下步骤: Another method of calculating the active dimension of a cylinder part in the present invention is used to calculate the minimum circumscribed dimension of a cylinder, which is characterized in that it is basically the same as the calculation process of the maximum inscribed dimension, the difference lies in the way of querying the contact point and the size of the containment area Change direction, including the following steps:

步骤1:将被测圆柱置于测量平台上,在测量空间直角坐标系中测量并获取圆柱表面上的点=1,2,…,n代表测点数目且n为大于5的正整数;所有测点形成测点集Step 1: Place the measured cylinder on the measurement platform, measure and obtain points on the surface of the cylinder in the measurement space Cartesian coordinate system , =1,2,…, n represents the number of measuring points and n is a positive integer greater than 5; all measuring points Form a point set .

步骤2:随机给出圆柱的参数,即圆柱的轴线L方向矢量;进行坐标系的旋转变换,使坐标系z轴平行于圆柱轴线L方向矢量;坐标变换后,将测点投影在xoy平面内,得到测点坐标;所有测点形成测点集Step 2: Randomly give the parameters of the cylinder, that is, the axis L direction vector of the cylinder ; Carry out the rotation transformation of the coordinate system, so that the z axis of the coordinate system is parallel to the cylinder axis L direction vector ;After the coordinate transformation, the measured point Projected on the xoy plane to get the measuring point coordinate ;all measuring points Form a point set .

步骤3:在点集中,任意取出3个测点,并计算3个测点组成三角形的外接圆心,作为圆心的迭代初始值。 Step 3: In point set , take 3 measuring points arbitrarily, and calculate the circumcenter of the triangle formed by the 3 measuring points , as the center of the circle The initial value of iteration.

步骤4:依次计算测点集中各测点到圆心的距离;并记录测点集中各测点到圆心坐标距离的最大距离所对应的测点,得到误差包容区域外边界的接触点集合Step 4: Calculate the measurement point set in sequence From each measuring point to the center of the circle distance; and record the set of measuring points coordinates from each measuring point to the center of the circle The measurement point corresponding to the maximum distance of the distance, and the contact point set of the outer boundary of the error tolerance area is obtained .

步骤5:判断误差包容区域外边界的接触点集合中是否只有1个接触点; Step 5: Determine the set of contact points on the outer boundary of the error tolerance area Is there only 1 touchpoint in ;

如果只有1个接触点,则该接触点为有效接触点,此时包容区域平移的方向矢量等于接触点坐标减去圆心坐标,跳转到步骤8; If there is only one contact point, the contact point is a valid contact point, and the direction vector of the containment area translation at this time It is equal to the coordinates of the contact point minus the coordinates of the center of the circle , jump to step 8;

如果接触点数量大于1,则跳转到下一步。 If the number of touch points is greater than 1, skip to the next step.

步骤6:判断误差包容区域外边界的接触点集合中是否只有2个接触点; Step 6: Determine the set of contact points on the outer boundary of the error tolerance area Is there only 2 touchpoints in ;

如果只有2个接触点,则这2个接触点为有效接触点,此时包容区域平移的方向矢量等于2个接触点连线的中点坐标减去圆心坐标,跳转到步骤8; If there are only 2 contact points, these 2 contact points are valid contact points, and the direction vector of the containment area translation at this time It is equal to the coordinates of the midpoint of the line connecting the two contact points minus the coordinates of the center of the circle , jump to step 8;

如果接触点数量大于2,则跳转到下一步。 If the number of touch points is greater than 2, skip to the next step.

步骤7:计算各个接触点相对圆心的相位角Step 7: Calculate individual touchpoints relative center the phase angle of ,

所有接触点的相位角形成集合,对中的元素进行排序,得到向量,计算向量中相邻2个相位角之差, Phase angles of all contact points form a collection ,right The elements in are sorted to get a vector , to calculate the vector 2 adjacent phase angles in Difference,

为接触点的数量;计算,如果,则满足锐角三角形准则或直径准则,跳转到步骤9;如果,查询对应的2个接触点,所查询到的2个接触点有效接触点,其余接触点为无效接触点,此时包容区域平移的方向矢量等于2个有效接触点连线的中点坐标减去圆心坐标。 is the number of touchpoints; calculate ,if , then the acute triangle criterion or the diameter criterion is met, and skip to step 9; if ,Inquire For the corresponding two contact points, the queried two contact points are valid contact points, and the remaining contact points are invalid contact points. At this time, the direction vector of the containment area translation It is equal to the coordinates of the midpoint of the line between two effective contact points minus the center of the circle coordinate.

步骤8:依次计算包容区域变动到与每个非接触测点接触时的圆心虚拟位置Step 8: Calculate the change of containment area in sequence to each non-contact measuring point The virtual position of the center of the circle at the time of contact ;

首先分别计算各个非接触测点和其中一个有效接触点的垂直中分线,然后计算垂直中分线与过圆心且方向矢量为的直线的交点,即为包容区域变动到与该测点接触时,圆心的虚拟位置,所有的非接触测点对应的组成集合,计算各个非接触测点对应的到圆心的距离,所有的构成集合,在集合中,剔除异向的对应元素,然后查询集合中的最小值,即为包容区域的平移变动量;根据包容区域变动量以及移动方向矢量,计算圆心的坐标;转到步骤4。 First calculate each non-contact measuring point separately and one of the effective contact points of the vertical median line, and then calculate the vertical median line and the center of the circle and the direction vector is The intersection point of the straight line, that is, the containment area changes to the measuring point When in contact, the virtual position of the center of the circle , all non-contact measuring points correspond to Form a set , calculate the corresponding to each non-contact measuring point to the center distance ,all form a collection , in the collection in, remove and The corresponding elements of the opposite direction, and then query the collection The minimum value in is the translational variation of the containment area ;According to the amount of change in the containment area and the moving direction vector , calculate the coordinates of the center of the circle ; Go to step 4.

步骤9:进行与步骤2中相逆的坐标变换,测点坐标还原到原始值,计算坐标变换后的坐标,即为圆柱轴线L上一点,圆柱轴线L为方向矢量。 Step 9: Carry out the coordinate transformation opposite to that in step 2, restore the coordinates of the measuring point to the original value, and calculate Coordinates after coordinate transformation , which is a point on the cylinder axis L , and the cylinder axis L is is the direction vector.

步骤10:依次计算测点集中各个测点到轴线L的距离;并记录测点集中各个测点到轴线L距离的最大值,所记录距离最大值对应的测点集合为包容区域外边界的接触点集合,所记录距离的最大值为圆柱的半径RStep 10: Calculate the measurement point set in sequence The distance from each measuring point to the axis L ; and record the measuring point set The maximum value of the distance from each measuring point to the axis L , and the set of measuring points corresponding to the maximum recorded distance is the set of contact points on the outer boundary of the containment area , the maximum recorded distance is the radius R of the cylinder.

步骤11:判断包容区域外边界的接触点集合中接触点的数量是否为3; Step 11: Determine the set of contact points on the outer boundary of the containment area Whether the number of touch points in is 3;

如果接触点的数量等于3,则对接触点进行的坐标转换,使坐标系z轴正向与圆柱轴线的方向矢量同向且平行,对接触点按其z轴坐标进行由小到大的排序,使z轴坐标递增,此时误差包容区域旋转变动的方向矢量等于轴线方向矢量的矢量叉乘;设置旋转变动角度的初始值;计算的点乘,如果点乘结果等于0,跳转到步骤18,如果点乘结果不等于0,跳转到下一步; If the number of contact points is equal to 3, the coordinate transformation of the contact points makes the z axis of the coordinate system positive and the axis of the cylinder The direction vector of In the same direction and parallel, the contact points are sorted from small to large according to their z-axis coordinates, so that , , The z -axis coordinates of the increase, at this time the direction vector of the error tolerance area rotation change equal to axis direction vector and The vector cross product; set the rotation angle initial value of ; calculate and If the dot product result is equal to 0, go to step 18, if the dot product result is not equal to 0, go to the next step;

如果接触点的数量不为3,跳转到步骤14。 If the number of touch points is not 3, go to step 14.

步骤12:计算旋转角度后的矢量方向;然后,将3个接触点投影在垂直于的平面内,并计算3个接触点的外接圆的圆心,根据外接圆心与确定旋转后的圆柱的轴线Step 12: Calculate around to rotate vector direction after angle ; Then, project the 3 contact points perpendicular to In the plane of , and calculate the center of the circumcircle of the three contact points, according to the circumcenter and Determine the axis of the rotated cylinder .

步骤13:计算所有非接触测点到的距离,如果 ,则表示变动量不足,旋转角度变为;如果 ,变动过大,其余非接触测点超出包容区域,旋转角度变为Step 13: Compute all non-contact points to distance ,if , it means that the amount of change is insufficient, and the rotation angle becomes ;if , the change is too large, the rest of the non-contact measuring points are beyond the containment area, the rotation angle becomes ;

判断前后两次的迭代值之差是否小于设定的误差允许值;若前后两次的迭代值之差小于设定的误差允许值,则说明找到第4个接触点,则将赋值给,跳转到步骤10;若前后两次的迭代值之差不小于设定的误差允许值,则跳转到步骤12。 judge Whether the difference between the two iteration values before and after is less than the set error allowable value; if The difference between the two iteration values before and after is less than the set error allowable value, it means that the fourth contact point is found, then the assigned to , skip to step 10; if The difference between the two iteration values before and after is not less than the set If the allowable value of error is exceeded, then go to step 12.

步骤14:判断包容区域外边界的接触点集合中接触点的数量是否为4; Step 14: Determine the set of contact points on the outer boundary of the containment area Whether the number of touch points in is 4;

如果接触点的数量等于4,设定圆柱半径减小量的初始值,跳转到下一步; If the number of contact points is equal to 4, set the cylinder radius reduction amount The initial value, jump to the next step;

如果接触点的数量不等于4,则跳转到步骤17。 If the number of touch points is not equal to 4, go to step 17.

步骤15:减去当前的圆柱半径得到,得到尺寸变动后圆柱,其轴线为,每个接触点到轴线的距离等于的关系,得到以下计算式, Step 15: Subtract the current cylinder radius get , to get the cylinder after size change, its axis is , each contact point to the axis distance equal to relationship, the following formula is obtained,

其中为轴线的方向矢量,为轴线上一点,以为未知量,分别得到4个四元非线性方程,通过非线性方程组可以求解出4个未知量,得到圆柱的轴线in axis The direction vector of axis last point to , is the unknown quantity, and four quaternary nonlinear equations are obtained respectively, and the four unknown quantities can be solved through the nonlinear equation system, and the axis of the cylinder can be obtained .

步骤16:依次计算所有非接触点到的距离,所有非接触测点对应的组成集合,如果 +,则表示变动量不足,变为;如果 +,则变动过大,其余非接触测点超出包容区域,变为Step 16: Calculate all non-contact points in sequence to distance , all non-contact measuring points corresponding to Form a collection ,if + , it means that the amount of change is insufficient, becomes ;if + , the change is too large, and the rest of the non-contact measuring points exceed the containment area, becomes ;

判断前后2次的迭代值之差是否小于设定的误差允许值;如果前后2次的迭代值之差小于设定的误差允许值,说明找到第5个接触点,将分别赋值给轴线L的参数,并判断是否满足判别准则,若满足则跳转到步骤18,若不满足判别准则,跳转到步骤10;如果前后2次的迭代值之差不小于设定的误差允许值,则跳转到步骤15。 judge Whether the difference between the two iteration values before and after is less than the set value Allowable value of error; if The difference between the two iteration values before and after is less than the set value Allowable value of error, indicating that the fifth contact point is found, the , The parameters assigned to the axis L respectively , , and judge whether the criterion is satisfied, if so, go to step 18, if not, go to step 10; if The difference between the two iteration values before and after is not less than the set value If the allowable value of error is exceeded, then go to step 15.

步骤17:判断包容区域外边界的接触点集合中接触点的数量是否大于等于5; Step 17: Determine the set of contact points on the outer boundary of the containment area Whether the number of contact points is greater than or equal to 5;

如果接触点的数量小于5,跳转到步骤10; If the number of contact points is less than 5, go to step 10;

如果接触点的数量大于等于5,以接触点集合中4个为1个组合,并以其中1个组合为计算对象,根据步骤15、16中的试探性微量调整的方法确定If the number of contact points is greater than or equal to 5, take 4 of the contact point sets as a combination, and take one of the combinations as the calculation object, and determine it according to the method of tentative micro-adjustment in steps 15 and 16 ;

判断是否小于设定的误差允许值;如果小于设定的误差允许值,判断是否满足判别准则,如果满足则跳转到步骤18,如果不满足判别准则,换1个组合,重新计算,重新进行判断,依次迭代下去;如果大于设定的误差允许值,将计算得到的的参数赋值分别给圆柱轴线L的参数,然后跳转到步骤10。 judge Is it less than the set Allowable value of error; if less than set Allowable error value, judge whether the criterion is met, if yes, jump to step 18, if not, change to another combination, and recalculate , re-judgment, and iterate in turn; if greater than the set Allowable value of error, will be calculated from the Assignment of parameters to the parameters of the cylinder axis L respectively , , and then skip to step 10.

步骤18:输出圆柱度误差、圆柱半径的最优值R以及圆柱轴线L的参数。 Step 18: Output the parameters of the cylindricity error, the optimal value R of the radius of the cylinder, and the axis L of the cylinder.

上述方法中,所述的步骤3至步骤8,可以单独用来计算回转体零件截面圆的最小外接圆度以及作用尺寸。 In the above method, the steps 3 to 8 can be used alone to calculate the minimum circumscribed circularity and functional size of the cross-sectional circle of the revolving body part.

上述方法中,所述的技术方案,可以计算空间任意方向直线度。 In the above method, the said technical solution can calculate the straightness in any direction in space.

上述方法中,所述的步骤3至步骤8,可以计算任意方向线对线平行度误差。首先,进行坐标旋转变换,使基准线的方向矢量平行于z正,同时被测线的离散点作相应的刚体旋转,此时被测线的包容圆柱在xoy平面内投影为圆。然后可应用上述方法中所述的步骤3至步骤8,对被测线的离散点投影进行拟合。 In the above method, the step 3 to step 8 can calculate the line-to-line parallelism error in any direction. Firstly, carry out coordinate rotation transformation so that the direction vector of the reference line is parallel to z , and at the same time, the discrete points of the measured line are rotated correspondingly. At this time, the enclosing cylinder of the measured line is projected as a circle in the xoy plane. Then step 3 to step 8 described in the above method can be applied to fit the discrete point projection of the measured line.

上述方法中,所述的步骤3至步骤8,可以计算任意方向线对面垂直度误差。首先进行坐标旋转变换,使基准面的法向矢量平行于z正,同时被测线的离散点作相应的刚体旋转,此时被测线的包容圆柱在xoy平面内投影为圆。然后可应用上述方法中所述的步骤3至步骤8,对被测线的离散点投影进行拟合。 In the above method, the above-mentioned step 3 to step 8 can calculate the perpendicularity error between lines in any direction. First, carry out coordinate rotation transformation, so that the normal vector of the datum plane is parallel to z , and at the same time, the discrete points of the measured line are rotated correspondingly. At this time, the containing cylinder of the measured line is projected as a circle in the xoy plane. Then step 3 to step 8 described in the above method can be applied to fit the discrete point projection of the measured line.

本发明依据圆柱自身的特征,在圆柱半径的优化方向上,对包容区域进行相应平移变动、旋转变动或平移变动,最终计算出圆柱参数最优值和圆柱度误差最优值。 According to the characteristics of the cylinder itself, the invention performs corresponding translational changes, rotational changes or translational changes on the containment area in the optimization direction of the cylinder radius, and finally calculates the optimal value of the cylindrical parameters and the optimal value of the cylindricity error.

本发明的有益效果在于: The beneficial effects of the present invention are:

计算得出的圆柱半径为最优值,接触点的相对位置满足判别准则,计算稳定性好、计算效率高。 The calculated cylinder radius is the optimal value, the relative position of the contact point meets the criterion, the calculation stability is good, and the calculation efficiency is high.

对于本领域技术人员来说,根据和应用本发明公开的构思,能够容易地对本发明方案进行各种变形和改变,应当注意的是,所有这些变形和改变都应当属于本发明的范围。 For those skilled in the art, based on and applying the concepts disclosed in the present invention, various modifications and changes can be easily made to the solution of the present invention. It should be noted that all these modifications and changes should belong to the scope of the present invention.

附图说明 Description of drawings

图1为本发明的圆柱的最大内接半径计算流程图。 Fig. 1 is a flow chart of calculating the maximum inscribed radius of a cylinder according to the present invention.

图2为本发明的圆柱的最大内接半径计算效果图。 Fig. 2 is a calculation effect diagram of the maximum inscribed radius of the cylinder of the present invention.

图3为本发明的圆柱的最小外接半径计算效果图。 Fig. 3 is a calculation effect diagram of the minimum circumscribed radius of the cylinder of the present invention.

具体实施方式 Detailed ways

实施例1: Example 1:

一种计算圆柱体零件作用尺寸的方法,用于计算圆柱体的最大内接尺寸,如附图1所示,包括如下步骤: A method for calculating the effective size of a cylinder part, which is used to calculate the maximum inscribed size of a cylinder, as shown in Figure 1, includes the following steps:

步骤1:将被测圆柱置于测量平台上,在测量空间直角坐标系中测量并获取圆柱表面上的点=1,2,…,n代表测点数目且n为大于5的正整数;所有测点形成测点集Step 1: Place the measured cylinder on the measurement platform, measure and obtain points on the surface of the cylinder in the measurement space Cartesian coordinate system , =1,2,…, n represents the number of measuring points and n is a positive integer greater than 5; all measuring points Form a point set .

步骤2:随机给出圆柱的参数,即圆柱的轴线L方向矢量;进行坐标系的旋转变换,使坐标系z轴平行于圆柱轴线L方向矢量;坐标变换后,将测点投影在xoy平面内,得到测点坐标;所有测点形成测点集Step 2: Randomly give the parameters of the cylinder, that is, the axis L direction vector of the cylinder ; Carry out the rotation transformation of the coordinate system, so that the z axis of the coordinate system is parallel to the cylinder axis L direction vector ;After the coordinate transformation, the measured point Projected on the xoy plane to get the measuring point coordinate ;all measuring points Form a point set .

步骤3:在点集中,任意取出3个测点,并计算3个测点组成三角形的外接圆心,作为圆心的迭代初始值。 Step 3: In point set , take 3 measuring points arbitrarily, and calculate the circumcenter of the triangle formed by the 3 measuring points , as the center of the circle The initial value of iteration.

步骤4:依次计算测点集中各测点到圆心的距离;并记录测点集中各测点到圆心坐标距离的最小距离所对应的测点,得到误差包容区域内边界的接触点集合Step 4: Calculate the measurement point set in sequence From each measuring point to the center of the circle distance; and record the set of measuring points coordinates from each measuring point to the center of the circle The measurement point corresponding to the minimum distance of the distance, and the contact point set of the boundary of the error tolerance area is obtained .

步骤5:判断误差包容区域内边界的接触点集合中是否只有1个接触点; Step 5: Determine the set of contact points within the boundary of the error tolerance area Is there only 1 touchpoint in ;

如果只有1个接触点,则该接触点为有效接触点,此时包容区域平移的方向矢量等于圆心坐标减去接触点坐标,跳转到步骤8; If there is only one contact point, the contact point is a valid contact point, and the direction vector of the containment area translation at this time equal to the coordinates of the center of the circle Subtract the contact point coordinates and jump to step 8;

如果接触点数量大于1,则跳转到下一步。 If the number of touch points is greater than 1, skip to the next step.

步骤6:判断误差包容区域内边界的接触点集合中是否只有2个接触点; Step 6: Determine the set of contact points within the boundary of the error tolerance area Is there only 2 touchpoints in ;

如果只有2个接触点,则这2个接触点为有效接触点,此时包容区域平移的方向矢量等于圆心坐标减去2个接触点连线的中点坐标,跳转到步骤8; If there are only 2 contact points, these 2 contact points are valid contact points, and the direction vector of the containment area translation at this time equal to the coordinates of the center of the circle Subtract the coordinates of the midpoint of the line connecting the two contact points, and skip to step 8;

如果接触点数量大于2,则跳转到下一步。 If the number of touch points is greater than 2, skip to the next step.

步骤7:计算各个接触点相对圆心的相位角Step 7: Calculate individual touchpoints relative center the phase angle of ,

所有接触点的相位角形成集合,对中的元素进行排序,得到向量,计算向量中相邻2个相位角之差, Phase angles of all contact points form a set ,right The elements in are sorted to get a vector , to calculate the vector 2 adjacent phase angles in Difference,

为接触点的数量;计算,如果,则满足锐角三角形准则,跳转到步骤9;如果,查询对应的2个接触点,所查询到的2个接触点有效接触点,其余接触点为无效接触点,此时包容区域平移的方向矢量等于圆心坐标减去2有效接触点连线的中点坐标。 is the number of touchpoints; calculate ,if , then the acute triangle criterion is met, and skip to step 9; if ,Inquire For the corresponding two contact points, the queried two contact points are valid contact points, and the remaining contact points are invalid contact points. At this time, the direction vector of the containment area translation equal to the coordinates of the center of the circle Subtract 2 from the midpoint coordinates of the line connecting the effective contact points.

步骤8:依次计算包容区域变动到与每个非接触测点接触时的圆心虚拟位置Step 8: Calculate the change of containment area in sequence to each non-contact measuring point The virtual position of the center of the circle at the time of contact ;

首先分别计算各个非接触测点和其中一个有效接触点的垂直中分线,然后计算垂直中分线与过圆心且方向矢量为的直线的交点,即为包容区域变动到与该测点接触时,圆心的虚拟位置,所有的非接触测点对应的组成集合,计算各个非接触测点对应的到圆心的距离,所有的构成集合,在集合中,剔除异向的对应元素,然后查询集合中的最小值,即为包容区域的平移变动量;根据包容区域变动量以及移动方向矢量,计算圆心的坐标;转到步骤4。 First calculate each non-contact measuring point separately and one of the effective contact points of the vertical median line, and then calculate the vertical median line and the center of the circle and the direction vector is The intersection point of the straight line, that is, the containment area changes to the measuring point When in contact, the virtual position of the center of the circle , all non-contact measuring points correspond to Form a collection , calculate the corresponding to each non-contact measuring point to the center distance ,all form a collection , in the collection in, remove and The corresponding elements of the opposite direction, and then query the collection The minimum value in is the translational variation of the containment area ;According to the amount of change in the containment area and the moving direction vector , calculate the coordinates of the center of the circle ; Go to step 4.

步骤9:进行与步骤2中相逆的坐标变换,测点坐标还原到原始值,计算坐标变换后的坐标,即为圆柱轴线L上一点,圆柱轴线L为方向矢量。 Step 9: Carry out the coordinate transformation opposite to that in step 2, restore the coordinates of the measuring point to the original value, and calculate Coordinates after coordinate transformation , which is a point on the cylinder axis L , and the cylinder axis L is is the direction vector.

步骤10:依次计算测点集中各个测点到轴线L的距离;并记录测点集中各个测点到轴线L距离的最小值,所记录距离最小值对应的测点集合为包容区域内边界的接触点集合,所记录距离的最小值为圆柱的半径RStep 10: Calculate the measurement point set in sequence The distance from each measuring point to the axis L ; and record the measuring point set The minimum value of the distance from each measuring point to the axis L , and the set of measuring points corresponding to the minimum value of the recorded distance is the set of contact points on the inner boundary of the containment area , the minimum recorded distance is the radius R of the cylinder.

步骤11:判断包容区域内边界的接触点集合中接触点的数量是否为3; Step 11: Determine the set of contact points within the boundary of the containment area Whether the number of touch points in is 3;

如果接触点的数量等于3,则对接触点进行的坐标转换,使坐标系z轴正向与圆柱轴线的方向矢量同向且平行,对接触点按其z轴坐标进行由小到大的排序,使z轴坐标递增,此时误差包容区域旋转变动的方向矢量等于轴线方向矢量的矢量叉乘;设置旋转变动角度的初始值;计算的点乘,如果点乘结果等于0,跳转到步骤18,如果点乘结果不等于0,跳转到下一步; If the number of contact points is equal to 3, the coordinate transformation of the contact points makes the z axis of the coordinate system positive and the axis of the cylinder The direction vector of In the same direction and parallel, the contact points are sorted from small to large according to their z-axis coordinates, so that , , The z -axis coordinates of the increase, at this time the direction vector of the error tolerance area rotation change equal to axis direction vector and The vector cross product; set the rotation angle initial value of ; calculate and If the dot product result is equal to 0, go to step 18, if the dot product result is not equal to 0, go to the next step;

如果接触点的数量不为3,跳转到步骤14。 If the number of touch points is not 3, go to step 14.

步骤12:计算旋转角度后的矢量方向;然后,将3个接触点投影在垂直于的平面内,并计算3个接触点的外接圆的圆心,根据外接圆心与确定旋转后的圆柱的轴线Step 12: Calculate around to rotate vector direction after angle ; Then, project the 3 contact points perpendicular to In the plane of , and calculate the center of the circumcircle of the three contact points, according to the circumcenter and Determine the axis of the rotated cylinder .

步骤13:计算所有非接触点到的距离,如果 ,则表示变动量不足,旋转角度变为;否则,变动过大,其余非接触测点超出包容区域,旋转角度变为Step 13: Calculate all non-contact points to distance ,if , it means that the amount of change is insufficient, and the rotation angle becomes ;Otherwise, the change is too large, and the rest of the non-contact measurement points exceed the containment area, and the rotation angle becomes ;

判断前后两次的迭代值之差是否小于设定的误差允许值;若前后两次的迭代值之差小于设定的误差允许值,则说明找到第4个接触点,则将赋值给,跳转到步骤10;若前后两次的迭代值之差不小于设定的误差允许值,则跳转到步骤12。 judge Whether the difference between the two iteration values before and after is less than the set error allowable value; if The difference between the two iteration values before and after is less than the set error allowable value, it means that the fourth contact point is found, then the assigned to , skip to step 10; if The difference between the two iteration values before and after is not less than the set If the allowable value of error is exceeded, then go to step 12.

步骤14:判断包容区域内边界的接触点集合中接触点的数量是否为4; Step 14: Determine the set of contact points within the boundary of the containment area Whether the number of touch points in is 4;

如果接触点的数量等于4,设定圆柱半径增加量的初始值,跳转到下一步; If the number of contact points equals 4, sets the cylinder radius increment The initial value, jump to the next step;

如果接触点的数量不等于4,则跳转到步骤17。 If the number of touch points is not equal to 4, go to step 17.

步骤15:加当前的圆柱半径得到,得到尺寸变动后圆柱,其轴线为,每个接触点到轴线的距离等于的关系,得到以下计算式, Step 15: plus the current cylinder radius get , to get the cylinder after size change, its axis is , each contact point to the axis distance equal to relationship, the following formula is obtained,

其中为轴线的方向矢量,为轴线上一点,以为未知量,分别得到4个四元非线性方程,通过非线性方程组可以求解出4个未知量,得到圆柱的轴线in axis The direction vector of axis last point to , is the unknown quantity, and four quaternary nonlinear equations are obtained respectively, and the four unknown quantities can be solved through the nonlinear equation system, and the axis of the cylinder can be obtained .

步骤16:依次计算所有非接触点到的距离,所有非接触测点对应的组成集合,如果 +,则表示变动量不足,变为;如果 +,则变动过大,其余非接触测点超出包容区域,变为Step 16: Calculate all non-contact points in sequence to distance , all non-contact measuring points corresponding to Form a collection ,if + , it means that the amount of change is insufficient, becomes ;if + , the change is too large, and the rest of the non-contact measuring points exceed the containment area, becomes ;

判断前后2次的迭代值之差是否小于设定的误差允许值;如果前后2次的迭代值之差小于设定的误差允许值,说明找到第5个接触点,将分别赋值给轴线L的参数,将各个接触点分别代入下式, judge Whether the difference between the two iteration values before and after is less than the set value Allowable value of error; if The difference between the two iteration values before and after is less than the set value Allowable value of error, indicating that the fifth contact point is found, the , The parameters assigned to the axis L respectively , , substituting each contact point into the following formula,

其中为接触点相对轴线的相位角,从而得到每个接触点对应的,构造下列判别函数, in as touch point The phase angle relative to the axis, so that each contact point corresponds to , construct the following discriminant function,

是由下列不等式组确定的可行域: is the feasible region determined by the following set of inequalities:

上式中,第一个约束是矢量方程,表示4维的零列向量,第二、三个约束为数值方程,为接触点的数量,判断是最优解判别值是否等于0,如果等于0表示满足判别准则,跳转到步骤18,如果不等于0表示不满足判别准则,跳转到步骤10;如果前后2次的迭代值之差不小于设定的误差允许值,则跳转到步骤15。 In the above formula, the first constraint is the vector equation, Represents a 4-dimensional zero-column vector, the second and third constraints are numerical equations, is the number of contact points, and the judgment is the optimal solution discriminant value is equal to 0, if Equal to 0 means that the criterion is satisfied, jump to step 18, if If it is not equal to 0, it means that the judgment criterion is not satisfied, and jump to step 10; if The difference between the two iteration values before and after is not less than the set value If the allowable value of error is exceeded, then go to step 15.

步骤17:判断包容区域内边界的接触点集合中接触点的数量是否大于等于5; Step 17: Determine the set of contact points within the boundary of the containment area Whether the number of contact points is greater than or equal to 5;

如果接触点的数量小于5,跳转到步骤10; If the number of contact points is less than 5, go to step 10;

如果接触点的数量大于等于5,以接触点集合中4个为1个组合,并以其中1个组合为计算对象,根据步骤15、16中的试探性微量调整的方法确定If the number of contact points is greater than or equal to 5, take 4 of the contact point sets as a combination, and take one of the combinations as the calculation object, and determine it according to the method of tentative micro-adjustment in steps 15 and 16 ;

判断是否小于设定的误差允许值;如果小于设定的误差允许值,应用步骤16的方法判断是否满足判别准则,如果满足则跳转到步骤18,如果不满足判别准则,换1个组合,重新计算,重新进行判断,依次迭代下去;如果大于设定的误差允许值,将计算得到的的参数赋值分别给圆柱轴线L的参数,然后跳转到步骤10。 judge Is it less than the set Allowable value of error; if less than set Allowable error value, apply the method of step 16 to judge whether the criterion is satisfied, if so, jump to step 18, if not, change a combination and recalculate , re-judgment, and iterate in turn; if greater than the set Allowable value of error, will be calculated from the Assignment of parameters to the parameters of the cylinder axis L respectively , , and then skip to step 10.

步骤18:输出圆柱度误差、圆柱半径的最优值R以及圆柱轴线L的参数。 Step 18: Output the parameters of the cylindricity error, the optimal value R of the radius of the cylinder, and the axis L of the cylinder.

以下通过实验实例,说明本发明所公布方法计算的有效性。 The validity of the calculation of the method announced by the present invention is illustrated below through an experimental example.

在测量平台上,在圆柱体零件表面上获取24点,测点坐标如表1所示。应用本发明所公布的方法,计算出最大内接圆柱的作用半径为14.99985062mm,圆柱轴线方向矢量(-0.000459923841223342,-0.000624025400837475,0.999999699531135),圆柱轴线上一点坐标为(432.422127159553,137.332674827430,0.252514286852374),圆柱度为0.03418mm。计算的效果如附图2所示(图中,*为测点,O为接触点),第5、10、14、16、17号测点为接触点。分别计算各个接触点的映射,并计算最优解的判别值J,经计算J=1.1382e-014,满足判别准则,计算出的圆柱作用半径及圆柱度误差为最优解。 On the measuring platform, 24 points are obtained on the surface of the cylindrical part, and the coordinates of the measuring points are shown in Table 1.应用本发明所公布的方法,计算出最大内接圆柱的作用半径为14.99985062mm,圆柱轴线方向矢量(-0.000459923841223342,-0.000624025400837475,0.999999699531135),圆柱轴线上一点坐标为(432.422127159553,137.332674827430,0.252514286852374),圆柱The degree is 0.03418mm. The calculated effect is shown in Figure 2 (in the figure, * is the measuring point, O is the contact point), and the 5th, 10th, 14th, 16th and 17th measuring points are the contact points. Calculate each touchpoint separately Map, and calculate the discriminant value J of the optimal solution. After calculation, J = 1.1382e-014, which meets the discriminant criterion. The calculated cylinder action radius and cylindricity error are the optimal solution.

表1圆柱的测点坐标(单位:mmTable 1 The measuring point coordinates of the cylinder (unit: mm )

测点编号Measurement point number x坐标 x -coordinate y坐标 y- coordinate z坐标 z coordinate 测点编号Measurement point number x坐标 x -coordinate y坐标 y- coordinate z坐标 z coordinate 11 447.47556447.47556 137.3431137.3431 -92.99958-92.99958 1313 447.48749447.48749 137.37276137.37276 -85.66769-85.66769 22 440.00617440.00617 150.36197150.36197 -93.05586-93.05586 1414 439.98814439.98814 150.36122150.36122 -85.7225-85.7225 33 424.95893424.95893 150.38625150.38625 -93.05948-93.05948 1515 424.97535424.97535 150.38594150.38594 -85.72581-85.72581 44 417.45656417.45656 137.3433137.3433 -93.00753-93.00753 1616 417.4618417.4618 137.37364137.37364 -85.67423-85.67423 55 425.00292425.00292 124.3788124.3788 -92.95196-92.95196 1717 424.98576424.98576 124.38214124.38214 -85.61846-85.61846 66 439.9693439.9693 124.38485124.38485 -92.9484-92.9484 1818 439.98586439.98586 124.38661124.38661 -85.61504-85.61504 77 439.98027439.98027 124.38204124.38204 -89.28298-89.28298 1919 439.99686439.99686 124.38255124.38255 -81.94842-81.94842 88 424.99233424.99233 124.37691124.37691 -89.28517-89.28517 2020 424.96931424.96931 124.37052124.37052 -81.95173-81.95173 99 417.46167417.46167 137.3578137.3578 -89.34018-89.34018 21twenty one 417.459417.459 137.38801137.38801 -82.007-82.007 1010 424.96768424.96768 150.38132150.38132 -89.3926-89.3926 22twenty two 424.96877424.96877 150.40734150.40734 -82.05929-82.05929 1111 439.9954439.9954 150.36113150.36113 -89.38932-89.38932 23twenty three 439.98606439.98606 150.37835150.37835 -82.05603-82.05603 1212 447.48307447.48307 137.35783137.35783 -89.33457-89.33457 24twenty four 447.49399447.49399 137.38793137.38793 -82.0014-82.0014

实施例2: Example 2:

一种计算圆柱体零件作用尺寸的方法,用于计算圆柱体的最小外接尺寸时,包括如下步骤: A method for calculating the effective size of a cylindrical part, when used to calculate the minimum circumscribed size of a cylindrical body, includes the following steps:

步骤1:将被测圆柱置于测量平台上,在测量空间直角坐标系中测量并获取圆柱表面上的点=1,2,…,n代表测点数目且n为大于5的正整数;所有测点形成测点集Step 1: Place the measured cylinder on the measurement platform, measure and obtain points on the surface of the cylinder in the measurement space Cartesian coordinate system , =1,2,…, n represents the number of measuring points and n is a positive integer greater than 5; all measuring points Form a point set .

步骤2:随机给出圆柱的参数,即圆柱的轴线L方向矢量;进行坐标系的旋转变换,使坐标系z轴平行于圆柱轴线L方向矢量;坐标变换后,将测点投影在xoy平面内,得到测点坐标;所有测点形成测点集Step 2: Randomly give the parameters of the cylinder, that is, the axis L direction vector of the cylinder ; Carry out the rotation transformation of the coordinate system, so that the z axis of the coordinate system is parallel to the cylinder axis L direction vector ;After the coordinate transformation, the measured point Projected on the xoy plane to get the measuring point coordinate ;all measuring points Form a point set .

步骤3:在点集中,任意取出3个测点,并计算3个测点组成三角形的外接圆心,作为圆心的迭代初始值。 Step 3: In point set , take 3 measuring points arbitrarily, and calculate the circumcenter of the triangle formed by the 3 measuring points , as the center of the circle The initial value of iteration.

步骤4:依次计算测点集中各测点到圆心的距离;并记录测点集中各测点到圆心坐标距离的最大距离所对应的测点,得到误差包容区域外边界的接触点集合Step 4: Calculate the measurement point set in sequence From each measuring point to the center of the circle distance; and record the set of measuring points coordinates from each measuring point to the center of the circle The measurement point corresponding to the maximum distance of the distance, and the contact point set of the outer boundary of the error tolerance area is obtained .

步骤5:判断误差包容区域外边界的接触点集合中是否只有1个接触点; Step 5: Determine the set of contact points on the outer boundary of the error tolerance area Is there only 1 touchpoint in ;

如果只有1个接触点,则该接触点为有效接触点,此时包容区域平移的方向矢量等于接触点坐标减去圆心坐标,跳转到步骤8; If there is only one contact point, the contact point is a valid contact point, and the direction vector of the containment area translation at this time It is equal to the coordinates of the contact point minus the coordinates of the center of the circle , jump to step 8;

如果接触点数量大于1,则跳转到下一步。 If the number of touch points is greater than 1, skip to the next step.

步骤6:判断误差包容区域外边界的接触点集合中是否只有2个接触点; Step 6: Determine the set of contact points on the outer boundary of the error tolerance area Is there only 2 touchpoints in ;

如果只有2个接触点,则这2个接触点为有效接触点,此时包容区域平移的方向矢量等于2个接触点连线的中点坐标减去圆心坐标,跳转到步骤8; If there are only 2 contact points, these 2 contact points are valid contact points, and the direction vector of the containment area translation at this time It is equal to the coordinates of the midpoint of the line connecting the two contact points minus the coordinates of the center of the circle , jump to step 8;

如果接触点数量大于2,则跳转到下一步。 If the number of touch points is greater than 2, skip to the next step.

步骤7:计算各个接触点相对圆心的相位角Step 7: Calculate individual touchpoints relative center the phase angle of ,

所有接触点的相位角形成集合,对中的元素进行排序,得到向量,计算向量中相邻2个相位角之差, Phase angles of all contact points form a set ,right The elements in are sorted to get a vector , to calculate the vector 2 adjacent phase angles in Difference,

为接触点的数量;计算,如果,则满足锐角三角形准则或直径准则,跳转到步骤9;如果,查询对应的2个接触点,所查询到的2个接触点有效接触点,其余接触点为无效接触点,此时包容区域平移的方向矢量等于2个有效接触点连线的中点坐标减去圆心坐标。 is the number of touchpoints; calculate ,if , then the acute triangle criterion or the diameter criterion is met, and skip to step 9; if ,Inquire For the corresponding two contact points, the queried two contact points are valid contact points, and the remaining contact points are invalid contact points. At this time, the direction vector of the containment area translation It is equal to the coordinates of the midpoint of the line between two effective contact points minus the center of the circle coordinate.

步骤8:依次计算包容区域变动到与各个非接触测点接触时的圆心虚拟位置Step 8: Sequentially calculate the containment area changes to each non-contact measuring point The virtual position of the center of the circle at the time of contact ;

首先分别计算各个非接触测点和其中一个有效接触点的垂直中分线,然后计算垂直中分线与过圆心且方向矢量为的直线的交点,即为包容区域变动到与该测点接触时,圆心的虚拟位置,所有的非接触测点对应的组成集合,计算各个非接触测点对应的到圆心的距离,所有的构成集合,在集合中,剔除异向的对应元素,然后查询集合中的最小值,即为包容区域的平移变动量;根据包容区域变动量以及移动方向矢量,计算圆心的坐标;转到步骤4。 First calculate each non-contact measuring point separately and one of the effective contact points of the vertical median line, and then calculate the vertical median line and the center of the circle and the direction vector is The intersection point of the straight line, that is, the containment area changes to the measuring point When in contact, the virtual position of the center of the circle , all non-contact measuring points correspond to Form a set , calculate the corresponding to each non-contact measuring point to the center distance ,all form a collection , in the collection in, remove and The corresponding elements of the opposite direction, and then query the collection The minimum value in is the translational variation of the containment area ;According to the amount of change in the containment area and the moving direction vector , calculate the coordinates of the center of the circle ; Go to step 4.

步骤9:进行与步骤2中相逆的坐标变换,测点坐标还原到原始值,计算坐标变换后的坐标,即为圆柱轴线L上一点,圆柱轴线L为方向矢量。 Step 9: Carry out the coordinate transformation opposite to that in step 2, restore the coordinates of the measuring point to the original value, and calculate Coordinates after coordinate transformation , which is a point on the cylinder axis L , and the cylinder axis L is is the direction vector.

步骤10:依次计算测点集中各个测点到轴线L的距离;并记录测点集中各个测点到轴线L距离的最大值,所记录距离最大值对应的测点集合为包容区域外边界的接触点集合,所记录距离的最大值为圆柱的半径RStep 10: Calculate the measurement point set in sequence The distance from each measuring point to the axis L ; and record the measuring point set The maximum value of the distance from each measuring point to the axis L , and the set of measuring points corresponding to the maximum recorded distance is the set of contact points on the outer boundary of the containment area , the maximum recorded distance is the radius R of the cylinder.

步骤11:判断包容区域外边界的接触点集合中接触点的数量是否为3; Step 11: Determine the set of contact points on the outer boundary of the containment area Whether the number of touch points in is 3;

如果接触点的数量等于3,则对接触点进行的坐标转换,使坐标系z轴正向与圆柱轴线的方向矢量同向且平行,对接触点按其z轴坐标进行由小到大的排序,使z轴坐标递增,此时误差包容区域旋转变动的方向矢量等于轴线方向矢量的矢量叉乘;设置旋转变动角度的初始值;计算的点乘,如果点乘结果等于0,跳转到步骤18,如果点乘结果不等于0,跳转到下一步; If the number of contact points is equal to 3, the coordinate transformation of the contact points makes the z axis of the coordinate system positive and the axis of the cylinder The direction vector of In the same direction and parallel, the contact points are sorted from small to large according to their z-axis coordinates, so that , , The z -axis coordinates of the increase, at this time the direction vector of the error tolerance area rotation change equal to axis direction vector and The vector cross product; set the rotation angle initial value of ; calculate and If the dot product result is equal to 0, go to step 18, if the dot product result is not equal to 0, go to the next step;

如果接触点的数量不为3,跳转到步骤14。 If the number of touch points is not 3, go to step 14.

步骤12:计算旋转角度后的矢量方向;然后,将3个接触点投影在垂直于的平面内,并计算3个接触点的外接圆的圆心,根据外接圆心与确定旋转后的圆柱的轴线Step 12: Calculate around to rotate vector direction after angle ; Then, project the 3 contact points perpendicular to In the plane of , and calculate the center of the circumcircle of the three contact points, according to the circumcenter and Determine the axis of the rotated cylinder .

步骤13:计算所有非接触测点到的距离,如果 ,则表示变动量不足,旋转角度变为;如果 ,变动过大,其余非接触测点超出包容区域,旋转角度变为Step 13: Compute all non-contact points to distance ,if , it means that the amount of change is insufficient, and the rotation angle becomes ;if , the change is too large, the rest of the non-contact measuring points are beyond the containment area, the rotation angle becomes ;

判断前后两次的迭代值之差是否小于设定的误差允许值;若前后两次的迭代值之差小于设定的误差允许值,则说明找到第4个接触点,则将赋值给,跳转到步骤10;若前后两次的迭代值之差不小于设定的误差允许值,则跳转到步骤12。 judge Whether the difference between the two iteration values before and after is less than the set error allowable value; if The difference between the two iteration values before and after is less than the set error allowable value, it means that the fourth contact point is found, then the assigned to , skip to step 10; if The difference between the two iteration values before and after is not less than the set If the allowable value of error is exceeded, then go to step 12.

步骤14:判断包容区域外边界的接触点集合中接触点的数量是否为4; Step 14: Determine the set of contact points on the outer boundary of the containment area Whether the number of touch points in is 4;

如果接触点的数量等于4,设定圆柱半径减小量的初始值,跳转到下一步; If the number of contact points is equal to 4, set the cylinder radius reduction amount The initial value, jump to the next step;

如果接触点的数量不等于4,则跳转到步骤17。 If the number of touch points is not equal to 4, go to step 17.

步骤15:减去当前的圆柱半径得到,得到尺寸变动后圆柱,其轴线为,每个接触点到轴线的距离等于的关系,得到以下计算式, Step 15: Subtract the current cylinder radius get , to get the cylinder after size change, its axis is , each contact point to the axis distance equal to relationship, the following formula is obtained,

其中为轴线的方向矢量,为轴线上一点,以为未知量,分别得到4个四元非线性方程,通过非线性方程组可以求解出4个未知量,得到圆柱的轴线in axis The direction vector of axis last point to , is the unknown quantity, and four quaternary nonlinear equations are obtained respectively, and the four unknown quantities can be solved through the nonlinear equation system, and the axis of the cylinder can be obtained .

步骤16:依次计算所有非接触点到的距离,所有非接触测点对应的组成集合,如果 +,则表示变动量不足,变为;如果 +,则变动过大,其余非接触测点超出包容区域,变为Step 16: Calculate all non-contact points in sequence to distance , all non-contact measuring points corresponding to Form a set ,if + , it means that the amount of change is insufficient, becomes ;if + , the change is too large, and the rest of the non-contact measuring points exceed the containment area, becomes ;

判断前后2次的迭代值之差是否小于设定的误差允许值;如果前后2次的迭代值之差小于设定的误差允许值,说明找到第5个接触点,将分别赋值给轴线L的参数,并应用实施例1中步骤16的方法判断是否满足判别准则,若满足则跳转到步骤18,若不满足判别准则,跳转到步骤10;如果前后2次的迭代值之差不小于设定的误差允许值,则跳转到步骤15。 judge Whether the difference between the two iteration values before and after is less than the set value Allowable value of error; if The difference between the two iteration values before and after is less than the set value Allowable value of error, indicating that the fifth contact point is found, the , The parameters assigned to the axis L respectively , , and apply the method of step 16 in Embodiment 1 to judge whether the criterion is satisfied, if it is satisfied, then jump to step 18, if it does not meet the criterion, jump to step 10; if The difference between the two iteration values before and after is not less than the set value If the allowable value of error is exceeded, then go to step 15.

步骤17:判断包容区域外边界的接触点集合中接触点的数量是否大于等于5; Step 17: Determine the set of contact points on the outer boundary of the containment area Whether the number of contact points is greater than or equal to 5;

如果接触点的数量小于5,跳转到步骤10; If the number of contact points is less than 5, go to step 10;

如果接触点的数量大于等于5,以接触点集合中4个为1个组合,并以其中1个组合为计算对象,根据步骤15、16中的试探性微量调整的方法确定If the number of contact points is greater than or equal to 5, take 4 of the contact point sets as a combination, and take one of the combinations as the calculation object, and determine it according to the method of tentative micro-adjustment in steps 15 and 16 ;

判断是否小于设定的误差允许值;如果小于设定的误差允许值,应用实施例1中步骤16的方法,判断是否满足判别准则,如果满足则跳转到步骤18,如果不满足判别准则,换1个组合,重新计算,重新进行判断,依次迭代下去;如果大于设定的误差允许值,将计算得到的的参数赋值分别给圆柱轴线L的参数,然后跳转到步骤10。 judge Is it less than the set Allowable value of error; if less than set Allowable value of error, apply the method of step 16 in embodiment 1, judge whether to meet the criterion of discrimination, if satisfied then jump to step 18, if not satisfy the criterion of discrimination, change 1 combination, recalculate , re-judgment, and iterate in turn; if greater than the set Allowable value of error, will be calculated from the Assignment of parameters to the parameters of the cylinder axis L respectively , , and then skip to step 10.

步骤18:输出圆柱度误差、圆柱半径的最优值R以及圆柱轴线L的参数。 Step 18: Output the parameters of the cylindricity error, the optimal value R of the radius of the cylinder, and the axis L of the cylinder.

以下通过实验实例,说明本发明所公布方法计算的有效性。 The validity of the calculation of the method announced by the present invention is illustrated below through an experimental example.

在测量平台上,在圆柱体零件表面上获取24点,测点坐标如表2所示。应用本发明所公布的方法,计算出最大内接圆柱的作用半径为11.9990887mm,圆柱轴线方向矢量(0.00111825745503225,0.000306176357337651,0.999999327877925),圆柱轴线上一点坐标为(404.550573605996,126.630909902755,0.0446863090043053),圆柱度为0.01475mm。计算的效果如附图3所示(图中,*为测点,☆为接触点),第1、5、14、19、20号测点为接触点。分别计算各个接触点的映射,并计算最优解的判别值J,经计算J=2.5931e-014,满足判别准则,计算出的圆柱作用半径及圆柱度误差为最优解。 On the measuring platform, 24 points are obtained on the surface of the cylindrical part, and the coordinates of the measuring points are shown in Table 2.应用本发明所公布的方法,计算出最大内接圆柱的作用半径为11.9990887mm,圆柱轴线方向矢量(0.00111825745503225,0.000306176357337651,0.999999327877925),圆柱轴线上一点坐标为(404.550573605996,126.630909902755,0.0446863090043053),圆柱度为0.01475mm. The calculated effect is shown in attached drawing 3 (in the figure, * is the measuring point, ☆ is the contact point), and the 1st, 5th, 14th, 19th and 20th measuring points are the contact points. Calculate each touchpoint separately Map, and calculate the discriminant value J of the optimal solution. After calculating J = 2.5931e-014, it meets the discriminant criterion, and the calculated cylinder action radius and cylindricity error are the optimal solution.

表2圆柱的测点坐标(单位:mmTable 2 Measuring point coordinates of the cylinder (unit: mm )

测点编号Measurement point number x坐标 x -coordinate y坐标 y- coordinate z坐标 z coordinate 测点编号Measurement point number x坐标 x -coordinate y坐标 y- coordinate z坐标 z coordinate 11 416.50196416.50196 126.62207126.62207 -42.61907-42.61907 1313 416.50921416.50921 126.6223126.6223 -35.28499-35.28499 22 410.49696410.49696 137.01158137.01158 -42.60984-42.60984 1414 410.50862410.50862 137.01277137.01277 -35.27656-35.27656 33 398.50797398.50797 136.99947136.99947 -42.59217-42.59217 1515 398.51415398.51415 137.00824137.00824 -35.25898-35.25898 44 392.51838392.51838 126.62312126.62312 -42.58308-42.58308 1616 392.51911392.51911 126.62285126.62285 -35.24976-35.24976 55 398.49642398.49642 116.23034116.23034 -42.59151-42.59151 1717 398.50985398.50985 116.23174116.23174 -35.25818-35.25818 66 410.49805410.49805 116.22964116.22964 -42.60937-42.60937 1818 410.50947410.50947 116.22875116.22875 -35.27604-35.27604 77 410.50638410.50638 116.22778116.22778 -38.94272-38.94272 1919 410.51541410.51541 116.2301116.2301 -31.6094-31.6094 88 398.50449398.50449 116.23247116.23247 -38.92521-38.92521 2020 398.51512398.51512 116.23001116.23001 -31.59186-31.59186 99 392.52266392.52266 126.62223126.62223 -38.91647-38.91647 21twenty one 392.51775392.51775 126.62182126.62182 -31.58326-31.58326 1010 398.50907398.50907 137.00335137.00335 -38.9252-38.9252 22twenty two 398.51751398.51751 137.0105137.0105 -31.59181-31.59181 1111 410.50058410.50058 137.01238137.01238 -38.94329-38.94329 23twenty three 410.51169410.51169 137.01117137.01117 -31.60976-31.60976 1212 416.50494416.50494 126.62223126.62223 -38.95278-38.95278 24twenty four 416.51224416.51224 126.62176126.62176 -31.61957-31.61957

Claims (2)

1. calculate a method for function size of cylindrical part, connecing size for calculating cylindrical most imperial palace, it is characterized in that, comprise the steps:
Step 1: be placed on measuring table by tested cylinder, measures and obtains the point on periphery in measurement space rectangular coordinate system , =1,2 ..., nrepresent measure-point amount and nfor being greater than the positive integer of 5; All measuring points form measuring point collection ;
Step 2: the parameter providing cylinder at random, the i.e. axis of cylinder ldirection vector ; Carry out the rotational transform of coordinate system, make coordinate system zaxle is parallel to cylinder axis ldirection vector ; After coordinate transform, by measuring point be projected in xoyin plane, obtain measuring point coordinate ; All measuring points form measuring point collection ;
Step 3: at point set in, arbitrarily take out 3 measuring points, and calculate 3 measuring points and form leg-of-mutton circumcenter , as the center of circle iteration initial value;
Step 4: calculate measuring point collection successively in each measuring point to the center of circle distance; And record measuring point collection in each measuring point to central coordinate of circle measuring point corresponding to the minor increment of distance, obtains the contact point set of error containment region inner boundary ;
Step 5: the contact point set of error in judgement containment region inner boundary in whether only have 1 contact point;
If only have 1 contact point, then this contact point is the direction vector of effective contact point, now containment region translation equal central coordinate of circle deduct contact point coordinate, jump to step 8;
If contact point quantity is greater than 1, then jump to next step;
Step 6: the contact point set of error in judgement containment region inner boundary in whether only have 2 contact points;
If only have 2 contact points, then these 2 contact points are the direction vector of effective contact point, now containment region translation equal central coordinate of circle deduct the middle point coordinate of 2 contact point lines, jump to step 8;
If contact point quantity is greater than 2, then jump to next step;
Step 7: calculate each contact point the relative center of circle phasing degree ,
The phasing degree had point of contact form set , right in element sort, obtain vector , compute vector in adjacent 2 phasing degree difference,
for the quantity of contact point; Calculate if, , then meet oxygon criterion, jump to step 9; If , inquiry 2 corresponding contact points, 2 the effective contact points of contact point inquired, all the other contact points are the direction vector of invalid contact point, now containment region translation equal central coordinate of circle deduct the middle point coordinate of 2 effective contact point lines;
Step 8: calculate containment region successively and vary to and each noncontact measuring point center of circle virtual location during contact ;
First each noncontact measuring point is calculated respectively with the vertical centering control separated time of one of them effective contact point, then calculate vertical centering control separated time and cross the center of circle and direction vector is the intersection point of straight line, be containment region and vary to and this measuring point during contact, the virtual location in the center of circle , all noncontact measuring points are corresponding composition set , calculate each noncontact measuring point corresponding to the center of circle distance , all form set , in set in, reject with incorgruous corresponding element, then query set in minimum value, be the translation variation of containment region ; According to containment region variation and moving direction vector , calculate the coordinate in the center of circle ; Forward step 4 to;
Step 9: carry out the coordinate transform with contrary in step 2, measuring point coordinate reverts to original value, calculates coordinate after coordinate transform , to be on cylinder axis L a bit, cylinder axis L with for direction vector;
Step 10: calculate measuring point collection successively in each measuring point to axis ldistance; And record measuring point collection in each measuring point to axis lthe minimum value of distance, test points set corresponding to institute's recording distance minimum value is the contact point set of containment region inner boundary , the minimum value of institute's recording distance is the radius of cylinder r;
Step 11: the contact point set judging containment region inner boundary whether the quantity of middle contact point is 3;
If the quantity of contact point equals 3, then the butt contact coordinate conversion of carrying out, makes coordinate system zaxle forward and cylinder axis direction vector in the same way and parallel, butt contact carries out ascending sequence by its z-axis coordinate, makes , , 's zaxial coordinate increases progressively, and now error containment region rotates the direction vector of variation equal axis direction vector with vector multiplication cross; Arrange and rotate variation angle initial value; Calculate with dot product, if dot product result equals 0, jump to step 18, if dot product result is not equal to 0, jump to next step;
If the quantity of contact point is not 3, jump to step 14;
Step 12: calculate around rotate direction vector after angle ; Then, 3 contact points are projected in perpendicular to plane in, and calculate the center of circle of the circumscribed circle of 3 contact points, according to circumcenter with determine the axis of postrotational cylinder ;
Step 13: calculate all noncontacts point and arrive distance if, , then represent that variation is not enough, the anglec of rotation become ; Otherwise change excessive, all the other noncontact measuring points exceed containment region, the anglec of rotation become ;
Judge whether the difference of the iterative value that front and back are twice is less than the error permissible value of setting; If before and after the difference of iterative value of twice be less than setting error permissible value, then illustrate and find the 4th contact point, then will assignment is given , jump to step 10; If before and after the difference of iterative value of twice be not less than setting error permissible value, then jump to step 12;
Step 14: the contact point set judging containment region inner boundary whether the quantity of middle contact point is 4;
If the quantity of contact point equals 4, setting cylindrical radius recruitment initial value, jump to next step;
If the quantity of contact point is not equal to 4, then jump to step 17;
Step 15: add current cylindrical radius obtain , obtain cylinder after dimensional variations, its axis is , according to 4 contact points to axis distance equal relation, with axis direction vector, axis upper is some unknown quantity, obtains 4 quaternary nonlinear equations respectively, can be obtained the axis of cylinder by Nonlinear System of Equations direction vector, axis on a bit;
Step 16: calculate all noncontacts point successively and arrive distance , all noncontact measuring points are corresponding composition set if, + , then represent that variation is not enough, become ; If + , then change excessive, all the other noncontact measuring points exceed containment region, become ;
Judge before and after the difference of iterative value of 2 times whether be less than setting error permissible value; If before and after the difference of iterative value of 2 times be less than setting error permissible value, illustrates and finds the 5th contact point, will direction vector, axis upper some difference assignment is to axis lparameter , , and judge whether to meet criterion, if meet, jump to step 18, if do not meet criterion, jump to step 10; If before and after the difference of iterative value of 2 times be not less than setting error permissible value, then jump to step 15;
Step 17: the contact point set judging containment region inner boundary whether the quantity of middle contact point is more than or equal to 5;
If the quantity of contact point is less than 5, jump to step 10;
If the quantity of contact point is more than or equal to 5, with in contact point set 4 be 1 combination, and with wherein 1 be combined as calculating object, according in step 15,16 exploratory trace adjustment method determine ;
Judge whether to be less than setting error permissible value; If be less than setting error permissible value, judges whether to meet criterion, if met, jumps to step 18, if do not meet criterion, changes 1 combination, recalculate , re-start judgement, iteration is gone down successively; If be greater than setting error permissible value, by what calculate parameter assignment respectively give cylinder axis lparameter , , then jump to step 10;
Step 18: the optimal value exporting deviation from cylindrical form, cylindrical radius rand cylinder axis lparameter.
2. calculate a method for function size of cylindrical part, for calculating cylindrical minimum external size, it is characterized in that, comprise the steps:
Step 1: be placed on measuring table by tested cylinder, measures and obtains the point on periphery in measurement space rectangular coordinate system , =1,2 ..., nrepresent measure-point amount and nfor being greater than the positive integer of 5; All measuring points form measuring point collection ;
Step 2: the parameter providing cylinder at random, the i.e. axis of cylinder ldirection vector ; Carry out the rotational transform of coordinate system, make coordinate system zaxle is parallel to cylinder axis ldirection vector ; After coordinate transform, by measuring point be projected in xoyin plane, obtain measuring point coordinate ; All measuring points form measuring point collection ;
Step 3: at point set in, arbitrarily take out 3 measuring points, and calculate 3 measuring points and form leg-of-mutton circumcenter , as the center of circle iteration initial value;
Step 4: calculate measuring point collection successively in each measuring point to the center of circle distance; And record measuring point collection in each measuring point to central coordinate of circle measuring point corresponding to the ultimate range of distance, obtains the contact point set that error contains area outer ;
Step 5: the contact point set of error in judgement containment region outer boundary in whether only have 1 contact point;
If only have 1 contact point, then this contact point is the direction vector of effective contact point, now containment region translation equal contact point coordinate and deduct central coordinate of circle , jump to step 8;
If contact point quantity is greater than 1, then jump to next step;
Step 6: the contact point set of error in judgement containment region outer boundary in whether only have 2 contact points;
If only have 2 contact points, then these 2 contact points are the direction vector of effective contact point, now containment region translation the middle point coordinate equaling 2 contact point lines deducts central coordinate of circle , jump to step 8;
If contact point quantity is greater than 2, then jump to next step;
Step 7: calculate each contact point the relative center of circle phasing degree ,
The phasing degree had point of contact form set , right in element sort, obtain vector , compute vector in adjacent 2 phasing degree difference,
for the quantity of contact point; Calculate if, , then meet oxygon criterion or diameter criterion, jump to step 9; If , inquiry 2 corresponding contact points, 2 the effective contact points of contact point inquired, all the other contact points are the direction vector of invalid contact point, now containment region translation the middle point coordinate equaling 2 effective contact point lines deducts the center of circle coordinate;
Step 8: calculate containment region successively and vary to and each noncontact measuring point center of circle virtual location during contact ;
First each noncontact measuring point is calculated respectively with the vertical centering control separated time of one of them effective contact point, then calculate vertical centering control separated time and cross the center of circle and direction vector is the intersection point of straight line, be containment region and vary to and this measuring point during contact, the virtual location in the center of circle , all noncontact measuring points are corresponding composition set , calculate each noncontact measuring point corresponding to the center of circle distance , all form set , in set in, reject with incorgruous corresponding element, then query set in minimum value, be the translation variation of containment region ; According to containment region variation and moving direction vector , calculate the coordinate in the center of circle ; Forward step 4 to;
Step 9: carry out the coordinate transform with contrary in step 2, measuring point coordinate reverts to original value, calculates coordinate after coordinate transform , be cylinder axis lon a bit, cylinder axis lwith for direction vector;
Step 10: calculate measuring point collection successively in each measuring point to axis ldistance; And record measuring point collection in each measuring point to axis lthe maximal value of distance, test points set corresponding to institute's recording distance maximal value is the contact point set of containment region outer boundary , the maximal value of institute's recording distance is the radius of cylinder r;
Step 11: the contact point set judging containment region outer boundary whether the quantity of middle contact point is 3;
If the quantity of contact point equals 3, then the butt contact coordinate conversion of carrying out, makes coordinate system zaxle forward and cylinder axis direction vector in the same way and parallel, butt contact carries out ascending sequence by its z-axis coordinate, makes , , 's zaxial coordinate increases progressively, and now error containment region rotates the direction vector of variation equal axis direction vector with vector multiplication cross; Arrange and rotate variation angle initial value; Calculate with dot product, if dot product result equals 0, jump to step 18, if dot product result is not equal to 0, jump to next step;
If the quantity of contact point is not 3, jump to step 14;
Step 12: calculate around rotate direction vector after angle ; Then, 3 contact points are projected in perpendicular to plane in, and calculate the center of circle of the circumscribed circle of 3 contact points, according to circumcenter with determine the axis of postrotational cylinder ;
Step 13: calculate all noncontact measuring points and arrive distance if, , then represent that variation is not enough, the anglec of rotation become ; If , change excessive, all the other noncontact measuring points exceed containment region, the anglec of rotation become ;
Judge whether the difference of the iterative value that front and back are twice is less than the error permissible value of setting; If before and after the difference of iterative value of twice be less than setting error permissible value, then illustrate and find the 4th contact point, then will assignment is given , jump to step 10; If before and after the difference of iterative value of twice be not less than setting error permissible value, then jump to step 12;
Step 14: the contact point set judging containment region outer boundary whether the quantity of middle contact point is 4;
If the quantity of contact point equals 4, setting cylindrical radius decrease initial value, jump to next step;
If the quantity of contact point is not equal to 4, then jump to step 17;
Step 15: add current cylindrical radius obtain , obtain cylinder after dimensional variations, its axis is , according to 4 contact points to axis distance equal relation, with axis direction vector, axis upper is some unknown quantity, obtains 4 quaternary nonlinear equations respectively, can be obtained the axis of cylinder by Nonlinear System of Equations direction vector, axis on a bit;
Step 16: calculate all noncontacts point successively and arrive distance , all noncontact measuring points are corresponding composition set if, + , then represent that variation is not enough, become ; If + , then change excessive, all the other noncontact measuring points exceed containment region, become ;
Judge before and after the difference of iterative value of 2 times whether be less than setting error permissible value; If before and after the difference of iterative value of 2 times be less than setting error permissible value, illustrates and finds the 5th contact point, will direction vector, axis upper some difference assignment is to axis lparameter , , and judge whether to meet criterion, if meet, jump to step 18, if do not meet criterion, jump to step 10; If before and after the difference of iterative value of 2 times be not less than setting error permissible value, then jump to step 15;
Step 17: the contact point set judging containment region outer boundary whether the quantity of middle contact point is more than or equal to 5;
If the quantity of contact point is less than 5, jump to step 10;
If the quantity of contact point is more than or equal to 5, with in contact point set 4 be 1 combination, and with wherein 1 be combined as calculating object, according in step 15,16 exploratory trace adjustment method determine ;
Judge whether to be less than setting error permissible value; If be less than setting error permissible value, judges whether to meet criterion, if met, jumps to step 18, if do not meet criterion, changes 1 combination, recalculate , re-start judgement, iteration is gone down successively; If be greater than setting error permissible value, by what calculate parameter assignment respectively give cylinder axis lparameter , , then jump to step 10;
Step 18: the optimal value exporting deviation from cylindrical form, cylindrical radius rand cylinder axis lparameter.
CN201310230254.8A 2013-06-11 2013-06-11 A kind of method calculating function size of cylindrical part Expired - Fee Related CN103292654B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310230254.8A CN103292654B (en) 2013-06-11 2013-06-11 A kind of method calculating function size of cylindrical part

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310230254.8A CN103292654B (en) 2013-06-11 2013-06-11 A kind of method calculating function size of cylindrical part

Publications (2)

Publication Number Publication Date
CN103292654A CN103292654A (en) 2013-09-11
CN103292654B true CN103292654B (en) 2015-11-25

Family

ID=49093925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310230254.8A Expired - Fee Related CN103292654B (en) 2013-06-11 2013-06-11 A kind of method calculating function size of cylindrical part

Country Status (1)

Country Link
CN (1) CN103292654B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106289145B (en) * 2016-10-27 2018-10-09 北京理工大学 A kind of cylindricity On-machine Test method
CN108121876A (en) * 2017-12-30 2018-06-05 唐哲敏 A kind of square groove interaction in vitro width assessment method of fast steady letter
CN108253917A (en) * 2017-12-30 2018-07-06 唐哲敏 A kind of minimum circumscribed cylinder diameter assessment method of fast steady letter
CN109029326B (en) * 2018-10-11 2020-06-23 合肥源康信息科技有限公司 Method for rapidly calculating installation clearance of two sections of shafts
DE102019008821A1 (en) * 2019-12-18 2021-06-24 Mitutoyo Corporation Method and device for determining the two-point size of a workpiece
CN113709167B (en) * 2021-08-30 2023-04-07 杭州百子尖科技股份有限公司 Compression transmission method of appearance detection data
CN119773117B (en) * 2025-03-07 2025-05-16 宁波天龙电子股份有限公司 A mold repair method for preparing a mold for a plastic product with a round shaft feature

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2190829C2 (en) * 1999-12-22 2002-10-10 Самарский государственный технический университет Process of ball control
CN102445137A (en) * 2011-09-20 2012-05-09 飞翼股份有限公司 Device and method for measuring radius of spherical crown

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4487387B2 (en) * 1999-06-25 2010-06-23 株式会社ジェイテクト Roundness measuring device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2190829C2 (en) * 1999-12-22 2002-10-10 Самарский государственный технический университет Process of ball control
CN102445137A (en) * 2011-09-20 2012-05-09 飞翼股份有限公司 Device and method for measuring radius of spherical crown

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
一种最小外接圆法圆度误差评价实现方法;孙茉莉;《工具技术》;20100520;第44卷(第5期);第109-111页 *
圆柱度误差的测量与评价;刘飞;《中国优秀硕士学位论文全文数据库》;20090131(第1期);B022-401 *
基于最大内接圆法的圆度误差测量实现方法;彭晓南等;《工具技术》;20080131;第42卷(第1期);第118-121页 *

Also Published As

Publication number Publication date
CN103292654A (en) 2013-09-11

Similar Documents

Publication Publication Date Title
CN103292654B (en) A kind of method calculating function size of cylindrical part
CN103256916B (en) Evaluation method of part flatness error based on minimum area
CN109032069B (en) A method for calculating spherical center coordinates of non-contact R-test measuring instrument using eddy current displacement sensor
CN101871767B (en) System and method for detecting form and position tolerance of components
CN103278126B (en) A kind of sphericity error assessment method for part based on Minimum Area
CN108871256B (en) Roundness error evaluation algorithm
CN109115095B (en) Structural parameter optimization method of non-contact R-test measuring instrument
CN102622479B (en) A Reverse Engineering CAD Modeling Method Based on 3D Sketch
CN104482911B (en) Sphericity error assessment method based on error ball
CN113269673B (en) Three-dimensional point cloud splicing method based on standard ball frame
CN101847262B (en) Fast three-dimensional point cloud searching and matching method
CN103294920B (en) A kind of part Cylindricity error evaluation based on Minimum Area
CN104458124A (en) Barycenter measuring method
CN109141266B (en) Steel structure measuring method and system
CN111283477A (en) A method for measuring and evaluating camber-convex profile errors based on feature lines
CN104050372A (en) Method for automatically evaluating errors of three-dimensional geometrical shapes
CN104089599B (en) Quasi morphological filtering method for extracting two-dimensional contour in contact measuring head measurement
CN103292769B (en) A kind of plane inclination error detection method based on Minimum Area
CN110132195B (en) 3D Radius Compensation Method of Probe Ball for Contact Scanning Measurement of Blade Section
CN103438828A (en) Method for laser detection of screw rotor end sectional shape
CN103308021A (en) Method for measuring roundness error of workpiece
CN106052568B (en) The compensation method of screw rod type face detection device displacement sensor system installation error
CN110020396A (en) A kind of concentricity assessment method based on Tolerance Principle
CN114608461A (en) Laser scanning measurement method for parts with non-uniform wall thickness
CN103292674B (en) A kind of method calculating function size of sphere part

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C41 Transfer of patent application or patent right or utility model
CB03 Change of inventor or designer information

Inventor after: Huang Meifa

Inventor after: Chen Leilei

Inventor after: Tang Zhemin

Inventor after: Peng Zhiguo

Inventor after: Bao Jiading

Inventor after: Wang Can

Inventor after: Yang Mengjie

Inventor before: Huang Meifa

Inventor before: Chen Leilei

Inventor before: Gong Wenfeng

Inventor before: Sun Yonghou

COR Change of bibliographic data
TA01 Transfer of patent application right

Effective date of registration: 20151029

Address after: 541004 East District School of mechanical and electrical engineering, Guilin University of Electronic Technology, 1 Jinji Road, Qixing District, Guilin, the Guangxi Zhuang Autonomous Region

Applicant after: GUILIN University OF ELECTRONIC TECHNOLOGY

Address before: 541004 graduate school, Guilin University of Electronic Technology, 1 Jinji Road, Qixing District, Guilin, the Guangxi Zhuang Autonomous Region

Applicant before: Chen Leilei

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151125