hexagon logo

How to pull individual points from a scan?

Not necessarily min or max points, but more like a sample of 15 points from a 1500 point scan...
Parents
  • ASSIGN/COUNTER=0
    ASSIGN/V1=SCN1.NUMHITS
    DO/
    ASSIGN/COUNTER=COUNTER+1
    
    ASSIGN/V2=SCN1.HIT[COUNTER].X
    ASSIGN/V3=SCN1.HIT[COUNTER].Y
    ASSIGN/V4=SCN1.HIT[COUNTER].Z
     F3         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<V2,V3,V4>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>
    UNTIL/COUNTER==V1
    


    Not at the machine, so I can't test.
    How about something like this?

    That would do all of the hits though...

    ASSIGN/START=3        <------Start point for evaluation
    ASSIGN/COUNTER=START
    ASSIGN/END=17          <------End point for evaluation
    ASSIGN/V2=SCN1.HIT[START..END]
    DO/
    ASSIGN/V3=SCN1.HIT[COUNTER].XYZ
     F3         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<V3.X,V3.Y,V3.Z>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>
    ASSIGN/COUNTER=COUNTER+1 UNTIL/COUNTER==END
    


    Again, pseudocode that I'm not able to test.
Reply
  • ASSIGN/COUNTER=0
    ASSIGN/V1=SCN1.NUMHITS
    DO/
    ASSIGN/COUNTER=COUNTER+1
    
    ASSIGN/V2=SCN1.HIT[COUNTER].X
    ASSIGN/V3=SCN1.HIT[COUNTER].Y
    ASSIGN/V4=SCN1.HIT[COUNTER].Z
     F3         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<V2,V3,V4>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>
    UNTIL/COUNTER==V1
    


    Not at the machine, so I can't test.
    How about something like this?

    That would do all of the hits though...

    ASSIGN/START=3        <------Start point for evaluation
    ASSIGN/COUNTER=START
    ASSIGN/END=17          <------End point for evaluation
    ASSIGN/V2=SCN1.HIT[START..END]
    DO/
    ASSIGN/V3=SCN1.HIT[COUNTER].XYZ
     F3         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<V3.X,V3.Y,V3.Z>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>
    ASSIGN/COUNTER=COUNTER+1 UNTIL/COUNTER==END
    


    Again, pseudocode that I'm not able to test.
Children
No Data