hexagon logo

How to get the highest point from a set?

Hello all

I wonder whether pc-dmis has a function which will return a highest point from a set? For example:

Based on a certain alignment, I checked a surface with 4x4 points, I would get the highest Z value point. What should I do? 

Thanks

Parents
  • If you have 2021.2 I believe you can do Constructed Extreme points, but I recall you having an older version.

    First example here will put the points in order of highest to lowest by hit number. Easier to pull the point out and use it's XYZ data

    Second example will sort Highest to lowest with actual Z values present in variable.

    ASSIGN/V1=MAXINDICES(5CR.HITS.Z) for assorted array
    ASSIGN/V1=MAXINDEX(5CR.HITS.Z) for single max point
                    OR TRY
    ASSIGN/V1=SORTDOWN(5CR.HITS.Z)

    Added into generic point for extraction if you cannot use Extreme Point.

    FOR MAXINDICES ARRAY USE [VARIABLE[POSITION IN ARRAY]] 
    EXAMPLE ---> ARRAY(6, 7, 4, 3, 2, 1, 5) [V1[1]] = Point 6, Position 1 in Array
    
    F1         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<5CR.HIT[V1[1]].X,5CR.HIT[V1[1]].Y,5CR.HIT[V1[1]].Z>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>
                
    FOR MAXINDEX JUST USE [VARIABLE].X Y OR Z
    
    F1         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<5CR.HIT[V1].X,5CR.HIT[V1].Y,5CR.HIT[V1].Z>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>

  • MAXINDEX(SCN1.HIT[1..SCN1.NUMHITS].Z) works also

  • Yes, this is probably better for him, I thought I put that in here but i forgot to, thanks Jef! Added it in there

  • Thank you   and  I think I could get the highest hit based on this

    The issue I have is about datum C, which is a point on a cylinder surface with (X,Y).  I did level the axis to the cylinder and move the axis to centre of it. Since the cylinder was not perfect with bent,  there was always couple mm away from the top point when probe hit the surface.

    Since I did measure the cylinder. if I construct a circle from the cylinder with a plane( cut it), I could get a circle or arc, Can we get the highest point of the cycle with some function?

  • So you would want the max Polar Point / Largest Radial Point?

    ASSIGN/V1=FUNCTION((X,Y),SQRT((X^2)+(Y^2)))
    ASSIGN/V2=MAXINDEX(V1(CR1.HITS.X,CR1.HITS.Y))
    
    F1         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<CR1.HIT[V2].X,CR1.HIT[V2].Y,CR1.HIT[V2].Z>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>

  • It turns to a circle in a certain alignment, for example, with top Z axis value. It is not about hit anymore. I wonder whether we could have this kind of function

Reply Children