hexagon logo

T-Values from a SCN Set

Ex. SCN1 (either a constructed set or scan feature)

T-Value Calculation and reporting of Max and Min Values.


No generic points needed.

No Loop.

No previous Dimensioning.

Create a T-Value array, find maxval and minval, and get the maxpnt and minpnt.


ASSIGN/TVAL=0

ASSIGN/TVAL=DOT((SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.HIT
[[COLOR=#ff0000]1..SCN1.NUMHITS[/COLOR] ].TXYZ),SCN1.HIT[[/COLOR]1..SCN1.NUMHITS].TIJK)

ASSIGN/MAXVAL=MAXINDEX(TVAL)

ASSIGN/MINVAL=MININDEX(TVAL)

ASSIGN/MAXPNT=GETTEXT("REFERENCE ID",MAXVAL,{SCN1})

ASSIGN/MINPNT=GETTEXT("REFERENCE ID",MINVAL,{SCN1})


Then dimension any two points x,y,z,t
Say LOC1 PNT1 & LOC2 PNT2

Highlight LOC1 and replace it with MAXTVAL
Highlight PNT1 and replace it with MAXPNT

Highlight LOC2 and replace it with MINTVAL
Highlight PNT2 and replace it with MINPNT


That's it.
Parents
  • Hello there dph51
    I've tried to use your code, as it solves an out put problem I have, but I can't get a result.
    Placing the pointer over the lines just gets a 0 or shows the line of code with no result.
    I've checked the code over & over, may be I've missed something as my eyes are starting to blur.  PLN4 =FEAT/PLANE,RECT
    THEO/-0.185,0,0,0,0,1
    ACTL/0.377,0,-0.028,-0.0007979,0.000672,0.9999995
    CONSTR/PLANE,BF,SCN1,,
    ASSIGN/TVAL = 0
    ASSIGN/TVAL = DOT((SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.HIT[1..SCN1.NUMHITS].TXYZ),SCN1.HIT[1..SCN1.NUMHITS].TIJK)
    ASSIGN/MAXVAL = MAXINDEX(TVAL)
    ASSIGN/MINVAL = MININDEX(TVAL)
    ASSIGN/MAXPNT = GETTEXT("REFERENCE ID",MAXVAL,{SCN1})
    ASSIGN/MINPNT = GETTEXT("REFERENCE ID",MINVAL,{SCN1=)
    DIM MAXTVAL= LOCATION OF MAXPNT UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH
    AX NOMINAL MEAS DEV +TOL -TOL MAX MIN
    X 26.182 26.182 0.000 0.015 0.015 26.182 26.182 ----#----
    Y -59.635 -59.635 0.000 0.015 0.015 -59.635 -59.635 ----#----
    Z 0.000 -0.157 -0.157 0.015 0.015 -0.157 -0.157 <--------
    T 0.000 -0.157 -0.157 0.015 0.015 -0.157 -0.157 <--------
    END OF DIMENSION MAXTVAL
    DIM MINTVAL= LOCATION OF POINT MINPNT UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH
    AX NOMINAL MEAS DEV +TOL -TOL MAX MIN
    X 26.182 26.182 0.000 0.015 0.015 26.182 26.182 ----#----
    Y 59.635 59.635 0.000 0.015 0.015 59.635 59.635 ----#----
    Z 0.000 -0.241 -0.241 0.015 0.015 -0.241 -0.241 <--------
    T 0.000 -0.241 -0.241 0.015 0.015 -0.241 -0.241 <--------
    END OF DIMENSION MINTVAL
    DIM PLAT1= FLATNESS OF PLANE PLN4 UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
    AX NOMINAL MEAS DEV +TOL -TOL MAX MIN
    M 0.000 0.511 0.511 0.010 0.000 0.222 -0.289 -------->




    As you can see I'm working with an old version of DMIS and have never got [1..SCN1.NUMHITS] to work.
    Hopefully a set of expert eyes can see what's wrong. ( I know I'm working in foreign Rolling eyes )
    I thought it could be a language translation thing, I'm working in French as well, but turning back to English changes nothing.

    Any help would be greatly appreciated.
    I'd like to add a big thanks to all here for their help although I don't come here offtenBlush
Reply
  • Hello there dph51
    I've tried to use your code, as it solves an out put problem I have, but I can't get a result.
    Placing the pointer over the lines just gets a 0 or shows the line of code with no result.
    I've checked the code over & over, may be I've missed something as my eyes are starting to blur.  PLN4 =FEAT/PLANE,RECT
    THEO/-0.185,0,0,0,0,1
    ACTL/0.377,0,-0.028,-0.0007979,0.000672,0.9999995
    CONSTR/PLANE,BF,SCN1,,
    ASSIGN/TVAL = 0
    ASSIGN/TVAL = DOT((SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.HIT[1..SCN1.NUMHITS].TXYZ),SCN1.HIT[1..SCN1.NUMHITS].TIJK)
    ASSIGN/MAXVAL = MAXINDEX(TVAL)
    ASSIGN/MINVAL = MININDEX(TVAL)
    ASSIGN/MAXPNT = GETTEXT("REFERENCE ID",MAXVAL,{SCN1})
    ASSIGN/MINPNT = GETTEXT("REFERENCE ID",MINVAL,{SCN1=)
    DIM MAXTVAL= LOCATION OF MAXPNT UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH
    AX NOMINAL MEAS DEV +TOL -TOL MAX MIN
    X 26.182 26.182 0.000 0.015 0.015 26.182 26.182 ----#----
    Y -59.635 -59.635 0.000 0.015 0.015 -59.635 -59.635 ----#----
    Z 0.000 -0.157 -0.157 0.015 0.015 -0.157 -0.157 <--------
    T 0.000 -0.157 -0.157 0.015 0.015 -0.157 -0.157 <--------
    END OF DIMENSION MAXTVAL
    DIM MINTVAL= LOCATION OF POINT MINPNT UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=1.00 OUTPUT=BOTH
    AX NOMINAL MEAS DEV +TOL -TOL MAX MIN
    X 26.182 26.182 0.000 0.015 0.015 26.182 26.182 ----#----
    Y 59.635 59.635 0.000 0.015 0.015 59.635 59.635 ----#----
    Z 0.000 -0.241 -0.241 0.015 0.015 -0.241 -0.241 <--------
    T 0.000 -0.241 -0.241 0.015 0.015 -0.241 -0.241 <--------
    END OF DIMENSION MINTVAL
    DIM PLAT1= FLATNESS OF PLANE PLN4 UNITS=MM ,$
    GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
    AX NOMINAL MEAS DEV +TOL -TOL MAX MIN
    M 0.000 0.511 0.511 0.010 0.000 0.222 -0.289 -------->




    As you can see I'm working with an old version of DMIS and have never got [1..SCN1.NUMHITS] to work.
    Hopefully a set of expert eyes can see what's wrong. ( I know I'm working in foreign Rolling eyes )
    I thought it could be a language translation thing, I'm working in French as well, but turning back to English changes nothing.

    Any help would be greatly appreciated.
    I'd like to add a big thanks to all here for their help although I don't come here offtenBlush
Children
No Data