hexagon logo

Scripting

Alright folks, I'm getting there but not quite. So I have a very small area, and a callout of a position and this area is a Radius. Now I took 4 Polar Radius hits, and Created Assignment Shown below


ASSIGN/V1=(PNT46.PR+PNT47.PR+PNT1.PR+PNT48.PR)/4
F1         =GENERIC/CIRCLE,DEPENDENT,CARTESIAN,OUT,$
            NOM/XYZ,<0,0,0>,$
            MEAS/XYZ,<0,0,0>,$
            NOM/IJK,<0,0,1>,$
            MEAS/IJK,<0,0,1>,$
            RADIUS/6,V1

Now my nominal is fine 0,0,0 center of the part. Can't create a constructed circle. Really crappy numbers. But I know I have have to create something based off of those points to fill in my measured results in that generic circle. need a little help here. Hope This is something easy. , ,

suggestions?
Parents
  • Here's something I've developed about a year ago and only use it here and there. Basically tests all values to see if they're in tolerance, for example say 2/3 points are in tolerance but that 1 is out.... averaging the measured results won't flag that one value to be out of tolerance (OOT) instead an average will be reported. Bit of an extreme example, it doesn't really apply with your scenario, but it's possible.

    It's a sub program...
    $$ NO,
                  _____________________________________________________________________________________________
    
                                 Find the Greatest OOT value or if all in TOL, return average.
                  _____________________________________________________________________________________________
    
                  SUBROUTINE/GREATESTOOTORAVR,
                      VALALL =  : ARRAY INPUT; HOLDS VALUES TO BE PROCESSED,
                      TNOM =  : INPUT; NOMINAL TARGET,
                      TTOL =  : INPUT; NOMINAL'S TOLERANCE,
                      IOUTPUT =  : OUTPUT; GREATEST OOT VALUE OR AVR OF IN TOL VALUES,
                       =
                  ASSIGN/IOUTPUT=0
                  ASSIGN/AVRARRAY=FUNCTION((X),SUM(X)/LEN(X))
                  ASSIGN/MYFN=FUNCTION((H,J,G), H<=(J-G) OR H>=(J+G))
                  ASSIGN/FLIPVEC=FUNCTION((X),IF(X<0,X*(-1),X))
                  ASSIGN/VALFROMNOM=FUNCTION((X,Y),X-Y)
                  ASSIGN/H=FLIPVEC(VALFROMNOM(TNOM,VALALL[MAXINDEX(VALALL)]))
                  ASSIGN/C=FLIPVEC(VALFROMNOM(TNOM,VALALL[MININDEX(VALALL)]))
      $$ NO,
    
                  IF/MYFN(VALALL[MAXINDEX(VALALL)],TNOM,TTOL) OR MYFN(VALALL[MININDEX(VALALL)],TNOM,TTOL)
                    IF/H>C
                      ASSIGN/IOUTPUT=VALALL[MAXINDEX(VALALL)]
                    END_IF/
                    ELSE/
                      ASSIGN/IOUTPUT=VALALL[MININDEX(VALALL)]
                    END_ELSE/
                  END_IF/
                  ELSE/
                    ASSIGN/IOUTPUT=AVRARRAY(VALALL)
                  END_ELSE/
                  ENDSUB/
    
  • So would this apply, for example, in a diameter, where half is in and half is OOT, thus showing "which side is out"?
Reply Children
No Data