highest points from skan

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • highest points from skan

    Hi guys,
    As the topic I have a problem with pulling highest points from my skan.
    It would not be a problem with one point, but when i need 3 points problems are begining

    Below program code and used commands

    -------------
    -------------
    ASSIGN/ANZAHL=SKAN1.NUMHITS
    ASSIGN/WERTEX=SKAN1.HIT[1..ANZAHL].Z
    ASSIGN/NUMMER=MAXINDEX(WERTEX)
    POINT_1 = GENERIC/POINT,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<DOUBLE(SKAN1.HIT[NUMMER].TX),DOUBLE(SKAN1.HIT[NUMMER].TY),DOUBLE(SKAN1.HIT[NUMMER].TZ)>,$
    MEAS/XYZ,<DOUBLE(SKAN1.HIT[NUMMER].X),DOUBLE(SKAN1.HIT[NUMMER].Y),DOUBLE(SKAN1.HIT[NUMMER].Z)>,$
    NOM/IJK,<DOUBLE(SKAN1.HIT[NUMMER].TI),DOUBLE(SKAN1.HIT[NUMMER].TJ),DOUBLE(SKAN1.HIT[NUMMER].TK)>,$
    MEAS/IJK,<DOUBLE(SKAN1.
    -------------
    -------------

    In this case we have one point....

    Maybe we have command whitch help pull another one point not including "POINT_1"

    is there anyone who can help me pull 3 highest points ?

  • #2
    This should work : (tested offline on v2017)
    Code:
    ASSIGN/V1=MAXINDICES(SKAN1.HIT[1..SKAN1.NUMHITS].Z[COLOR=#ff0000])[/COLOR]
    ASSIGN/V2="SKAN1.HIT[V1[1]]"
    ASSIGN/V3="SKAN1.HIT[V1[2]]"
    ASSIGN/V4="SKAN1.HIT[V1[3]]"
    POINT_1 = GENERIC/POINT,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<V2.TX,V2.TY,V2.TZ>,$
    MEAS/XYZ,<V2.X,V2.Y,V2.Z)>,$
    NOM/IJK,<V2.TI,V2.TJ,V2.TK)>,$
    MEAS/IJK,<V2.I,V2.J,V2.K)>,$
    POINT_2 = GENERIC/POINT,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<V3.TX,V3.TY,V3.TZ>,$
    MEAS/XYZ,<V3.X,V3.Y,V3.Z)>,$
    NOM/IJK,<V3.TI,V3.TJ,V3.TK)>,$
    MEAS/IJK,<V3.I,V3.J,V3.K)>,$
    POINT_3 = GENERIC/POINT,DEPENDENT,CARTESIAN,$
    NOM/XYZ,<V4.TX,V4.TY,V4.TZ>,$
    MEAS/XYZ,<V4.X,V4.Y,V4.Z)>,$
    NOM/IJK,<V4.TI,V4.TJ,V4.TK)>,$
    MEAS/IJK,<V4.I,V4.J,V4.K)>,$
    Last edited by JEFMAN; 04-29-2020, 04:08 AM.

    Comment


    • vpt.se
      vpt.se commented
      Editing a comment
      So clean, nice one JEFMAN!

  • #3
    Hi JEFMAN
    Thanks for the quick replay.
    Unfortunately there is a problem with first assign ....

    PS. Working on PC-DMIS 2019 R2
    Attached Files

    Comment


    • #4
      Originally posted by [email protected] View Post
      Hi JEFMAN
      Thanks for the quick replay.
      Unfortunately there is a problem with first assign ....

      PS. Working on PC-DMIS 2019 R2
      I just forgot a ")" at the end !!!!!

      ASSIGN/V1=MAXINDICES(SKAN1.HIT[1..SKAN1.NUMHITS].Z)

      Comment


      • #5
        If the scan is a feature set, and you want to rename the generic point as the init point, you just have to :
        ASSIGN/V5="POINT_"+V1[1] and then write V5 instead of POINT_1, and the same for 2 and 3.

        Comment


        • #6
          Thanks for help Jefman !!

          Everything works perfeckt

          CODE Below:

          ASSIGN/V1=MAXINDICES(SKAN1.HIT[1..SKAN1.NUMHITS].Z)

          ASSIGN/V2=V1[1]
          ASSIGN/V3=V1[2]
          ASSIGN/V4=V1[3]

          POINT_1 = GENERIC/POINT,DEPENDENT,CARTESIAN,$
          NOM/XYZ,<SKAN1.HIT[V2].TX,SKAN1.HIT[V2].TY,SKAN1.HIT[V2].TZ>,$
          MEAS/XYZ,<SKAN1.HIT[V2].X,SKAN1.HIT[V2].Y,SKAN1.HIT[V2].Z>,$
          NOM/IJK,<SKAN1.HIT[V2].TI,SKAN1.HIT[V2].TJ,SKAN1.HIT[V2].TK>,$
          MEAS/IJK,<SKAN1.HIT[V2].I,SKAN1.HIT[V2].J,SKAN1.HIT[V2].K>

          POINT_2 = GENERIC/POINT,DEPENDENT,CARTESIAN,$
          NOM/XYZ,<SKAN1.HIT[V3].TX,SKAN1.HIT[V3].TY,SKAN1.HIT[V3].TZ>,$
          MEAS/XYZ,<SKAN1.HIT[V3].X,SKAN1.HIT[V3].Y,SKAN1.HIT[V3].Z>,$
          NOM/IJK,<SKAN1.HIT[V3].TI,SKAN1.HIT[V3].TJ,SKAN1.HIT[V3].TK>,$
          MEAS/IJK,<SKAN1.HIT[V3].I,SKAN1.HIT[V3].J,SKAN1.HIT[V3].K>

          POINT_3 = GENERIC/POINT,DEPENDENT,CARTESIAN,$
          NOM/XYZ,<SKAN1.HIT[V4].TX,SKAN1.HIT[V4].TY,SKAN1.HIT[V4].TZ>,$
          MEAS/XYZ,<SKAN1.HIT[V4].X,SKAN1.HIT[V4].Y,SKAN1.HIT[V4].Z>,$
          NOM/IJK,<SKAN1.HIT[V4].TI,SKAN1.HIT[V4].TJ,SKAN1.HIT[V4].TK>,$
          MEAS/IJK,<SKAN1.HIT[V4].I,SKAN1.HIT[V4].J,SKAN1.HIT[V4].K>


          Regards

          Comment

          Related Topics

          Collapse

          Working...
          X