Help with Min and Max

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

  • Help with Min and Max

    I am tasked with obtaining the Minimum and Maximum distance of points from a datum or X origin (they are the same feature). I was able to accomplish this using ASSIGN and ARRAY with the 64 planes. The customer has need of the Min/Max data from the 256 points that the constructed planes are comprised of. The same ASSIGN functions I was using will not accommodate the amount of features that I need data from. There's some limit on how many features you can have on a line or to assign to.

    Below is the variable I was using for the plane features. Is there help I can get to adapt this for the Min/Max distance for 128 individual points? I need to know the distance the plane is from origin on the X Axis at any given point and not just the plane. Thank you for the help!


    image.png

  • #2
    Code:
                ASSIGN/I=1
                ASSIGN/ID_INFO="P_SIDE1_A"
                DO/
                  ASSIGN/NAM=ID_INFO+I
                  ASSIGN/ARR[I]=NAM.X
                  ASSIGN/I=I+1
                UNTIL/I==30
                ASSIGN/MAX_ARR=MAX(ARR)
                ASSIGN/MIN_ARR=MIN(ARR)
    F1         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                NOM/XYZ,<0,0,0>,$
                MEAS/XYZ,<MAX_ARR,MIN_ARR,0>,$
                NOM/IJK,<0,0,1>,$
                MEAS/IJK,<0,0,1>
    DIM 47_5= LOCATION OF POINT F1  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=YES
    AX       MEAS    NOMINAL       +TOL       -TOL        DEV     OUTTOL
    X       2.7349     0.0000     0.0020     0.0020     2.7349     0.0000 -#--
    Y      -2.7349     0.0000     0.0020     0.0020    -2.7349     2.7329 <---
    END OF DIMENSION 47_5​
    An idea, just know that do loops do take up some additional time in your routine. You can also set it to collect the names if you need them.

    Comment


    • #3
      You could create a COP with planes, then search the min and max x.
      If it doesn't work like this, create a feature set from the cop, then search min and max.

      Comment


      • #4
        Try this:
        I use this method to find max or min point.
        image.png

        Last edited by MattR; 11-23-2022, 08:56 AM.

        Comment

        Related Topics

        Collapse

        Working...
        X