hexagon logo

Extracting Values from 2D Contour

I'm looking to extract the maximum Z value and maximum ZX value from a scanned 2D curve. Attached is a screengrab of the curve. In this case, it would basically be the end-to-end points of the top line in the X direction. I've tried using FLEX2D, but get an error message 'Value too small (possibly two equal points) !' What's the best way to go about this ?

Attached Files
  •  The highest Z value within the APT's of this scan is 2.1115. Using FXTREM, I'm getting 2.0846, which is the highest point at the very end of the scan. How can I get the highest Z and ZX values from an entire set of APT's?
  • Here's an RCOR of the same curve. I circled the areas I need the points from.
  • For clarity here, I' need for only one single point for the max Z value and one single point for the max ZX.
  • The ZMax you are looking for must be from the radius-corrected curve:

    FXTREM (NAM=(P1,P2,P3,P4,P5,ZMax), OBJ=T1_SCAN, TYP=CSY)


    The max. in ZX is related to the radial distance of each point to zero, by the looks, so you need to do some programming to get the value. You must also be careful about the scan length, as you may find the last point in the scan using this method, as it is the most distant point from the origin. Try:

    DFNELE (NAM=Zero, TYP=POI, CSY=Main_Datum, DEL=*)
    FGEX2D (NAM=T1_SCAN, MIN=P1, MAX=ZXMax, A_O=ZX, REF=Zero)



  • Using FXTREM for the ZMax, I'm still getting the value for the very end of the scan, not the highest Z point. See below. I'll try the ZX later and get back to you.


  • OK, I looked at the ZMax element data in the obj browser, and the correct ZMax value was displayed from the T1_SCAN_RCOR scan. Thank you! Now I'm on to find that ZX point...
  • As far as the ZX point, what I want to accomplish here is to evaluate the distance between the in the ZMax and the ZXMax point along the X axis. I tried the code you suggested, and am getting a distance of .0391", when the distance is actually about .125" measured manually. Am I missing something here...? One other thing... I tried using T1_SCAN_RCOR instead of T1_SCAN with FGEX2D and I get an error saying "No extreme point found".




  • Ok, so nearly there. Attach the wdb & I will get someone to take a look.
  • Here you go. Your help is much appreciated. I will be using this method across mulitple parts and at different angles, so I want to get this right.

    Note: I was unable to attach the WDB, so I gave it a file extension of docx.


  • Hi Lee, your problem is you are trying to locate 2 "sharp" edges using a curve function. The point at the edges are thrown out of sequence, which is why you are struggling - you have 20 points in the raw data that describe a single point on the part (the sharp edge).

    We can automatically remove the out of sequence points (see below), but you will loose the edge definition. Try the code below, maybe it helps.

    !Measure tooth 1
    ME2DE (NAM=T1_SCAN, CSY=Main_Datum, MOD=NOE, INO=I)

    DOUNTIL
    RCOR2D (SRC=T1_SCAN, DST=Dummy, A_O=ZX, ERR=Error)
    CRSUBTYP (NAM=Error, TYP=ELE, STY=APT, REA=Points)
    RMVAPT (SRC=T1_SCAN, ERR=Error, DST=T1_SCAN)
    UNTIL (VL1=Points, VL2=0, TYP=EQ)
    RCOR2D (SRC=T1_SCAN, DST=T1_SCAN_RCOR, A_O=ZX, ERR=Error)

    FXTREM (NAM=(P1,P2,P3,P4,P5,ZMax), OBJ=T1_SCAN_RCOR, TYP=CSY, MOD=NOE)
    DIPNTPNT (NAM=Tooth_1_Height, CSY=Main_Datum, EL1=ZMax, EL2=Datum_A, CAD=N)

    DFNELE (NAM=Zero, TYP=POI, CSY=Main_Datum, DEL=*)
    FGEX2D (NAM=T1_SCAN, MIN=P1, MAX=ZXMax, A_O=ZX, REF=Zero, TYC=INT, MOD=NOE)
    DIPNTPNT (NAM=T1_Land_Width, CSY=Main_Datum, EL1=ZMax, EL2=ZXMax, CAD=N)


  • I apologize for the delay. I fell ill after Thanksgiving, and am starting to finally get caught up with other quality responsibilities. I will definitely try this next week. Your patience is appreciated... Slight smile
  • Lee,

    an alternative method.... use SLCPTS to pull points from the different sections and make specific geometries of them... for example pull the points circled orange into separate ELE's and build axes of them. Pull the points in the region circled blue and build a circle. Then intersect the two axes to get the point. Intersect the top axis and the circle to get the other point.

    below code ... the two intersection points are red.

    There is always more than one way to do something with Quindos..












    SLCPTS (SRC=T1_SCAN_RCOR, TRU=Top_Axis, STY=APT, DEL=Y, TYP=CSY, MIX=-13.8*INCH, MXX=-13.68*INCH, MIZ=2.06*INCH, DSC=X)
    BLDAXI (NAM=Top_Axis, CSY=Main_Datum, MOD=(NOM,NOE), ITY=GSS, PTY=ZX, CTY=NO)
    SLCPTS (SRC=T1_SCAN_RCOR, TRU=Side_Axis, STY=APT, DEL=Y, TYP=CSY, MIX=-13.81*INCH, MXX=-13.79*INCH, MIZ=2.03*INCH, MXZ=2.068*INCH, DSC=X)
    BLDAXI (NAM=Side_Axis, CSY=Main_Datum, MOD=(NOM,NOE), ITY=GSS, PTY=ZX, CTY=NO)
    SLCPTS (SRC=T1_SCAN_RCOR, TRU=Circle, STY=APT, DEL=Y, TYP=CSY, MIX=-13.68*INCH, MIZ=2.0*INCH, MXZ=2.06*INCH, DSC=X)
    BLDCIR (NAM=Circle, CSY=Main_Datum, MOD=(NOM,NOE), ITY=GSS, PTY=ZX, CTY=NO)

    INTPNT (NAM=PT1, CSY=Main_Datum, EL1=Top_Axis, EL2=Side_Axis, PPI=EX, PPL=Main_Datum.$ZX, MOD=NOE)
    INTPNT (NAM=(junk,PT2), CSY=Main_Datum, EL1=Circle, EL2=Top_Axis, PPI=EX, PPL=Main_Datum.$ZX, MOD=NOE)

    USEPLOFRM HP_A4Q
    DRWPLY (NAM=T1_SCAN_RCOR, ASC=Y, PEN=1, A_O=XZ, MRK=1, SFA=15)
    SETPSC (XAX=1.93, DRW=XY, PEN=1)
    DRWPLY (NAM=Top_Axis, PEN=7, A_O=XZ, MRK=1)
    DRWPLY (NAM=Side_Axis, PEN=7, A_O=XZ, MRK=1)
    DRWPLY (NAM=Circle, PEN=5, A_O=XZ, MRK=1)
    GETVALS (OBJ=Circle, TYP=ELE, RDS=(X,Z,A), REA=(X,Z,A))
    DRWCIR (XC =X/INCH, YC =Z/INCH, RAD=A/2/INCH, PEN=5)
    GETVALS (OBJ=PT1, TYP=ELE, RDS=(X,Z,A), REA=(X,Z,A))
    DRWPNT (X =X/INCH, Y =Z/INCH, MRK=1, PEN=3)
    GETVALS (OBJ=PT2, TYP=ELE, RDS=(X,Z,A), REA=(X,Z,A))
    DRWPNT (X =X/INCH, Y =Z/INCH, MRK=1, PEN=3)
    ​​​
  • Hi Lee, your problem is you are trying to locate 2 "sharp" edges using a curve function. The point at the edges are thrown out of sequence, which is why you are struggling - you have 20 points in the raw data that describe a single point on the part (the sharp edge).

    We can automatically remove the out of sequence points (see below), but you will loose the edge definition. Try the code below, maybe it helps.

    !Measure tooth 1
    ME2DE (NAM=T1_SCAN, CSY=Main_Datum, MOD=NOE, INO=I)

    DOUNTIL
    RCOR2D (SRC=T1_SCAN, DST=Dummy, A_O=ZX, ERR=Error)
    CRSUBTYP (NAM=Error, TYP=ELE, STY=APT, REA=Points)
    RMVAPT (SRC=T1_SCAN, ERR=Error, DST=T1_SCAN)
    UNTIL (VL1=Points, VL2=0, TYP=EQ)
    RCOR2D (SRC=T1_SCAN, DST=T1_SCAN_RCOR, A_O=ZX, ERR=Error)

    FXTREM (NAM=(P1,P2,P3,P4,P5,ZMax), OBJ=T1_SCAN_RCOR, TYP=CSY, MOD=NOE)
    DIPNTPNT (NAM=Tooth_1_Height, CSY=Main_Datum, EL1=ZMax, EL2=Datum_A, CAD=N)

    DFNELE (NAM=Zero, TYP=POI, CSY=Main_Datum, DEL=*)
    FGEX2D (NAM=T1_SCAN, MIN=P1, MAX=ZXMax, A_O=ZX, REF=Zero, TYC=INT, MOD=NOE)
    DIPNTPNT (NAM=T1_Land_Width, CSY=Main_Datum, EL1=ZMax, EL2=ZXMax, CAD=N)


    {"data-align":"none","data-size":"full","title":"image.png","data-attachmentid":523622}


    Alright - I'm back...

    I ran this code, and get a distance of .0447 between the ZMax and ZXMax along the X axis. Measured with a caliper, the distance should be around .130. Hmmm...