hexagon logo

Local MAX and MIN of a circle (two point measure)

For a long time I've been impressed by the mathematics of and today I had a little time over to test something that might come useful some day - "Local MAX and MIN of a circle (two point measure)". Maybe it has been shown before on the forum, but for me it was a new experience and an interesting sojourn in the not so much used "vector calculations" possibilities of PC-DMIS, i.e. the fact that you can get a whole bunch of things calculated with a single command, addressing a vector of numbers.

Assumption:

Circle CIR measured with an even number of points, spread all around.

Method:

Compute all diameters, find the shortest and longest. This is done by simple coordinate distance [SQRT((X1-X0)^2 + (Y1-Y0)^2) ], but the twist is that PC-DMIS can do it for all diameters at once! It just takes three lines.


            ASSIGN/V1=(CIR.HIT[1..CIR.NUMHITS/2].X-CIR.HIT[CIR.NUMHITS/2+1..CIR.NUMHITS].X)^2  ; square the X-diffs
            ASSIGN/V2=(CIR.HIT[1..CIR.NUMHITS/2].Y-CIR.HIT[CIR.NUMHITS/2+1..CIR.NUMHITS].Y)^2  ; square the Y-diffs
            ASSIGN/V3=SQRT(V1+V2)                                                              ; add them and extract square roots

            ASSIGN/MX=MAX(V3)
            ASSIGN/MXI=MAXINDEX(V3)
            ASSIGN/MN=MIN(V3)
            ASSIGN/MNI=MININDEX(V3)

            COMMENT/REPT,
            "Maxindex: "+MXI
            "Max     : "+MX
            "Minindex: "+MNI
            "Min     : "+MN
Parents
  • "Extrapolating splines and constructing 'real' opposed points" is a good way to look at this.

    The distance method with even hits is only as good as your CMMs ability to take hits where you tell it, and is also subject to error when the hole is out of position (excluding re-measure / findhole options). Spline fitting has problems as well as it's only correct as the total number of hits approaches infinity. Of course either method is going to require a reasonable amount of points if you actually want to find LP_SX and LP_SN the way a gauge would anyway.

    There is some embedded error checking if your input data is really poor (data not sufficient or cross section-y) where SIZE will return a math failed error. In general though, we expect users who want to dimension size per standards rather then the default "D" axis will also know enough to reasonably place their hits.

    I can say we did a number of tests comparing the new size dimension (LP) with a point to point distance and there will be differences, but they are way smaller then the resolution of any CMM.
Reply
  • "Extrapolating splines and constructing 'real' opposed points" is a good way to look at this.

    The distance method with even hits is only as good as your CMMs ability to take hits where you tell it, and is also subject to error when the hole is out of position (excluding re-measure / findhole options). Spline fitting has problems as well as it's only correct as the total number of hits approaches infinity. Of course either method is going to require a reasonable amount of points if you actually want to find LP_SX and LP_SN the way a gauge would anyway.

    There is some embedded error checking if your input data is really poor (data not sufficient or cross section-y) where SIZE will return a math failed error. In general though, we expect users who want to dimension size per standards rather then the default "D" axis will also know enough to reasonably place their hits.

    I can say we did a number of tests comparing the new size dimension (LP) with a point to point distance and there will be differences, but they are way smaller then the resolution of any CMM.
Children
No Data