A kind of computing method of the cylindrical acts having benchmark to retrain
Technical field
The present invention relates to a kind of computing method of the cylindrical acts having benchmark to retrain, belong to delicate metering and computer application field, the cylindrical acts that can be used for having benchmark to retrain in geometric product in various situation, the qualification of any direction straight line degree of tilt detect, and provide guidance for the improvement of process and processing technology.
Background technology
Cylinder is one of modal element in mechanical component, and its precision is on quality, the performance of product and have important impact serviceable life, and cylindrical acts is the important technological parameters of cylindrical component.Maximum inscribed cylinder and Minimum circumscribed cylinder are referred to as cylindrical action face, and the radius of maximum inscribed cylinder and the radius of Minimum circumscribed cylinder are referred to as cylindrical acts.
The computing method of maximum inscribed cylinder and Minimum circumscribed cylinder are the computing method set up based on the Cleaning Principle of smooth cylindrical ring gauge.Maximum inscribed cylinder embody measured hole by maximum fitted shaft, thus obtained deviation from cylindrical form can be considered the maximal clearance between measured hole and maximum fitted shaft; And Minimum circumscribed cylinder embody measured axis by minimum mating holes, thus obtained deviation from cylindrical form can be considered the maximal clearance between measured axis and minimum mating holes.
The present invention mainly solves the calculating of the right cylinder acts of benchmark constraint.The right cylinder acts having benchmark to retrain, except the above using value introduced, the computation process of the minimum circumscribed circle column dimension having benchmark to retrain can be applied to the bank error calculating of any direction straight line.
The calculating of the right cylinder acts having benchmark to retrain, belongs to non-differentiability complex optimization problem, and at present, Chinese scholars mainly adopts traditional optimization, intelligent algorithm, computational geometry method etc.These methods owing to there is computational stability difference, counting yield is low, to adopting, a quantity is restricted, result of calculation is difficult to reach the defects such as exact solution, is difficult to application of putting into production.Ripe least square method is generally all adopted to calculate the right cylinder acts having benchmark to retrain approx in the market.
Summary of the invention
In order to overcome above-mentioned technical disadvantages, the object of this invention is to provide a kind of computing method of the cylindrical acts having benchmark to retrain.The evaluation of the cylindrical acts retrained for there being benchmark, any direction straight line degree of tilt, this method not only increases the accuracy of detection of surveying instrument, and algorithm stability is good, counting yield is high.
For solving the problem, the computing method of a kind of cylindrical acts having benchmark to retrain of the present invention, during for calculating cylindrical minimum external size, mainly comprise the following steps:
Step 1: be placed on measuring table by the part comprising tested cylinder, obtains the measuring point coordinate of reference characteristic and tested cylinder respectively in measurement space rectangular coordinate system.
Step 2: judgment standard feature is plane or straight line;
If reference characteristic is plane, then applies minimum area method matching reference plane, obtain the normal vector of reference plane; If reference characteristic is straight line, then applies minimum area method matching reference line, obtain the direction vector of reference line; The direction vector unification of the normal vector of reference plane or reference line is designated as base vector
.
Step 3: setup algorithm error permissible value
; Provide measured circle mast axis at random
direction vector
initial value, and to ensure
with
become the desired angle that drawing specifies
; The measuring point of tested cylinder is projected in perpendicular to
plane on, in projection plane, by the method for minimum circumscribed circle, calculate the center of circle of minimum circumscribed circle
o, by the center of circle
oas the axis of tested cylinder
on a bit
.
Step 4: carry out coordinate transform, make base vector
be parallel to coordinate system z-axis, simultaneously measuring point, the axis of tested cylinder
direction vector
and axis
on a bit
also corresponding coordinate transform is done.
Step 5: calculate each measuring point of tested cylinder successively to cylinder axis
distance, and record each measuring point to cylinder axis
the measuring point corresponding to ultimate range, measuring point corresponding to the ultimate range recorded forms the test points set contacted with cylinder action face, the now diameter of cylinder action face
equal each measuring point to arrive
2 times of ultimate range.
Step 6: judge whether the quantity of contact point in contact point set equals 2;
If the quantity of contact point is not equal to 2, jump to step 8;
If the quantity of contact point equals 2, cylinder axis
need around base vector
rotate variation, the direction of variation makes axis
?
xoyprojection in plane and 2 contact points exist
xoyprojection join line in plane is tending towards overlapping, and determines to rotate variation
initial value.
Step 7: cylinder axis
around base vector
rotate
axis is obtained after angle
, calculate axis
direction vector; Axis
on a bit
it is the middle point coordinate of 2 contact points; Calculating contact point arrives
distance
, and calculate each noncontact measuring point according to this and arrive
distance
; If
, represent that rotation amount is excessive,
become
; If
, represent that rotation amount is too small,
become
;
If
value be less than or equal to the error permissible value of setting
, by axis
direction vector assignment to axis
direction vector
, will
point coordinate assignment is given
point, and judge whether to meet criterion, jumps to step 5 if do not met, satisfied then jump to step 11; If
value be greater than the error permissible value of setting
, repeat step 7.
Step 8: judge in contact point set, whether contact point quantity equals 3;
If contact point quantity is not equal to 3, jump to step 5; If contact point quantity equals 3, carry out dimensional variations, namely reduce the diameter of cylinder action face, determine dimensional variations amount
initial value.
Step 9: set contact point coordinate as
if the axis that after dimensional variations, tested cylinder is corresponding is
,
direction vector be
,
on be a bit
,
?
xoyplane inner projection with
xthe angle of axle is
; Each contact point all meets following formula,
Thereby establish ternary Nonlinear System of Equations, wherein unknown quantity is
,
; By solving Nonlinear System of Equations, can obtain
direction vector
; Calculate each noncontact measuring point according to this to axis
distance
; If
, represent that variation is excessive,
become
; If
, represent that variation is too small,
become
;
If
value be less than or equal to the error permissible value of setting
, will
assignment is given
, will
assignment is given
, and judge whether to meet criterion, if met, jump to step 11, if do not met, jump to step 5; If
value be greater than the error permissible value of setting
, repeat step 9.
Step 10: judge whether contact point quantity is more than or equal to 4;
If contact point quantity is less than 4, then jump to step 5;
If contact point quantity is more than or equal to 4, be 1 combination with 3 contact points, with wherein 1 combination in 3 contact points for calculating object, carry out dimensional variations according to the method for step 9, driven dimension variation
, and upgrade after dimensional variations
,
;
If dimensional variations amount
be greater than the error permissible value of setting
, jump to step 5; If dimensional variations amount
be less than or equal to the error permissible value of setting
, then judge whether to meet criterion, if do not meet criterion, then change a combination, recalculate dimensional variations amount, repeat step 10, if meet criterion, then jump to next step.
Step 11: calculate and export deviation from cylindrical form, cylinder acts
tand cylinder axis
parameter.
In said method, described calculation process can be applied to the straight line bank error evaluation of any direction.
The computing method of cylindrical acts that the present invention's another kind has benchmark to retrain, for calculate most imperial palace connect size time, mainly comprise the following steps:
Step 1: be placed on measuring table by the part comprising tested cylinder, obtains the measuring point coordinate of reference characteristic and tested cylinder respectively in measurement space rectangular coordinate system.
Step 2: judgment standard feature is plane or straight line;
If reference characteristic is plane, then applies minimum area method matching reference plane, obtain the normal vector of reference plane; If reference characteristic is straight line, then applies minimum area method matching reference line, obtain the direction vector of reference line; The direction vector unification of the normal vector of reference plane or reference line is designated as base vector
.
Step 3: setup algorithm error permissible value
; Provide measured circle mast axis at random
direction vector
initial value, and to ensure
with
become the desired angle that drawing specifies
; The measuring point of tested cylinder is projected in perpendicular to
plane on, in projection plane, by the method for maximum inscribed circle, calculate the center of circle of maximum inscribed circle
o, by the center of circle
oas the axis of tested cylinder
on a bit
.
Step 4: carry out coordinate transform, make base vector
be parallel to coordinate system z-axis, simultaneously measuring point, the axis of tested cylinder
direction vector
and axis
on a bit
also corresponding coordinate transform is done.
Step 5: to calculate on tested cylinder each measuring point successively to cylinder axis
distance, and record each measuring point to cylinder axis
the measuring point corresponding to minor increment, measuring point corresponding to the minor increment recorded forms the test points set contacted with cylinder action face, the now diameter of cylinder action face
equal each measuring point to arrive
2 times of minor increment.
Step 6: judge whether the quantity of contact point in contact point set equals 2;
If the quantity of contact point is not equal to 2, jump to step 8;
If the quantity of contact point equals 2, cylinder axis
need around base vector
rotate variation, the direction of variation makes cylinder axis
?
xoyprojection in plane and 2 contact points exist
xoyprojection join line in plane is tending towards vertical, determines to rotate variation
initial value.
Step 7: cylinder axis
around base vector
rotate
axis is obtained after angle
, calculate axis
direction vector; Axis
on a bit
it is the middle point coordinate of 2 contact points; Calculating contact point arrives
distance
, and calculate each noncontact measuring point according to this and arrive
distance
; If
, represent that rotation amount is excessive,
become
; If
, represent that rotation amount is too small,
become
;
If
value be less than or equal to the error permissible value of setting
, by axis
direction vector assignment to axis
direction vector
, will
point coordinate assignment is given
point, and judge whether to meet criterion, jumps to step 5 if do not met, satisfied then jump to step 11; If
value be greater than the error permissible value of setting
, repeat step 7.
Step 8: judge in contact point set, whether contact point quantity equals 3;
If contact point quantity is not equal to 3, jump to step 5; If contact point quantity equals 3, carry out dimensional variations, namely increase the diameter of cylinder action face, determine dimensional variations amount
initial value.
Step 9: set contact point coordinate as
if the axis that after dimensional variations, tested cylinder is corresponding is
,
direction vector be
,
on be a bit
,
?
xoyplane inner projection with
xthe angle of axle is
; Each contact point all meets following formula,
Thereby establish ternary Nonlinear System of Equations, wherein unknown quantity is
,
; By solving Nonlinear System of Equations, can obtain
direction vector
; Calculate each noncontact measuring point according to this to axis
distance
; If
, represent that variation is excessive,
become
; If
, represent that variation is too small,
become
;
If
value be less than or equal to the error permissible value of setting
, will
assignment is given
, will
assignment is given
, and judge whether to meet criterion, if met, jump to step 11, if do not met, jump to step 5; If
value be greater than the error permissible value of setting
, repeat step 9.
Step 10: judge whether contact point quantity is more than or equal to 4;
If contact point quantity is less than 4, then jump to step 5;
If contact point quantity is more than or equal to 4, be 1 combination with 3 contact points, with wherein 1 combination in 3 contact points for calculating object, carry out dimensional variations according to the method for step 9, driven dimension variation
, and upgrade after dimensional variations
with
;
If dimensional variations amount
be greater than the error permissible value of setting
, jump to step 5; If dimensional variations amount
be less than or equal to the error permissible value of setting
, then judge whether to meet criterion, if do not meet criterion, then change a combination, recalculate dimensional variations amount, repeat step 10, if meet criterion, then jump to next step.
Step 11: calculate and export deviation from cylindrical form, cylinder acts
tand cylinder axis
parameter.
The present invention, according to the cylindrical feature having benchmark to retrain, on the direction optimized, carries out corresponding rotation variation or dimensional variations to cylinder action face, finally calculates the optimal value of measured circle column parameter.
Beneficial effect of the present invention is: the relative position of the contact point that this method inquires meets criterion, the right cylinder acts having benchmark to retrain calculated or any direction straight line bank error are optimal value, and computational stability is good, counting yield is high.
To those skilled in the art, according to application design disclosed by the invention, easily can carry out various distortion and change to the present invention program, it should be noted that all these distortion and change all should belong to scope of the present invention.
Accompanying drawing explanation
Fig. 1 is the calculation flow chart of the minimum external size of the right cylinder having benchmark to retrain of the present invention.
Embodiment
Embodiment 1:
Computing method for the cylindrical acts having benchmark to retrain, during for calculating right cylinder minimum external size, comprise the steps, as shown in Figure 1:
Step 1: be placed on measuring table by the part comprising tested cylinder, obtains the measuring point coordinate of reference characteristic and tested cylinder respectively in measurement space rectangular coordinate system.
Step 2: judgment standard feature is plane or straight line;
If reference characteristic is plane, then applies minimum area method matching reference plane, obtain the normal vector of reference plane; If reference characteristic is straight line, then applies minimum area method matching reference line, obtain the direction vector of reference line; The direction vector unification of the normal vector of reference plane or reference line is designated as base vector
.
Step 3: setup algorithm error permissible value
; Provide measured circle mast axis at random
direction vector
initial value, and to ensure
with
become the desired angle that drawing specifies
; The measuring point of tested cylinder is projected in perpendicular to
plane on, in projection plane, by the method for minimum circumscribed circle, calculate the center of circle of minimum circumscribed circle
o, by the center of circle
oas the axis of tested cylinder
on a bit
.
Step 4: carry out coordinate transform, make base vector
be parallel to coordinate system z-axis, simultaneously measuring point, the axis of tested cylinder
direction vector
and axis
on a bit
also corresponding coordinate transform is done.
Step 5: calculate each measuring point of tested cylinder successively to cylinder axis
distance, and record each measuring point to cylinder axis
the measuring point corresponding to ultimate range, measuring point corresponding to the ultimate range recorded forms the test points set contacted with cylinder action face, the now diameter of cylinder action face
equal each measuring point to arrive
2 times of ultimate range.
Step 6: judge whether the quantity of contact point in contact point set equals 2;
If the quantity of contact point is not equal to 2, jump to step 8;
If the quantity of contact point equals 2, cylinder axis
need around base vector
rotate variation, the direction of variation makes axis
?
xoyprojection in plane and 2 contact points exist
xoyprojection join line in plane is tending towards overlapping, and determines to rotate variation
initial value.
Step 7: cylinder axis
around base vector
rotate
axis is obtained after angle
, calculate axis
direction vector; Axis
on a bit
it is the middle point coordinate of 2 contact points; Calculating contact point arrives
distance
, and calculate each noncontact measuring point according to this and arrive
distance
; If
, represent that rotation amount is excessive,
become
; If
, represent that rotation amount is too small,
become
;
If
value be less than or equal to the error permissible value of setting
, by axis
direction vector assignment to axis
direction vector
, will
point coordinate assignment is given
point, and judge whether to meet criterion, jumps to step 5 if do not met, satisfied then jump to step 11; If
value be greater than the error permissible value of setting
, repeat step 7.
Step 8: judge in contact point set, whether contact point quantity equals 3;
If contact point quantity is not equal to 3, jump to step 5; If contact point quantity equals 3, carry out dimensional variations, namely reduce the diameter of cylinder action face, determine dimensional variations amount
initial value.
Step 9: set contact point coordinate as
if the axis that after dimensional variations, tested cylinder is corresponding is
,
direction vector be
,
on be a bit
,
?
xoyplane inner projection with
xthe angle of axle is
; Each contact point all meets following formula,
Thereby establish ternary Nonlinear System of Equations, wherein unknown quantity is
,
; By solving Nonlinear System of Equations, can obtain
direction vector
; Calculate each noncontact measuring point according to this to axis
distance
; If
, represent that variation is excessive,
become
; If
, represent that variation is too small,
become
;
If
value be less than or equal to the error permissible value of setting
, will
assignment is given
, will
assignment is given
, and judge whether to meet criterion, if met, jump to step 11, if do not met, jump to step 5; If
value be greater than the error permissible value of setting
, repeat step 9.
Step 10: judge whether contact point quantity is more than or equal to 4;
If contact point quantity is less than 4, then jump to step 5;
If contact point quantity is more than or equal to 4, be 1 combination with 3 contact points, with wherein 1 combination in 3 contact points for calculating object, carry out dimensional variations according to the method for step 9, driven dimension variation
, and upgrade after dimensional variations
,
;
If dimensional variations amount
be greater than the error permissible value of setting
, jump to step 5; If dimensional variations amount
be less than or equal to the error permissible value of setting
, then judge whether to meet criterion, if do not meet criterion, then change a combination, recalculate dimensional variations amount, repeat step 10, if meet criterion, then jump to next step.
Step 11: calculate and export deviation from cylindrical form, cylinder acts
tand cylinder axis
parameter.
Embodiment 2:
A kind of computing method of the cylindrical acts having benchmark to retrain, during for calculating minimum external size, need to change embodiment 1, in embodiment 2, the rotation variation of action face and dimensional variations are the reverse variations rotating variation and dimensional variations in embodiment 1, and concrete steps are as follows:
Step 1: be placed on measuring table by the part comprising tested cylinder, obtains the measuring point coordinate of reference characteristic and tested cylinder respectively in measurement space rectangular coordinate system.
Step 2: judgment standard feature is plane or straight line;
If reference characteristic is plane, then applies minimum area method matching reference plane, obtain the normal vector of reference plane; If reference characteristic is straight line, then applies minimum area method matching reference line, obtain the direction vector of reference line; The direction vector unification of the normal vector of reference plane or reference line is designated as base vector
.
Step 3: setup algorithm error permissible value
; Provide measured circle mast axis at random
direction vector
initial value, and to ensure
with
become the desired angle that drawing specifies
; The measuring point of tested cylinder is projected in perpendicular to
plane on, in projection plane, by the method for maximum inscribed circle, calculate the center of circle of maximum inscribed circle
o, by the center of circle
oas the axis of tested cylinder
on a bit
.
Step 4: carry out coordinate transform, make base vector
be parallel to coordinate system z-axis, simultaneously measuring point, the axis of tested cylinder
direction vector
and axis
on a bit
also corresponding coordinate transform is done.
Step 5: to calculate on tested cylinder each measuring point successively to cylinder axis
distance, and record each measuring point to cylinder axis
the measuring point corresponding to minor increment, measuring point corresponding to the minor increment recorded forms the test points set contacted with cylinder action face, the now diameter of cylinder action face
equal each measuring point to arrive
2 times of minor increment.
Step 6: judge whether the quantity of contact point in contact point set equals 2;
If the quantity of contact point is not equal to 2, jump to step 8;
If the quantity of contact point equals 2, cylinder axis
need around base vector
rotate variation, the direction of variation makes cylinder axis
?
xoyprojection in plane and 2 contact points exist
xoyprojection join line in plane is tending towards vertical, determines to rotate variation
initial value.
Step 7: cylinder axis
around base vector
rotate
axis is obtained after angle
, calculate axis
direction vector; Axis
on a bit
it is the middle point coordinate of 2 contact points; Calculating contact point arrives
distance
, and calculate each noncontact measuring point according to this and arrive
distance
; If
, represent that rotation amount is excessive,
become
; If
, represent that rotation amount is too small,
become
;
If
value be less than or equal to the error permissible value of setting
, by axis
direction vector assignment to axis
direction vector
, will
point coordinate assignment is given
point, and judge whether to meet criterion, jumps to step 5 if do not met, satisfied then jump to step 11; If
value be greater than the error permissible value of setting
, repeat step 7.
Step 8: judge in contact point set, whether contact point quantity equals 3;
If contact point quantity is not equal to 3, jump to step 5; If contact point quantity equals 3, carry out dimensional variations, namely increase the diameter of cylinder action face, determine dimensional variations amount
initial value.
Step 9: set contact point coordinate as
if the axis that after dimensional variations, tested cylinder is corresponding is
,
direction vector be
,
on be a bit
,
?
xoyplane inner projection with
xthe angle of axle is
; Each contact point all meets following formula,
Thereby establish ternary Nonlinear System of Equations, wherein unknown quantity is
,
; By solving Nonlinear System of Equations, can obtain
direction vector
; Calculate each noncontact measuring point according to this to axis
distance
; If
, represent that variation is excessive,
become
; If
, represent that variation is too small,
become
;
If
value be less than or equal to the error permissible value of setting
, will
assignment is given
, will
assignment is given
, and judge whether to meet criterion, if met, jump to step 11, if do not met, jump to step 5; If
value be greater than the error permissible value of setting
, repeat step 9.
Step 10: judge whether contact point quantity is more than or equal to 4;
If contact point quantity is less than 4, then jump to step 5;
If contact point quantity is more than or equal to 4, be 1 combination with 3 contact points, with wherein 1 combination in 3 contact points for calculating object, carry out dimensional variations according to the method for step 9, driven dimension variation
, and upgrade after dimensional variations
with
;
If dimensional variations amount
be greater than the error permissible value of setting
, jump to step 5; If dimensional variations amount
be less than or equal to the error permissible value of setting
, then judge whether to meet criterion, if do not meet criterion, then change a combination, recalculate dimensional variations amount, repeat step 10, if meet criterion, then jump to next step.
Step 11: calculate and export deviation from cylindrical form, cylinder acts
tand cylinder axis
parameter.