Finding the Low point of a circle

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

  • Finding the Low point of a circle

    I am working on a program that takes 2 circles and two planes with 1,440 points. I have constructed the planes and circles from the points to find the runouts of these features. Is there a halfway decent way to find the low point of these features or the location of the max and min of the circle. Essentially I want to find the place on the part where the circle's diameter is the closest to the center of the part. I tested a couple ways, but with this many points I am not sure if there is an efficient way to approach this.

  • #2
    if you need a physically measured point, simply align to the circle (say XY origin, XY zero), then measure a point at X0,Y0(-cir1R),z,0,1,0 (rough code)
    sigpic
    Originally posted by AndersI
    I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

    Comment


    • #3
      Change your circles from Cartesian to Polar.
      Then, you can use a maxindex and minindex command for each circle to extract the max and the min.
      Code:
      ASSIGN/MAX_PR_1=MAXINDEX(ARRAY(CIR1.HIT[1..CIR1.NUMHITS).PR))
      ASSIGN/MIN_PR_1=MININDEX(ARRAY(CIR1.HIT[1..CIR1.NUMHITS).PR))
      ASSIGN/MAX_PR_2=MAXINDEX(ARRAY(CIR2.HIT[1..CIR2.NUMHITS).PR))
      ASSIGN/MIN_PR_2=MININDEX(ARRAY(CIR2.HIT[1..CIR2.NUMHITS).PR))
      Once max/min assigns extract the hit number... You can generate a generic hit, to output the polar angle and polar radius of each max & min point.
      Code:
      MAX_PT_1 =GENERIC/POINT,DEPENDENT,POLAR
      NOM/XYZ,<CIR1.HIT[MAX_PR_1].TPR, CIR1.HIT[MAX_PR_1].TPA, CIR1.HIT[MAX_PR_1].TZ>
      MEAS/XYZ,<CIR1.HIT[MAX_PR_1].PR, CIR1.HIT[MAX_PR_1].PA, CIR1.HIT[MAX_PR_1].Z>
      NOM/IJK,<CIR1.HIT[MAX_PR_1].TI,<CIR1.HIT[MAX_PR_1].TJ,<CIR1.HIT[MAX_PR_1].TK>
      MEAS/IJK,<CIR1.HIT[MAX_PR_1].I,<CIR1.HIT[MAX_PR_1].J,<CIR1.HIT[MAX_PR_1].K>
      Repeat for MIN_PT_1 and circle 2's MAX_PT_2, and MIN_PT_2.

      Output your locations PR and PA for each point.
      you have been forewarned, this WILL extract outliers as valid hits. so make sure you have zero oil, dirt FOD Debris on your sample parts and probe tip.

      Comment


      • zachzwp
        zachzwp commented
        Editing a comment
        I will try this, thanks!

      • RandomJerk
        RandomJerk commented
        Editing a comment
        Did they finally add PR to a feature's hits? Cool.

      • louisd
        louisd commented
        Editing a comment
        If you designate the coord system to polar, it should present itself as being available, along with PA and Z.
        I believe if you keep the coord system as Cartesian, you are stuck with only xyz ijk as data values. Polar data is null.

    • #4
      Another way:

      Code:
      TMP_XY =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,IN,LEAST_SQR
      THEO/<0,0,0>,<0,0,1>,1.5
      ACTL/<0,0,0>,<0,0,1>,1.5
      TARG/<0,0,0>,<0,0,1>
      START ANG=0,END ANG=360
      ANGLE VEC=<0,1,0>
      DIRECTION=CCW
      SHOW FEATURE PARAMETERS=NO
      SHOW CONTACT PARAMETERS=YES
      NUMHITS=3,DEPTH=1,PITCH=0
      SAMPLE METHOD=SAMPLE_HITS
      SAMPLE HITS=0,SPACER=1
      AVOIDANCE MOVE=BOTH,DISTANCE=3
      FIND HOLE=CENTER,ONERROR=NO,READ POS=NO
      SHOW HITS=NO
      
      A2 =ALIGNMENT/START,RECALL:A1,LIST=YES
      ALIGNMENT/TRANS,XAXIS,TMP_XY
      ALIGNMENT/TRANS,YAXIS,TMP_XY
      ALIGNMENT/END
      
      ASSIGN/MIN_R=999
      ASSIGN/MAX_R=-999
      
      V1 =LOOP/START,ID=YES,NUMBER=TMP_XY.NUMHITS,START=1,SKIP=,
      OFFSET:XAXIS=0,YAXIS=0,ZAXIS=0,ANGLE=0
      
      ASSIGN/PNT_R=SQRT(TMP_XY.X^2+TMP_XY.Y^2)
      ASSIGN/MIN_R=IF(PNT_R<MIN_R,PNT_R,MIN_R)
      ASSIGN/MAX_R=IF(PNT_R>MAX_R,PNT_R,MAX_R)
      
      LOOP/END

      Comment


      • #5
        louisd , Thx for the info about PR !!!!!
        I would say that, if you construct a filtered circle from hits of the measured circles, it doesn't use outliers.

        As I didn't know that PR was available in polar only, I usually do it :
        ASSIGN/POLAR_RAD=SQRT(DOT(CIRC1.HIT[1..CIRC1.NUMHITS].XYZ-CIR1.XYZ,CIRC1.HIT[1..CIRC1.NUMHITS].XYZ-CIR1.XYZ))
        Then
        ASSIGN/V1=MAXINDEX(POLAR_RAD)
        ASSIGN/V2=MININDEX(POLAR_RAD)
        ASSIGN/RMAX=CIRC1.HIT[V1].XYZ
        ASSIGN/RMIN=CIRC1.HIT[V2].XYZ

        and use RMAX.X, .Y and .Z in a generic feature.

        Comment

        Related Topics

        Collapse

        Working...
        X