Array

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

  • Array

    I have a part that has a .250 radius around the outside edge. I'm taking 9 points and then using a array to sort for the lowest point and I'm doing this every 90 degrees around the part which then gives me 4 lowest points that I want to create a diameter from. I know how to ask from the min. But how do I ask which point it uses and I need the XYZ of the point it uses.

    COMMENT/DOC,NO,---------------------------------------
    PNT1A =AUTO/VECTOR POINT,SHOWALLPARAMS = NO
    THEO/4.252,-4.06,0,0,1,0
    ACTL/4.252,-4.0443,0,0,1,0
    TARG/4.252,-4.06,0,0,1,0
    PNT1B =AUTO/VECTOR POINT,SHOWALLPARAMS = NO
    THEO/4.272,-4.06,0,0,1,0
    ACTL/4.272,-4.0529,0,0,1,0
    TARG/4.272,-4.06,0,0,1,0
    PNT1C =AUTO/VECTOR POINT,SHOWALLPARAMS = NO
    THEO/4.292,-4.06,0,0,1,0
    ACTL/4.2919,-4.058,0,0,1,0
    TARG/4.292,-4.06,0,0,1,0
    PNT1D =AUTO/VECTOR POINT,SHOWALLPARAMS = NO
    THEO/4.312,-4.06,0,0,1,0
    ACTL/4.312,-4.061,0,0,1,0
    TARG/4.312,-4.06,0,0,1,0
    PNT1E =AUTO/VECTOR POINT,SHOWALLPARAMS = NO
    THEO/4.332,-4.06,0,0,1,0
    ACTL/4.332,-4.062,0,0,1,0
    TARG/4.332,-4.06,0,0,1,0
    PNT1F =AUTO/VECTOR POINT,SHOWALLPARAMS = NO
    THEO/4.352,-4.06,0,0,1,0
    ACTL/4.352,-4.0613,0,0,1,0
    TARG/4.352,-4.06,0,0,1,0
    PNT1G =AUTO/VECTOR POINT,SHOWALLPARAMS = NO
    THEO/4.372,-4.06,0,0,1,0
    ACTL/4.372,-4.0583,0,0,1,0
    TARG/4.372,-4.06,0,0,1,0
    PNT1H =AUTO/VECTOR POINT,SHOWALLPARAMS = NO
    THEO/4.392,-4.06,0,0,1,0
    ACTL/4.392,-4.0533,0,0,1,0
    TARG/4.392,-4.06,0,0,1,0
    PNT1I =AUTO/VECTOR POINT,SHOWALLPARAMS = NO
    THEO/4.412,-4.06,0,0,1,0
    ACTL/4.4121,-4.045,0,0,1,0
    TARG/4.412,-4.06,0,0,1,0
    MOVE/CLEARPLANE
    ASSIGN/V1 = ARRAY(PNT1A.Y,PNT1B.Y,PNT1C.Y,PNT1D.Y,PNT1E.Y,PNT1 F.Y,PNT1G.Y,PNT1H.Y,PNT1I.Y)
    ASSIGN/V2 = MIN(V1)
    F1 =GENERIC/CIRCLE,DEPENDENT,RECT,OUT,$
    NOM/XYZ,0,0,0,$
    MEAS/XYZ,0,0,V2,$
    NOM/IJK,0,0,1,$
    MEAS/IJK,0,0,1,$
    RADIUS/0,0
    sigpic

  • #2
    So here is what I have come up with for a similar problem.

    Code:
    ASSIGN/V3 = MININDEX(V!)
    SELECT/V3
         CASE/1
                ASSIGN/V4 = "pnt1a"
                ASSIGN/TPX = PNT1A.TX
                ASSIGN/PX = PNT1A.X
                ASSIGN/TPY = PNT1A.TY
                ASSIGN/PY = PNT1A.Y
                ASSIGN/TPZ = PNT1A.TZ
                ASSIGN/PZ = PNT1A.Z
         END_CASE/
         CASE/2
                ASSIGN/V4 = "pnt1b"
                ASSIGN/TPX = PNT1B.TX
                ASSIGN/PX = PNT1B.X
                ASSIGN/TPY = PNT1B.TY
                ASSIGN/PY = PNT1B.Y
                ASSIGN/TPZ = PNT1B.TZ
                ASSIGN/PZ = PNT1B.Z
         END_CASE/
     
    etc...
     
    END_SELECT/
    COMMENT/REPT,"Max point: "+ V4
    Then you can create a generic point using the TPX,TPY,TPZ,PX,PY,PZ variables.

    Just off of the top of my head something like this should work for you. I havn't tested this for this application but I'm pretty sure it will get the job done. Cluncky though.
    Saving the world, one bad part at a time.

    Comment

    Related Topics

    Collapse

    Working...
    X