hexagon logo

Perimeter Scan

Hello all,
I'm trying to extract the xyz values from a perimeter scan edge hit.
I'm having trouble navigating down the object hierarchy.
I see a PCDSCANHITTYPE and PCD_EDGEHIT, but
I don't know enough to get the xyz values into variables.

Any help would be appreciated.

Thanks in advance.
Parents
  • Hi.


    Edge-point variant in PCDMIS:
    PNT1       =FEAT/CONTACT/EDGE POINT/DEFAULT,CARTESIAN
                THEO/<0,-50,97.137>,<0,-0.7071068,0.7071068>,<0,-0.7071068,0.7071068>
                ACTL/<0,-50,97.137>,<-1,0,0>,<0,-0.7071068,0.7071068>
                TARG/<0,-50,97.137>,<0,-0.7071068,0.7071068>,<0,-0.7071068,0.7071068>
                MEASURE ORDER=SURFACE
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
    PNT2       =FEAT/POINT,CARTESIAN,NO
                THEO/<0,-50,97.137>,<0,-0.7071068,0.7071068>
                ACTL/<0,0,0>,<0,0,1>
                CONSTR/POINT,CAST,PNT1.XYZ
    


    Perimeter scan variant (with N hits) in PCDMIS:
    SCN1       =FEAT/SCAN,SECTIONSCAN,NUMBER OF HITS=14,SHOW HITS=NO,SHOWALLPARAMS=NO
                MEAS/SCAN
                  BASICSCAN/LINE,NUMBER OF HITS=14,SHOW HITS=NO,SHOWALLPARAMS=NO
                  ENDSCAN
                ENDMEAS/
    SCAN_PNT1       =FEAT/POINT,CARTESIAN,NO
                THEO/<0,0,0>,<0,0,1>
                ACTL/<0,0,0>,<0,0,1>
                CONSTR/POINT,CAST,SCN1.HIT[1].XYZ​
    SCAN_PNT2       =FEAT/POINT,CARTESIAN,NO
                THEO/<0,0,0>,<0,0,1>
                ACTL/<0,0,0>,<0,0,1>
                CONSTR/POINT,CAST,SCN1.HIT[2].XYZ​​
    



    do you want to extract the data in a script?
    Edge-point variant in SCRIPT:
      [...]
      if DmisCommand.Type = CONTACT_EDGE_POINT_FEATURE then
        retval = DmisCommand.GetText (MEAS_X, 0)  
        retval = DmisCommand.GetText (MEAS_Y, 0)
        retval = DmisCommand.GetText (MEAS_Z, 0)
      end if
      [...]
    


    Perimeter scan variant (with N hits) in SCRIPT:
      [...]
      if DmisCommand.Type = BASIC_SCAN_OBJECT then
        For iCount = 1 To DmisCommand.GetText (N_HITS, 0)
          retval = DmisCommand.GetText(MEAS_X, iCount)  
          retval = DmisCommand.GetText(MEAS_Y, iCount)
          retval = DmisCommand.GetText(MEAS_Z, iCount)
        Next iCount
      end if
      [...]
    
    ​​​
Reply
  • Hi.


    Edge-point variant in PCDMIS:
    PNT1       =FEAT/CONTACT/EDGE POINT/DEFAULT,CARTESIAN
                THEO/<0,-50,97.137>,<0,-0.7071068,0.7071068>,<0,-0.7071068,0.7071068>
                ACTL/<0,-50,97.137>,<-1,0,0>,<0,-0.7071068,0.7071068>
                TARG/<0,-50,97.137>,<0,-0.7071068,0.7071068>,<0,-0.7071068,0.7071068>
                MEASURE ORDER=SURFACE
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
    PNT2       =FEAT/POINT,CARTESIAN,NO
                THEO/<0,-50,97.137>,<0,-0.7071068,0.7071068>
                ACTL/<0,0,0>,<0,0,1>
                CONSTR/POINT,CAST,PNT1.XYZ
    


    Perimeter scan variant (with N hits) in PCDMIS:
    SCN1       =FEAT/SCAN,SECTIONSCAN,NUMBER OF HITS=14,SHOW HITS=NO,SHOWALLPARAMS=NO
                MEAS/SCAN
                  BASICSCAN/LINE,NUMBER OF HITS=14,SHOW HITS=NO,SHOWALLPARAMS=NO
                  ENDSCAN
                ENDMEAS/
    SCAN_PNT1       =FEAT/POINT,CARTESIAN,NO
                THEO/<0,0,0>,<0,0,1>
                ACTL/<0,0,0>,<0,0,1>
                CONSTR/POINT,CAST,SCN1.HIT[1].XYZ​
    SCAN_PNT2       =FEAT/POINT,CARTESIAN,NO
                THEO/<0,0,0>,<0,0,1>
                ACTL/<0,0,0>,<0,0,1>
                CONSTR/POINT,CAST,SCN1.HIT[2].XYZ​​
    



    do you want to extract the data in a script?
    Edge-point variant in SCRIPT:
      [...]
      if DmisCommand.Type = CONTACT_EDGE_POINT_FEATURE then
        retval = DmisCommand.GetText (MEAS_X, 0)  
        retval = DmisCommand.GetText (MEAS_Y, 0)
        retval = DmisCommand.GetText (MEAS_Z, 0)
      end if
      [...]
    


    Perimeter scan variant (with N hits) in SCRIPT:
      [...]
      if DmisCommand.Type = BASIC_SCAN_OBJECT then
        For iCount = 1 To DmisCommand.GetText (N_HITS, 0)
          retval = DmisCommand.GetText(MEAS_X, iCount)  
          retval = DmisCommand.GetText(MEAS_Y, iCount)
          retval = DmisCommand.GetText(MEAS_Z, iCount)
        Next iCount
      end if
      [...]
    
    ​​​
Children
No Data