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...
  • Maybe
    ASSIGN/V1 = SCN1.HIT[1].XYZ
    Dimension any point, say PNT1, then replace with V1 in top line of dimension

    ASSIGN/V2 = SCN1.HIT[8].XYZ
    Dimension any point, say PNT1, then replace with V2 in top line of dimension

    Repeat as needed.

    Not at machine, so you may have to try something else.
  • Can someone post a code of a very simple example of this?
  • Adding a generic filter or a pointcloud with a filter to the scan sounds like what you're talking about.

    You could also do a scan with less points per mm but idk if thats what you're asking
  • Adding a generic filter or a pointcloud with a filter to the scan sounds like what you're talking about.

    You could also do a scan with less points per mm but idk if thats what you're asking


    i just the a few points in a small bandwidth in a big scan. i want to pull those points out and evaluate them separately from the rest of the scan
  • Maybe something like this?

    I made a random scan of a radius. assign variables. I forgot to add variables for nominal values, but the basic concept is there.


    SCN1 =FEAT/SCAN,LINEAROPEN,NUMBER OF HITS=6,SHOW HITS=YES,SHOWALLPARAMS=NO
                MEAS/SCAN
                BASICSCAN/LINE,NUMBER OF HITS=6,SHOW HITS=YES,SHOWALLPARAMS=NO
                HIT/VECTOR,<-22.213,-9.088,270.672>,<-0.9255411,-0.3786472,0>,<-21.293,-8.711,271.667>,T=-0.994
                HIT/VECTOR,<-22.632,-7.987,270.672>,<-0.943005,-0.3327787,0>,<-21.694,-7.656,271.667>,T=-0.994
                HIT/VECTOR,<-22.997,-6.867,270.672>,<-0.9581978,-0.2861064,0>,<-22.044,-6.582,271.667>,T=-0.994
                HIT/VECTOR,<-23.071,-6.614,270.672>,<-0.9612717,-0.2756025,0>,<-22.115,-6.34,271.667>,T=-0.994
                HIT/VECTOR,<-23.306,-5.73,270.672>,<-0.971082,-0.238746,0>,<-22.34,-5.493,271.667>,T=-0.994
                HIT/VECTOR,<-23.472,-5.006,270.672>,<-0.978001,-0.2086,0>,<-22.5,-4.799,271.667>,T=-0.994
                ENDSCAN
                ENDMEAS/
    
                ASSIGN/V1=SCN1.HIT[1].X
                ASSIGN/V2=SCN1.HIT[1].Y
                ASSIGN/V3=SCN1.HIT[1].Z
    
    F3         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<V1,V2,V3>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>

  • so if i had 15 hits i wanted to pull out i'd have to do all that work 15 times?
  • 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.
  • This way you will still need to write some code but it might get you to where you want to go:
    SCN2           =FEAT/SCAN,LINEARCLOSE,NUMBER OF HITS=33
                    ,SHOW HITS=NO,SHOWALLPARAMS=NO
                    MEAS/SCAN
                    BASICSCAN/LINE,NUMBER OF HITS=33,SHOW HITS=NO,SHOWALLPARAMS=NO
                    ENDSCAN
                  ENDMEAS/
    PNT_1A       =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                  NOM/XYZ,<SCN2.HIT[1].TX,SCN2.HIT[1].TY,SCN2.HIT[1].TZ>,$
                  MEAS/XYZ,<SCN2.HIT[1].X,SCN2.HIT[1].Y,SCN2.HIT[1].Z>,$
                  NOM/IJK,<SCN2.HIT[1].TI,SCN2.HIT[1].TJ,SCN2.HIT[1].TK>,$
                  MEAS/IJK,<SCN2.HIT[1].I,SCN2.HIT[1].J,SCN2.HIT[1].K>
    PNT_2A       =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                  NOM/XYZ,<SCN2.HIT[6].TX,SCN2.HIT[6].TY,SCN2.HIT[6].TZ>,$
                  MEAS/XYZ,<SCN2.HIT[6].X,SCN2.HIT[6].Y,SCN2.HIT[6].Z>,$
                  NOM/IJK,<SCN2.HIT[6].TI,SCN2.HIT[6].TJ,SCN2.HIT[6].TK>,$
                  MEAS/IJK,<SCN2.HIT[6].I,SCN2.HIT[6].J,SCN2.HIT[6].K>
    PNT_3A       =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                  NOM/XYZ,<SCN2.HIT[12].TX,SCN2.HIT[12].TY,SCN2.HIT[12].TZ>,$
                  MEAS/XYZ,<SCN2.HIT[12].X,SCN2.HIT[12].Y,SCN2.HIT[12].Z>,$
                  NOM/IJK,<SCN2.HIT[12].TI,SCN2.HIT[12].TJ,SCN2.HIT[12].TK>,$
                  MEAS/IJK,<SCN2.HIT[12].I,SCN2.HIT[12].J,SCN2.HIT[12].K>
    PNT_4A       =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                  NOM/XYZ,<SCN2.HIT[18].TX,SCN2.HIT[18].TY,SCN2.HIT[18].TZ>,$
                  MEAS/XYZ,<SCN2.HIT[18].X,SCN2.HIT[18].Y,SCN2.HIT[18].Z>,$
                  NOM/IJK,<SCN2.HIT[18].TI,SCN2.HIT[18].TJ,SCN2.HIT[18].TK>,$
                  MEAS/IJK,<SCN2.HIT[18].I,SCN2.HIT[18].J,SCN2.HIT[18].K>
    SCN3         =FEAT/SET,CARTESIAN
                  THEO/<20.592,2.184,-0.064>,<0,0,1>
                  ACTL/<20.592,2.184,-0.064>,<0,0,1>
                  CONSTR/SET,BASIC,PNT_1A,PNT_2A,PNT_3A,PNT_4A,,
    FCFPROF2 =SURFACE PROFILE : SCN3
                  FEATCTRLFRAME/SHOWPARAMS=NO,SHOWEXPANDED=NO
                    PRIMARY DIMENSION/PROFILE OF SURFACE,0.01,, ,,<MC>,,<MC>
                    NOTE/FCFPROF2

    When you dimension it; go into the advance tabs 'turn on the "Report Textual Analysis".
    Then it will look like this:
  • I don't use scanning very often, but what about adding another scan to just repeat those 15 points you want to evaluate. 15 more hits wouldn't increase your runtime very much and then it would be much easier to analyze and easier to write the code?
  • Maybe something like this?

    I made a random scan of a radius. assign variables. I forgot to add variables for nominal values, but the basic concept is there.


    SCN1 =FEAT/SCAN,LINEAROPEN,NUMBER OF HITS=6,SHOW HITS=YES,SHOWALLPARAMS=NO
    MEAS/SCAN
    BASICSCAN/LINE,NUMBER OF HITS=6,SHOW HITS=YES,SHOWALLPARAMS=NO
    HIT/VECTOR,<-22.213,-9.088,270.672>,<-0.9255411,-0.3786472,0>,<-21.293,-8.711,271.667>,T=-0.994
    HIT/VECTOR,<-22.632,-7.987,270.672>,<-0.943005,-0.3327787,0>,<-21.694,-7.656,271.667>,T=-0.994
    HIT/VECTOR,<-22.997,-6.867,270.672>,<-0.9581978,-0.2861064,0>,<-22.044,-6.582,271.667>,T=-0.994
    HIT/VECTOR,<-23.071,-6.614,270.672>,<-0.9612717,-0.2756025,0>,<-22.115,-6.34,271.667>,T=-0.994
    HIT/VECTOR,<-23.306,-5.73,270.672>,<-0.971082,-0.238746,0>,<-22.34,-5.493,271.667>,T=-0.994
    HIT/VECTOR,<-23.472,-5.006,270.672>,<-0.978001,-0.2086,0>,<-22.5,-4.799,271.667>,T=-0.994
    ENDSCAN
    ENDMEAS/
    
    ASSIGN/V1=SCN1.HIT[1].X
    ASSIGN/V2=SCN1.HIT[1].Y
    ASSIGN/V3=SCN1.HIT[1].Z
    
    F3 =GENERIC/POINT,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<0,0,0>,$
    MEAS/XYZ,<V1,V2,V3>,$
    NOM/IJK,<0,0,1>,$
    MEAS/IJK,<0,0,1>


                ASSIGN/SCN5S1X=SCN5.HIT[68].X
                ASSIGN/SCN5S1Y=SCN5.HIT[68].Y
                ASSIGN/SCN5S1Z=SCN5.HIT[68].Z
    SCN5S68    =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<SCN5S1X,SCN5S1Y,SCN5S1Z>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>
    DIM X1= LOCATION OF POINT SCN5S68  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
    X       0.0000     0.0020     0.0020     1.8380     1.8380     1.8360 -------->
    Y       0.0000     0.0020     0.0020     0.0019     0.0019     0.0000 --------#
    Z       0.0000     0.0020     0.0020   -10.0057   -10.0057    10.0037 <--------
    END OF DIMENSION X1
    

    why doesn't the nominal show up?