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
Parents
  • 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...
Reply
  • 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...
Children
No Data